All vulnerabilities

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
Weakness
CWE-185Information exposure (CWE-200)
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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
follow-redirectsnpm · osv:npm:follow-redirects
  • From 1.16.0 before 1.16.1

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
Search the list for follow-redirects

References