---
id: CVE-2026-118664
title: >-
  decode-uri-component: Denial of service via quadratic replacement of
  percent-encoded runs
summary: >-
  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 p…
severity: high
cvss: 8.2
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-400
  - CWE-407
vendor: SamVerschueren
product: decode-uri-component
affected:
  - decode-uri-component < 0.5.1
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-29T15:29:24.494465Z'
published: '2026-10-28'
updated: '2026-10-29'
sourceUpdated: '2026-10-29T17:23:10.863Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-118664'
references:
  - url: >-
      https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f
    label: >-
      https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f
  - url: >-
      https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608
    label: >-
      https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608
  - url: 'https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1'
    label: 'https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-118664'
  - url: 'https://github.com/advisories/GHSA-qr28-fpjm-wq7f'
tags:
  - cve.org
  - ghsa
  - npm
aliases:
  - GHSA-qr28-fpjm-wq7f
ecosystem: npm
patched:
  - decode-uri-component 0.5.1
epss: 0.00318
epssPercentile: 0.24812
ingestedAt: '2026-10-29T17:39:38.153Z'
---

## Overview

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.

## Affected

- `decode-uri-component < 0.5.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-118664)

Affected packages:

- `decode-uri-component <= 0.5.0`

Patched in:

- `decode-uri-component 0.5.1`

Source: https://github.com/advisories/GHSA-qr28-fpjm-wq7f
