debug-js debug node.js useColors redos
Description
A vulnerability classified as problematic has been found in debug-js debug up to 3.0.x. This affects the function useColors of the file src/node.js. The manipulation of the argument str leads to inefficient regular expression complexity. Upgrading to version 3.1.0 is able to address this issue. The identifier of the patch is c38a0166c266a679c8de012d4eaccec3f944e685. It is recommended to upgrade the affected component. The identifier VDB-217665 was assigned to this vulnerability.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
debugnpm | >= 3.0.0, < 3.1.0 | 3.1.0 |
debugnpm | < 2.6.9 | 2.6.9 |
Affected products
1Patches
2f53962e944a8remove ReDoS regexp in %o formatter (#504)
1 file changed · +3 −1
src/node.js+3 −1 modified@@ -85,7 +85,9 @@ function useColors() { exports.formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); + .split('\n').map(function(str) { + return str.trim() + }).join(' '); }; /**
c38a0166c266remove ReDoS regexp in %o formatter (#504)
1 file changed · +3 −1
src/node.js+3 −1 modified@@ -83,7 +83,9 @@ function useColors() { exports.formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); + .split('\n').map(function(str) { + return str.trim() + }).join(' '); }; /**
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- github.com/debug-js/debug/commit/c38a0166c266a679c8de012d4eaccec3f944e685ghsapatchWEB
- github.com/debug-js/debug/releases/tag/3.1.0ghsapatchWEB
- github.com/advisories/GHSA-9vvw-cc9w-f27hghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2017-20165ghsaADVISORY
- github.com/debug-js/debug/commit/f53962e944a87e6ca9bb622a2a12dffc22a9bb5aghsaWEB
- github.com/debug-js/debug/pull/504ghsaissue-trackingWEB
- github.com/debug-js/debug/releases/tag/2.6.9ghsaWEB
- vuldb.comghsasignaturepermissions-requiredWEB
- vuldb.comghsavdb-entrytechnical-descriptionWEB
News mentions
0No linked articles in our index yet.