npm
CVE-2026-111755
follow-redirects sensitiveHeaders regex escaping can expose credential headers
- Severity
- High
- Published
- 20 Oct 2026
- Last changed
- 20 Oct 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 1.16.1
- Exploit chance
- 0.5% in the next 30 daysHigher than 41% of CVEs. EPSS by FIRST, 19 Nov 2026
- Also known as
- GHSA-8r9p-f939-6h3c
- Sources
- OSV.dev and GitHub
Description
follow-redirects 1.16.0 introduced the sensitiveHeaders option (the fix for CVE-2026-40895 / GHSA-r4q5-vmmm-2653), which lets an application declare extra header names that must be removed when a redirect crosses to a different host or downgrades protocol. The filter is a single case-insensitive regular expression built by concatenating the declared header names into an alternation after passing each through escapeRegex. escapeRegex escapes only a partial set of metacharacters and leaves ^, |, [, {, and } unescaped. Header names may legitimately contain ^ and | (both are valid RFC 9110 token characters that Node accepts and sends), and for a declared name containing either, the generated pattern can never match the intended header. As a result, an application that adopts this option to protect a custom credential header, then follows an attacker-controlled cross-origin redirect, forwards that credential to the attacker with no error or warning, while believing it is protected.
Affected software
| Software | Affected versions |
|---|---|
follow-redirectsnpm · osv:npm:follow-redirects |
|
About follow-redirects
- Weekly downloads (npm)
- 145,038,378npm, 17 Nov 2026
Vulnerabilities in follow-redirects
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-111756follow-redirects array-form headers bypass cross-origin credential strippingHigh 20 Oct 2026
- CVE-2026-40895follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect TargetsMedium 14 Apr 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-111755
- GitHub Advisory Database https://github.com/advisories/GHSA-8r9p-f939-6h3c