# CVE-2026-40895

> Vulnerability · severity: **HIGH** (CVSS 7.5).

## Description

follow-redirects is an open source, drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. Prior to 1.16.0, when an HTTP request follows a cross-domain redirect (301/302/307/308), follow-redirects only strips authorization, proxy-authorization, and cookie headers (matched by regex at index.js). Any custom authentication header (e.g., X-API-Key, X-Auth-Token, Api-Key, Token) is forwarded verbatim to the redirect target. This vulnerability is fixed in 1.16.0.

## Key facts

- **CVE ID:** CVE-2026-40895
- **Published:** 2026-04-21
- **CVSS severity:** HIGH
- **CVSS base score:** 7.5
- **CWE codes:** CWE-200, NVD-CWE-noinfo

## Affected products

- `follow-redirects_project:follow-redirects`

## Primary sources

- NIST NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40895

## Citation

> AI Analytics. CVE-2026-40895. Retrieved 2026-07-29 from https://api.ai-analytics.org/cve/CVE-2026-40895. Derived from NIST NVD. Licensed CC0.

---

*[Dataset catalog](https://api.ai-analytics.org/datasets/) · [AI Analytics](https://api.ai-analytics.org/) · CC0 1.0*