Skip to main content

follow-redirects EUVDEUVD-2026-24472

| CVE-2026-40895 MEDIUM
Information Exposure (CWE-200)
2026-04-21 GitHub_M
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    App sends HTTP request with X-API-Key header
  2. Delivery
    Attacker-influenced server returns 302 cross-domain redirect
  3. Exploit
    follow-redirects follows redirect without stripping custom headers
  4. Execution
    X-API-Key forwarded verbatim to attacker-controlled domain
  5. Persist
    Attacker captures credential from server logs
  6. Impact
    Replays token against original API for unauthorized access

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target application uses follow-redirects < 1.16.0, directly or transitively via axios, and sets a non-standard custom authentication header such as X-API-Key, X-Auth-Token, Api-Key, or Token on outbound requests - standard Authorization and Cookie headers are already stripped and are not affected; (2) the application communicates with a server that can be made to return a cross-domain HTTP redirect (301/302/307/308), whether through an open-redirect flaw in that server, an attacker-in-the-middle position, or a compromised upstream API; (3) the attacker controls or can monitor the redirect target domain. CVSS PR:N confirms no attacker-side authentication is required. Applications that restrict outbound HTTP destinations to fully trusted, non-redirecting endpoints, or that do not use custom auth headers, are not at meaningful risk.

Impact

The CVSS 4.0 base score of 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L) correctly reflects a network-reachable, low-complexity flaw with limited, partial confidentiality impact per the SSVC assessment of 'Technical Impact: partial'. However, when the leaked header is a long-lived API key or session token, the downstream consequence can exceed what 'low' confidentiality suggests - stolen credentials may enable full account takeover of the protected service. Counterbalancing this, the EPSS score of 0.05% (15th percentile) and SSVC 'Exploitation: none' confirm no active exploitation at time of analysis; the flaw is also not listed in CISA KEV. Critically, SSVC flags 'Automatable: no', because the attacker must influence a specific server to return a cross-domain redirect - mass scanning is not a viable approach. On balance, this is a genuine but contextually scoped risk: high priority for Node.js applications making authenticated outbound requests to potentially untrusted or redirect-capable servers, lower priority for applications with fully controlled server environments.

Exploit ScenarioDerived

An attacker who controls or has compromised a web service that the target Node.js application communicates with causes that service to return a 302 redirect pointing to an attacker-owned domain. The axios client, via follow-redirects, automatically follows the redirect and forwards the X-API-Key: sk-live-secret123 header to the attacker's server, where it is logged. The attacker then replays the captured key directly against the original API to gain unauthorized access with the victim application's privileges.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Custom authentication header leakage in follow-redirects before 1.16.0 exposes API keys and session tokens whenever an HTTP request follows a cross-domain redirect. The header-stripping regex at index.js:469-476 only covers authorization, proxy-authorization, and cookie, leaving headers such as X-API-Key, X-Auth-Token, and Token forwarded verbatim to the redirect destination. Because follow-redirects is the redirect-handling dependency for axios (105K+ GitHub stars), this flaw has broad reach across the Node.js ecosystem; no public exploit code has been identified at time of analysis, though a fully detailed GHSA advisory with a working attack scenario is publicly available.

RemediationAI

Upgrade follow-redirects to version 1.16.0 or later; the upstream patch is available at commit 844c4d302ac963d29bdb5dc1754ec7df3d70d7f9 in the follow-redirects repository (GHSA-r4q5-vmmm-2653). If using axios, update to a release that pins follow-redirects >= 1.16.0, or explicitly override the dependency in your package.json. Red Hat customers should apply the relevant RHSA errata listed above. Where an immediate upgrade is blocked, a viable compensating control is to avoid setting custom authentication headers in axios instance defaults or global config; instead, apply them selectively via request interceptors that check whether the request host matches the intended domain before attaching the header - this prevents headers from riding along on any automatic redirect. Note this workaround adds interceptor maintenance overhead and must be applied consistently across every axios instance in the application.

Affected VersionsENISA

follow-redirects < 1.16.0

Affected Packages

npm follow-redirects fix: 1.16.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

follow-redirects (CPE: cpe:2.3:a:follow-redirects:follow-redirects:*:*:*:*:*:*:*:*) is an npm package that transparently replaces Node.js's built-in http and https modules with automatic redirect-following behaviour. The root cause (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) is a narrow header-sanitisation regex at index.js lines 469-476: /^(?:(?:proxy-)?authorization|cookie)$/i. This regex fires only when a redirect crosses domain or protocol boundaries, but because it does not cover non-standard header names, any custom credential header escapes sanitisation and is sent to the third-party redirect target. The package is a transitive dependency of axios, meaning virtually all axios-based Node.js applications inherit the exposure when they set custom authentication headers.

Know when Follow Redirects gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.9 MEDIUM
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
vuln.today AI 5.3 MEDIUM

Network-triggered with low complexity since redirect following is automatic; no attacker privileges needed; confidentiality impact limited to the leaked header value with no integrity or availability consequence.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch released
Apr 23, 2026 - 15:54 nvd
Patch available
Patch available
Apr 21, 2026 - 22:17 EUVD
CVSS changed
Apr 21, 2026 - 21:22 NVD
6.9 (MEDIUM)
CVE Published
Apr 21, 2026 - 19:59 nvd
MEDIUM 6.9

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 315 npm packages depend on follow-redirects (16 direct, 299 indirect)

Ecosystem-wide dependent count for version 1.16.0.

Threat Intelligence Overview

EPSS Score
0.1%
Top 85% exploitable
Prevalence
High
transitive dependency of axios, 105K+ GitHub stars, ubiquitous in Node.js
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

References

Advisories & patches
ADVISORY https://vuldb.com/vuln/358584 REF https://access.redhat.com/errata/RHSA-2026:13826 REF https://access.redhat.com/errata/RHSA-2026:14937 REF https://access.redhat.com/errata/RHSA-2026:16476 REF https://access.redhat.com/errata/RHSA-2026:16532 REF https://access.redhat.com/errata/RHSA-2026:16534 REF https://access.redhat.com/errata/RHSA-2026:16535 REF https://access.redhat.com/errata/RHSA-2026:16542 REF https://access.redhat.com/errata/RHSA-2026:16874 REF https://access.redhat.com/errata/RHSA-2026:17657 REF https://access.redhat.com/errata/RHSA-2026:17699 REF https://access.redhat.com/errata/RHSA-2026:17789 REF https://access.redhat.com/errata/RHSA-2026:19109 REF https://access.redhat.com/errata/RHSA-2026:19375 REF https://access.redhat.com/errata/RHSA-2026:19712 REF https://access.redhat.com/errata/RHSA-2026:20889 REF https://access.redhat.com/errata/RHSA-2026:20938 REF https://access.redhat.com/errata/RHSA-2026:21017 REF https://access.redhat.com/errata/RHSA-2026:21338 REF https://access.redhat.com/errata/RHSA-2026:21772 REF https://access.redhat.com/errata/RHSA-2026:22465 REF https://access.redhat.com/errata/RHSA-2026:22629 REF https://access.redhat.com/errata/RHSA-2026:22840 REF https://access.redhat.com/errata/RHSA-2026:23361 REF https://access.redhat.com/errata/RHSA-2026:24536 REF https://access.redhat.com/errata/RHSA-2026:24539 REF https://access.redhat.com/errata/RHSA-2026:24766 REF https://access.redhat.com/errata/RHSA-2026:24853 REF https://access.redhat.com/errata/RHSA-2026:24977 REF https://access.redhat.com/errata/RHSA-2026:25271 REF https://access.redhat.com/errata/RHSA-2026:25273 REF https://access.redhat.com/errata/RHSA-2026:26010 REF https://access.redhat.com/errata/RHSA-2026:27004 REF https://access.redhat.com/errata/RHSA-2026:27044 REF https://access.redhat.com/errata/RHSA-2026:27063 REF https://access.redhat.com/errata/RHSA-2026:36882 REF https://access.redhat.com/errata/RHSA-2026:40768 REF https://access.redhat.com/errata/RHSA-2026:41928 REF https://access.redhat.com/errata/RHSA-2026:44235 REF https://access.redhat.com/errata/RHSA-2026:44263 REF https://access.redhat.com/errata/RHSA-2026:44267 REF https://access.redhat.com/errata/RHSA-2026:47728 REF https://access.redhat.com/errata/RHSA-2026:48699 REF https://access.redhat.com/errata/RHSA-2026:50300 REF https://access.redhat.com/errata/RHSA-2026:65126 REF https://access.redhat.com/security/cve/CVE-2026-40895 REF https://bugzilla.redhat.com/show_bug.cgi?id=2460297 REF https://github.com/follow-redirects/follow-redirects/commit/844c4d302ac963d29bdb5dc1754ec7df3d70d7f9 REF https://github.com/follow-redirects/follow-redirects/security/advisories/GHSA-r4q5-vmmm-2653 REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40895.json

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy