CVE-2026-118664

decode-uri-component: Denial of service via quadratic replacement of percent-encoded runs

State
Published
Severity
8.2 High
Published
Oct 28, 2026
Updated
Oct 29, 2026
Reserved
Oct 28, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.08.2 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NGitHub_M

Weaknesses

  • CWE-400 Uncontrolled Resource Consumption
  • CWE-407 Inefficient Algorithmic Complexity

Affected Products

ProductVersions
decode-uri-componentSamVerschueren
  • < 0.5.1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.