Executive brief
The decode-uri-component npm library is used to parse and decode URL-encoded strings in web applications. An attacker can supply specially crafted malformed percent-encoded input that causes the decoding function to consume excessive CPU resources, making the application unresponsive. This is an availability attack with no data exposure or code execution risk.
Technical details
The vulnerability is an algorithmic complexity issue (CWE-407 / CWE-400) in the decodeUriComponent() function. The root cause is inefficient handling of malformed percent-encoded sequences, which can undergo exponential decoding iterations. An attacker with the ability to supply input directly to the function (or via a dependency processing URL/query/path data) can craft payloads that trigger pathological performance. No authentication is required; the attack is network-reachable for web applications accepting URL input. The exploit results in excessive CPU consumption and application unavailability, but does not cause memory corruption or information disclosure. Patch version 0.5.0 addresses this issue; workaround includes input size limiting.
Affected products
- Sam Verschueren decode-uri-component <= 0.4.2
Timeline
- 2026-06-29: disclosed: Published by SamVerschueren to GitHub
- 2026-06-29: patched: Version 0.5.0 released with fix
- 2026-08-31: advisory: GitHub Advisory Database review completed