Skip to main content
VulnerabilityPublished Updated

CVE-2026-40895: follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets

Affects follow-redirectsSource GCVE Database

0
Compare
Authoritative record:CVE-2026-40895· Medium 6.9

Not known to be exploited · CVSS 6.9 Medium : upgrade to 1.16.0 when convenient.

Data as of 3 Nov 2026, 00:30 UTC

CVSS 4.0 base score
6.9Medium
How severe the flaw is on the 0–10 CVSS scale.

Sources agree

CVSS scores by source
CNA (GitHub_M)CVSS 4.06.9
ADP (redhat-SADP)CVSS 3.17.5
Patch
Available – fixed in 1.16.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2 Nov 2026.

What to do

Upgrade follow-redirects to 1.16.0.

Affected software

ProductAffectedFixed in
npmfollow-redirectsAffected
  • <1.16.0
Fixed in
  • 1.16.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in follow-redirects version 1.16.0 that addresses this issue by properly handling custom authentication headers on cross-domain redirects. Users should upgrade to version 1.16.0 or later. Alternatively, users can configure the library to strip all non-standard headers on cross-domain redirects. No other mitigation is required once the patch is applied.

Description

The follow-redirects library used by axios in Node.js versions prior to 1.16.0 does not strip custom authentication headers on cross-domain HTTP redirects. Only standard headers like authorization, proxy-authorization, and cookie are removed, allowing headers such as X-API-Key or X-Auth-Token to be forwarded to potentially malicious redirect targets. This can lead to leakage of sensitive authentication tokens to attacker-controlled domains.

References

Community reviews

Loading reviews…