CVE-2026-118664

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

Published Oct 28, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

decode-uri-component processes percent-encoded sequences by collecting distinct runs and performing a global replacement. When an input contains many unique percent-encoded runs, the number of replacements and the scanned length grow together, leading to quadratic CPU consumption. The event loop is blocked, causing a denial of service to the application. The flaw is tied to improper input validation (CWE-400), resource exhaustion (CWE-407), and improper handling of encoded sequences (CWE-1322).

Affected Systems

The vulnerable library is SamVerschueren's decode-uri-component. All releases before version 0.5.1 are affected. Updating to v0.5.1 or later, which removed the quadratic replacement logic, resolves the issue.

Risk and Exploitability

The CVSS score of 8.2 indicates a high severity denial of service. The EPSS score is < 1%, indicating a low exploitation probability, but the lack of a public exploit and absence from the KEV catalog suggest low to moderate real-world risk. However, any system that processes user-supplied input through decode‑uri‑component could be targeted by sending a crafted payload with many distinct percent‑encoded runs, triggering the quadratic CPU usage. The likely attack vector is through malicious request bodies or query parameters that reach the library via application code.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade decode‑uri‑component to version 0.5.1 or later, which removes the quadratic replacement logic.
  • Validate or limit the size of percent‑encoded sequences in incoming data before passing it to decode‑uri‑component, to prevent a large number of distinct runs from triggering heavy processing.
  • Add monitoring for CPU spikes or event‑loop blocking associated with decode‑uri‑component calls, and log any abnormal activity for rapid incident response.

Generated by OpenCVE AI on October 30, 2026 at 13:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-qr28-fpjm-wq7f decode-uri-component vulnerable to denial of service via quadratic replacement of percent-encoded runs
History
Type Values Removed Values Added
Weaknesses CWE-1322
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Samverschueren
Samverschueren decode-uri-component
Vendors & Products Samverschueren
Samverschueren decode-uri-component
Type Values Removed Values Added
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.
Title decode-uri-component: Denial of service via quadratic replacement of percent-encoded runs
Weaknesses CWE-400
CWE-407
References
Metrics cvssV4_0

{'score': 8.2, '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'}

Weaknesses
  • CWE-1322

    Use of Blocking Code in Single-threaded, Non-blocking Context

  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 29, 2026, 5:23 PM
Reserved
Oct 28, 2026, 5:25 PM
Status
Deferred
Published
Oct 28, 2026, 9:16 PM
Modified
Oct 29, 2026, 6:17 PM
Severity
Important
Public date
Oct 28, 2026, 8:37 PM