CVE-2026-40895: follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets
Affects follow-redirectsSource GCVE Database
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
Sources agree
| CNA (GitHub_M) | CVSS 4.0 | 6.9 |
|---|---|---|
| ADP (redhat-SADP) | CVSS 3.1 | 7.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:NExploitation evidence
Disclosed: evidence found.
CVE published 21 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
| npmfollow-redirects | Affected
| Fixed in
|
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
- github.com/follow-redirects/follow-redirects/security/advisories/GHSA-r4q5-vmmm-2653 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-40895 (opens in a new tab)
- github.com/follow-redirects/follow-redirects/commit/844c4d302ac963d29bdb5dc1754ec7df3d70d7f9 (opens in a new tab)
- github.com/follow-redirects/follow-redirects (opens in a new tab)