Raw vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-40895 is a medium-severity Exposure of Sensitive Information to an Unauthorized Actor (CWE-200) vulnerability in Follow-Redirects Project Follow-Redirects. Its CVSS base score is 6.9 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Account Discovery (T1087); ranked in the top 44% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and AC-4 (Information Flow Enforcement) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2026-40895 affects the follow-redirects open-source library, a drop-in replacement for Node.js's `http` and `https` modules that automatically handles redirects. In versions prior to 1.16.0, the library fails to strip custom authentication headers—such as X-API-Key, X-Auth-Token, Api-Key, or Token—when processing cross-domain redirects (HTTP status codes 301, 302, 307, or 308). It only removes standard headers like authorization, proxy-authorization, and cookies via a regex in index.js, allowing other custom headers to be forwarded verbatim to the redirect target. The vulnerability is rated 7.5 on the CVSS 3.1 scale (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) and maps to CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor).
An attacker can exploit this by controlling a malicious server that issues a cross-domain redirect to another server they control. When a client application using vulnerable follow-redirects makes an HTTP request to the attacker's initial server—such as during a phishing lure or compromised link—the library will follow the redirect and forward any custom authentication headers present in the original request. This enables remote, unauthenticated attackers with no user interaction to steal sensitive credentials, achieving high confidentiality impact without affecting integrity or availability.
The GitHub security advisory (GHSA-r4q5-vmmm-2653) confirms the issue and states that it is fixed in follow-redirects version 1.16.0, recommending immediate upgrades for all prior versions. Practitioners should audit dependencies using tools like npm audit and verify that applications replace the library or pin to the patched version.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-24472
Vulnerability Data
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…
more
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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
- 5 hardening rules · 3 OS baselines
V14.2.8V14.3.3
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
Access enforcement directly stops unauthorized actors from obtaining sensitive information.
Information flow enforcement structurally prevents sensitive data from reaching unauthorized recipients.
Protection of information at rest prevents unauthorized exposure of stored sensitive data.
Transmission confidentiality mechanisms stop exposure of sensitive data on the wire.
Least privilege reduces the set of actors who can reach sensitive information.
Requires sanitization of media before disposal, release, or reuse, directly stopping sensitive information from remaining in resources made available to unauthorized parties.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Directly addresses removal of confidential data from process memory and similar in-use contexts before exposure.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Penetration testing and vulnerability scanning are performed to discover unintended exposure of sensitive data resulting from misconfigurations or coding errors.
Restricting anonymous or unknown access and encrypting high-value information limits the exposure of sensitive data that would otherwise be obtainable by unauthorized actors.
By requiring removal or masking of sensitive operational data before it enters test environments, the control sharply reduces the chance that such data will be exposed to unauthorized actors who have access to those environments.
Information-transfer rules can require sanitization of sensitive content before sharing.
Data masking hides sensitive data from unauthorized viewers, blocking exploitation of the exposure for masked data, but it only covers data that is explicitly masked and does not address exposures from error messages, debug logs, or indirect information leaks.
A.8.12's DLP tools detect and block transmission of sensitive content through monitored channels (email, file transfers, uploads to untrusted services), which stops exploitation of CWE-212 along those paths, but the weakness remains in the product and many disclosure vectors (API responses, channels DLP does not inspect, metadata patterns DLP does not parse) are outside the control's reach.
Hardening callouts derived
Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over our cross-walk; rows rated `none` are excluded, and each rule says how its mapping was checked.
Definition changed on 29 October 2026. Until then this section listed every rule rated above none, partial included. From that date it lists rules whose mapping is rated full or mostly and checked at llm_unverified or higher; partial mappings show when you ask.
Oracle Linux 8 (2 rules, 1 more partial)
- V-248579 OL 8 must restrict access to the kernel message buffer. blocks CWE-212
- V-248580 OL 8 must prevent kernel profiling by unprivileged users. blocks CWE-212
- V-248551 A sticky bit must be set on all OL 8 public directories to prevent unauthorized and unintended information transferred via shared system resources. blocks CWE-212
Oracle Linux 9 (1 partial rule)
- V-271745 OL 9 must restrict access to the kernel message buffer. blocks CWE-212
RHEL 8 (1 partial rule)
- V-230269 RHEL 8 must restrict access to the kernel message buffer. blocks CWE-212