CVE-2026-118664
decode-uri-component vulnerable to denial of service via quadratic replacement of percent-encoded runs
Auswirkung
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.
Ein Angreifer kann die Lücke über das Netzwerk ausnutzen, ohne Anmeldung, ohne Zutun eines Nutzers. Dafür müssen bestimmte Bedingungen erfüllt sein, was einen Angriff erschwert. Bei Erfolg: hohes Risiko für Ausfälle.
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| npm | decode-uri-component | <= 0.5.0 | 0.5.1 |
Betroffene Produkte · SamVerschueren
| Produkt | Betroffene Versionen |
|---|---|
| Decode-uri-component | vor 0.5.1 |
Schwachstellenklasse
Referenzen
- NVD-Eintrag
- CVE.org-Eintrag
- GitHub-Advisory
- https://github.com/advisories/GHSA-qr28-fpjm-wq7f
- https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f
- https://nvd.nist.gov/vuln/detail/CVE-2026-118664
- https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608
- https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1