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

Published Oct 28, 2026
·
Updated

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 Software

1 affected component
npm/decode-uri-component<0.5.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade decode-uri-component to a version that resolves this vulnerability.

    Fixed in 0.5.1

Event History

Oct 28, 2026
CVE Published
via MITRE·08:37 PM
Data Sourced
via MITRE·08:37 PM
DescriptionWeakness

Frequently Asked Questions

1

Who is most exposed to this denial of service condition?

Applications using decode-uri-component before 0.5.1 are exposed when they decode attacker-controlled malformed input, especially request bodies that can reach large sizes. Inputs limited by ordinary URL header size limits are less likely to cause a substantial delay.

2

What must an attacker send to trigger excessive CPU use?

The attacker needs to supply malformed percent-encoded input containing many distinct percent-encoded runs. This causes the fallback decoder to perform repeated full-string regular-expression replacements, producing quadratic CPU consumption and blocking the Node.js event loop.

3

Is updating the package sufficient to address the issue?

Yes. The issue is fixed in decode-uri-component version 0.5.1; installations prior to 0.5.1 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203