Regular Expression Denial of Service in nwmatcher

nwmatcher Updated 02 Oct 2025

Summary

07/06/2019
MODERATE
Yes i
Moderate
Not published

GHSA-6394-6h9h-cfjg: Regular Expression Denial of Service. Affects nwmatcher versions < 1.4.4. Fixed in 1.4.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

nwmatcher is an npm package that provides a fast and efficient way to query and manipulate DOM elements. It is commonly used in web development projects to enhance the functionality of websites. However, a vulnerability has been discovered in versions prior to 1.4.4 that could potentially lead to a Regular Expression Denial of Service (ReDoS) attack.

Vulnerability Detail

The vulnerability in nwmatcher is related to a regular expression pattern used in the code. An attacker can exploit this vulnerability by providing a specially crafted input that triggers excessive backtracking in the regular expression engine. This can cause the application to consume excessive CPU resources, leading to a denial of service condition. The impact of this vulnerability can range from degraded performance to complete unavailability of the affected application.

How To Fix

Minimum fixed version

1.4.4

This is the first release that contains the fix.

npm install nwmatcher@1.4.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating nwmatcher is not immediately feasible, a temporary workaround can be implemented by manually modifying the vulnerable code. The following code snippet demonstrates the necessary modification:

// Replace the vulnerable regular expression pattern
const modifiedPattern = /\s*/g;

// Use the modified pattern in the code
// ... (affected code using the pattern)

Conclusion

The Regular Expression Denial of Service vulnerability in nwmatcher can be mitigated by updating the package to version 1.4.4 or later. If immediate update is not possible, a temporary workaround can be applied by modifying the vulnerable code. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for nwmatcher →

Share this vulnerability

FAQ

nwmatcher is an npm package that provides a fast and efficient way to query and manipulate DOM elements in web development projects.

A Regular Expression Denial of Service (ReDoS) attack is a type of denial of service attack where an attacker exploits a vulnerability in a regular expression pattern to cause excessive backtracking, leading to a significant consumption of CPU resources and potentially rendering the affected application unresponsive.

The impact of this vulnerability can range from degraded performance to complete unavailability of the affected application. It depends on the specific circumstances and the resources available to the attacker.

To fix this vulnerability, it is recommended to update nwmatcher to version 1.4.4 or later. This update includes a fix that addresses the vulnerability by replacing the problematic regular expression pattern.

Yes, if updating nwmatcher is not immediately feasible, a temporary workaround can be implemented by manually modifying the vulnerable code. Refer to the 'workaround' section for more details.

References

How To Fix

Minimum fixed version

1.4.4

This is the first release that contains the fix.

npm install nwmatcher@1.4.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback