{"id":"CVE-2026-118664","revision":null,"records":[{"revision":"d97e0c63a461437da97dd8c708714bb1","observedAt":"2026-10-29T19:28:49.708+00:00","statement":{"source":"cve-program","id":"CVE-2026-118664","aliases":[],"title":"decode-uri-component: Denial of service via quadratic replacement of percent-encoded runs","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.","state":0,"publishedAt":"2026-10-28T20:37:19.057+00:00","modifiedAt":"2026-10-29T17:23:10.863+00:00","affected":[{"ecosystem":"Vendor product","name":"decode-uri-component","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"SamVerschueren\",\n                    \"product\": \"decode-uri-component\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.5.1\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","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","score":8.2,"severity":"HIGH"}],"references":["https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f","https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608","https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-118664","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-118664","identifiers":["CVE-2026-118664"]},"retained":false,"historicalAffected":[]},{"revision":"8a05478721bc4f70baa01dba1fc9503a","observedAt":"2026-11-06T21:03:42.056+00:00","statement":{"source":"euvd","id":"EUVD-2026-112471","aliases":["CVE-2026-118664","GHSA-qr28-fpjm-wq7f"],"title":"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 perc…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","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","score":8.2,"severity":null}],"references":["https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f","https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608","https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-112471","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 28, 2026, 8:37:19 PM","dateUpdated":"Oct 29, 2026, 5:23:10 PM"},"relatedAdvisories":[{"id":"RHSA-2026:94580","title":"Red Hat Security Advisory: Red Hat OpenShift distributed tracing platform (Tempo) 3.11.4 release","vulnerabilityIds":["CVE-2026-116591","CVE-2026-118664"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-112471","identifiers":["EUVD-2026-112471","CVE-2026-118664","GHSA-qr28-fpjm-wq7f"]},"retained":false,"historicalAffected":[]},{"revision":"a3ad246424bb49e7bbae68bd5d7118c8","observedAt":"2026-10-29T18:18:40.244+00:00","statement":{"source":"nvd","id":"CVE-2026-118664","aliases":[],"title":"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 perc…","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.","state":0,"publishedAt":"2026-10-28T21:16:56.687+00:00","modifiedAt":"2026-10-29T18:17:28.07+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":8.2,"severity":"HIGH"}],"references":["https://github.com/SamVerschueren/decode-uri-component/commit/fad01d65b93bd3f2f0dc32dfd8d57a38b57bc608","https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1","https://github.com/SamVerschueren/decode-uri-component/security/advisories/GHSA-qr28-fpjm-wq7f"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-118664","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-400","CWE-407"],"productCriteria":[],"sourceDates":{"published":"2026-10-28T21:16:56.687","lastModified":"2026-10-29T18:17:28.070"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-118664","identifiers":["CVE-2026-118664"]},"retained":false,"historicalAffected":[]},{"revision":"2ad30d6b46984ddca36012199599d0c1","observedAt":"2026-10-29T18:12:46.278+00:00","statement":{"source":"osv","id":"GHSA-qr28-fpjm-wq7f","aliases":["CVE-2026-118664"],"title":"decode-uri-component vulnerable to denial of service via quadratic replacement of percent-encoded runs","description":"### Summary\n\n`decodeUriComponent()` takes quadratic time on malformed input that has many distinct percent-encoded runs. A single unauthenticated request of about 224 KB can block the Node.js event loop for about 20 seconds. Version 0.5.0, the release that fixed CVE-2026-45822, is affected.\n\n### Details\n\nWhen native decodeURIComponent throws, `decodeUriComponent()` falls back to `customDecodeURIComponent` (`index.js:122`). That function:\n1. Scans the input for every run of percent-encoded bytes (e.g. `%C3%A5`) and stores each distinct run, with its decoded value, in a lookup table (`index.js:130-144`).\n2. Runs one full-string `input.replace(new RegExp(key, 'g'), …)` per table entry (`index.js:154`).\n\nWith K distinct runs in an input of length L, that's K regex compilations and K full scans of the string, so O(K·L). An attacker controls both K and L, and K grows with L. One malformed sequence such as a trailing `%zz` is enough to force the fallback path.\n\nThe 0.5.0 fix for CVE-2026-45822 (`fa479da`) replaced the recursive `decode()` routine with a linear scanner, but left this replacement loop unchanged.\n\n### Proof of concept\n\nRunning the following code takes ~20 seconds.\n\n```js\nimport decodeUriComponent from 'decode-uri-component';\n\nlet payload = '';\nfor (let i = 0; i < 32000; i++) {\n\tconst high = Math.floor(i / 256).toString(16).padStart(2, '0');\n\tconst low = (i % 256).toString(16).padStart(2, '0');\n\tpayload += `%${high}%${low}x`; // distinct run each iteration\n}\npayload += '%zz'; // forces the fallback decoder\n\nconsole.time('decode');\ndecodeUriComponent(payload); // ~224 KB\nconsole.timeEnd('decode');\n```\n\n### Impact\n\nThis is an availability issue only and there's no confidentiality or integrity impact. Any application that passes untrusted input to `decodeUriComponent()`, directly or through a dependency such as `query-string`, can be made unresponsive. Because Node.js runs on one thread, one request stalls every other client.\n\nThe worst case needs input well beyond URL length limits. Node's default 16 KB header limit keeps payloads passed in via a URL query string to roughly 40 ms per request. Applications that decode request bodies are fully exposed, for example form bodies parsed with `query-string.parse()`.","state":0,"publishedAt":"2026-10-29T16:41:28+00:00","modifiedAt":"2026-10-29T17:00:04.1686106+00:00","affected":[{"ecosystem":"npm","name":"decode-uri-component","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.5.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["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","https://github.com/SamVerschueren/decode-uri-component/releases/tag/v0.5.1"],"sourceUrl":"https://github.com/advisories/GHSA-qr28-fpjm-wq7f","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-qr28-fpjm-wq7f","identifiers":["GHSA-qr28-fpjm-wq7f","CVE-2026-118664"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-07T04:26:54.6034598+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-07T04:26:54.6034598+00:00","lastSuccessAt":"2026-11-07T04:26:54.7529863+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.7529874+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-bb5c9d5a08063ef076042e33dd72a7d0ffa4c4487efdcf3106e29ba55ec2ad57-f2cb380904b5f12493f409ae3c6d6c9a507fe9d31e15cd21f0d0b573e613fef1","complete":true,"records":420500,"lastAttemptAt":"2026-11-07T04:26:54.1988994+00:00","lastSuccessAt":"2026-11-07T03:26:58.5714293+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.1988994+00:00","snapshotPublishedAt":"2026-11-07T03:24:26+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-715c0f3771e44acaadcabfd22fd19b53","complete":true,"records":13630,"lastAttemptAt":"2026-11-07T04:38:26.5467121+00:00","lastSuccessAt":"2026-11-07T04:38:26.542+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:38:26.542+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-07T04:26:54.6034598+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-07T04:26:54.6034598+00:00","lastSuccessAt":"2026-11-07T04:26:54.7537548+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.7537551+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-34343b4ea57e47c5a482c8fcf20a381e","complete":true,"records":13645,"lastAttemptAt":"2026-11-07T04:26:55.2642231+00:00","lastSuccessAt":"2026-11-07T01:26:55.938+00:00","error":null,"lastVerifiedAt":"2026-11-07T01:26:55.938+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-07T04:26:54.5521252+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.5521252+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-07T04:26:54.3450753+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.3450753+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-07T04:26:54.565066+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.565066+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-a0b728bc1c5526b5429930c00621636eba8655069c176697c3080f8377619ad7","complete":true,"records":231291,"lastAttemptAt":"2026-11-07T04:26:54.4507985+00:00","lastSuccessAt":"2026-11-07T00:28:51.1983528+00:00","error":null,"lastVerifiedAt":"2026-11-07T04:26:54.4507985+00:00","snapshotPublishedAt":"2026-11-06T23:33:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}