decode-uri-component: Denial of service via quadratic replacement of percent-encoded runs
Summary
decode-uri-component is an npm library used as a decoding helper, often as a transitive dependency of query-string. Versions before 0.5.1 use a fallback decoder whose cost grows quadratically with the number of distinct percent-encoded runs in malformed input. An unauthenticated attacker can send a crafted request of about 224 KB that blocks the Node.js event loop for around 20 seconds, causing denial of service. No data loss or code execution is possible, and the attack requires a Node.js service that parses attacker-supplied percent-encoded input with this library.
Affected
- decode-uri-component versions before 0.5.1
- Transitive use via query-string 7 and similar packages
- Version 0.5.0 is affected
Fixed in
- Version 0.5.1 (upstream fix commit fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608)
- Note: 0.5.1 is ESM-only; CommonJS consumers may break
Workaround
- No official workaround documented.
- Limit request body and URL sizes.
- Where lenient fallback decoding is not required, use native decodeURIComponent and reject malformed input with HTTP 400.
Exploitation
- No known exploitation in the wild; CISA KEV status not verified.
- Public technical details and a unit test demonstrating the issue exist; no weaponised exploit found.
- CISA SSVC: exploitation none, automatable no, technical impact partial.
- EPSS 0.32 %.
Our recommendation
- Check whether decode-uri-component is used directly or transitively (e.g. npm ls decode-uri-component).
- Prioritise internet-facing Node.js services that parse request input.
- Update to version 0.5.1 or later using an override, and test CommonJS consumers before rollout.
- Apply request size limits as an interim measure.
- Monitor for event loop latency and CPU spikes.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-qr28-fpjm-wq7f github.com
- Release v0.5.1 github.com
- Fix commit fad01d6 github.com
- Upstream fix pull request #25 github.com
- GitLab Advisory Database advisories.gitlab.com
- Tenable CVE-2026-118664 www.tenable.com
- OSV CVE-2026-45822 (related earlier issue) osv.dev
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 14:43.
Original description (NVD)
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.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
