Skip to content

chore(deps): update dependency decode-uri-component to v0.5.1 [security] - #472

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-decode-uri-component-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-decode-uri-component-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
decode-uri-component 0.2.2 → 0.5.1 age confidence

decode-uri-component: Denial of service via exponential decoding of malformed percent-encoded input

CVE-2026-45822 / GHSA-vcc3-ghjq-m6fr

More information

Details

Impact

An attacker who can supply input to decodeUriComponent() (directly or via a dependency that uses this package on URL/query/path data) can cause excessive CPU usage and application unresponsiveness. This is an availability issue; there is no known memory corruption, data disclosure, or remote code execution impact.

Patches

Upgrade to decode-uri-component@0.5.0.

Workarounds

Limit the size of the input.

Severity

  • CVSS Score: 6.6 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/S:N/AU:Y/R:U/V:D/RE:M/U:Amber

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


decode-uri-component vulnerable to denial of service via quadratic replacement of percent-encoded runs

CVE-2026-118664 / GHSA-qr28-fpjm-wq7f

More information

Details

Summary

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.

Details

When native decodeURIComponent throws, decodeUriComponent() falls back to customDecodeURIComponent (index.js:122). That function:

  1. 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).
  2. Runs one full-string input.replace(new RegExp(key, 'g'), …) per table entry (index.js:154).

With 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.

The 0.5.0 fix for CVE-2026-45822 (fa479da) replaced the recursive decode() routine with a linear scanner, but left this replacement loop unchanged.

Proof of concept

Running the following code takes ~20 seconds.

import decodeUriComponent from 'decode-uri-component';

let payload = '';
for (let i = 0; i < 32000; i++) {
	const high = Math.floor(i / 256).toString(16).padStart(2, '0');
	const low = (i % 256).toString(16).padStart(2, '0');
	payload += `%${high}%${low}x`; // distinct run each iteration
}
payload += '%zz'; // forces the fallback decoder

console.time('decode');
decodeUriComponent(payload); // ~224 KB
console.timeEnd('decode');
Impact

This 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.

The 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().

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

SamVerschueren/decode-uri-component (decode-uri-component)

v0.5.1

Compare Source

  • Decode percent-encoded runs in a single pass fad01d6

v0.5.0

Compare Source

  • Rewrite decoder as single-pass UTF-8 scanner and expand tests fa479da
  • Fix ci and tests 38bdbec
  • Add sideEffects: false to package.json 89446f9

v0.4.1

Compare Source

  • Add TypeScript type definitions c345b4c

v0.4.0

Compare Source

v0.3.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate

renovate Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn Unknown env config "store". This will error in a future major version of npm. See `npm help npmrc` for supported config options.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @material-ui/core@4.9.14
npm error Found: react@17.0.2
npm error node_modules/react
npm error   react@"17.0.2" from the root project
npm error   peer react@"17.0.2" from @hot-loader/react-dom@17.0.2
npm error   node_modules/@hot-loader/react-dom
npm error     dev @hot-loader/react-dom@"17.0.2" from the root project
npm error   11 more (@testing-library/react, gatsby, gatsby-link, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.8.0" from @material-ui/core@4.9.14
npm error node_modules/@material-ui/core
npm error   @material-ui/core@"4.9.14" from the root project
npm error   peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.9.1
npm error   node_modules/@material-ui/icons
npm error     @material-ui/icons@"4.9.1" from the root project
npm error   1 more (@material-ui/lab)
npm error
npm error Conflicting peer dependency: react@16.14.0
npm error node_modules/react
npm error   peer react@"^16.8.0" from @material-ui/core@4.9.14
npm error   node_modules/@material-ui/core
npm error     @material-ui/core@"4.9.14" from the root project
npm error     peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.9.1
npm error     node_modules/@material-ui/icons
npm error       @material-ui/icons@"4.9.1" from the root project
npm error     1 more (@material-ui/lab)
npm error
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2026-11-25T20_07_30_782Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-11-25T20_07_30_782Z-debug-0.log

@renovate
renovate Bot force-pushed the renovate/npm-decode-uri-component-vulnerability branch from 9273cbc to db11909 Compare November 4, 2026 17:26
@renovate renovate Bot changed the title chore(deps): update dependency decode-uri-component to v0.5.0 [security] chore(deps): update dependency decode-uri-component to v0.5.1 [security] Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants