CVE-2026-1527: undici is vulnerable to CRLF Injection via upgrade option

Published Mar 12, 2026
·
Updated

### Impact When an application passes user-controlled input to the `upgrade` option of `client.request()`, an attacker can inject CRLF sequences (`\r\n`) to: 1. Inject arbitrary HTTP headers 2. Terminate the HTTP request prematurely and smuggle raw data to non-HTTP services (Redis, Memcached, Elasticsearch) The vulnerability exists because undici writes the `upgrade` value directly to the socket without validating for invalid header characters: ```javascript // lib/dispatcher/client-h1.js:1121 if (upgrade) { header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` } ``` ### Patches Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later. ### Workarounds Sanitize the `upgrade` option string before passing to undici: ```javascript function sanitizeUpgrade(value) { if (/[\r\n]/.test(value)) { throw new Error('Invalid upgrade value') } return value } client.request({ upgrade: sanitizeUpgrade(userInput) }) ```

Affected Software

6 affected componentsFixes available
npm/undici
npm/undici>=7.0.0<7.24.0
7.24.0
npm/undici<6.24.0
6.24.0
Nodejs Undici Node.js<6.24.0
Nodejs Undici Node.js>=7.0.0<7.24.0
IBM watsonx.data intelligence<=5.2.0, 5.2.1, 5.3.0, 5.3.1

Event History

Mar 12, 2026
CVE Published
via MITRE·08:17 PM
Data Sourced
via MITRE·08:17 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·09:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
RemedyAffected Software
Mar 13, 2026
Advisory Published
via GitHub·08:41 PM
Data Sourced
via GitHub·08:41 PM
DescriptionSeverityWeaknessAffected Software
Apr 27, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-1527?

CVE-2026-1527 has a high severity rating due to its potential to allow attackers to inject arbitrary HTTP headers and manipulate HTTP requests.

2

How do I fix CVE-2026-1527?

To fix CVE-2026-1527, ensure that user-controlled input to the upgrade option of client.request() is properly validated and sanitized.

3

What software is affected by CVE-2026-1527?

CVE-2026-1527 affects the npm package 'undici', specifically versions that allow untrusted user input in the upgrade option.

4

What type of attack can be performed using CVE-2026-1527?

CVE-2026-1527 enables CRLF injection attacks, which can lead to arbitrary HTTP header injection or HTTP request smuggling.

5

Is CVE-2026-1527 being actively exploited?

While there are no specific reports of active exploitation for CVE-2026-1527, the nature of the vulnerability poses a significant risk if left unaddressed.

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