decode-uri-component: Denial of service via quadratic replacement of percent-encoded runs
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 0.5.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
The decode-uri-component npm library, a fallback-based alternative to JavaScript's decodeURIComponent used in Node.js applications, is affected before version 0.5.1. Attackers can send specially malformed percent-encoded input that causes the library to consume excessive CPU time, which can stall the Node.js event loop and deny service to other users.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original 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.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- SamVerschueren decode-uri-component
fixed in 0.5.1
- decode-uri-componentnpm
fixed in 0.5.1