Vulnerability · Published Oct 28, 2026 · Assigned by GitHub_M
CVE-2026-118664decode-uri-component: Denial of service via quadratic replacement of percent-encoded runs
High 8.2
In plain English
A high-severity uncontrolled resource consumption in decode-uri-component from SamVerschueren. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
decode-uri-component provides a more robust alternative to decodeURIComponent. Prior to 0.5.1, decodeUriComponent in index.js falls back to customDecodeURIComponent after native decoding throws, and the fallback collects every distinct percent-encoded run before performing a full-string regular-expression replacement for each entry. Malformed input containing many distinct runs can therefore make both the number of replacements and the scanned input length grow together, causing quadratic CPU consumption and blocking the Node.js event loop; request-body inputs can reach the demonstrated size, while ordinary URL header limits reduce the practical delay. This issue is fixed in version 0.5.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | decode-uri-component | 0.5.1 | GHSA-qr28-fpjm-wq7f |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| SamVerschueren | decode-uri-component | < 0.5.1 |
Weakness: CWE-400, CWE-407 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
References
- https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f x_refsource_CONFIRM
- https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608 x_refsource_MISC
- https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1 x_refsource_MISC