CVE-2022-0536
Low · 2.6CVSS
2.6
EPSS
1.3%
Published
Feb 9, 2022
CISA due date
—
Cloudanix analysis
Some applications may accidentally send private login tokens or cookies to the wrong website when following redirects.
- Exploitation
- Adjacent Network
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Data Exposure
- Component
- Library
- Class
- Credential Exposure
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
In affected versions of the npm follow-redirects library prior to 1.14.8, sensitive request information may not be stripped correctly when an HTTP redirect is followed. If an application sends sensitive headers such as authorization tokens, cookies, or other credentials and the response redirects to a different host or less-trusted destination, those headers can be forwarded to the redirect target. The result is limited confidentiality impact: an attacker who can influence the original request target or redirect response may receive credentials intended only for the original service.
Why it matters to the business
Applications using vulnerable versions may unintentionally disclose API tokens, session cookies, or authorization headers to a redirected endpoint. In business terms, this can lead to unauthorized access to third-party services or internal APIs if leaked credentials are valid and sufficiently privileged. The public exploitation likelihood is currently low, with low EPSS, no known CISA KEV listing, and no known ransomware association, but the package is commonly used transitively in Node.js applications, so exposure can exist indirectly through dependencies.
How an attack unfolds
An attacker first needs a way to cause a vulnerable application to make an outbound HTTP or HTTPS request using follow-redirects while including sensitive headers. This could occur when an application fetches a user-supplied URL, contacts a compromised service, or communicates with a service whose redirect behavior the attacker can influence. The attacker-controlled or compromised endpoint returns an HTTP 3xx redirect to an attacker-controlled host. The vulnerable library follows the redirect and may incorrectly preserve sensitive request headers. The attacker then observes the redirected request on their server and captures the leaked credential material. The attacker can then attempt to reuse the captured token, cookie, or credential against the service for which it was originally intended.
How to fix it
Upgrade follow-redirects to version 1.14.8 or later. If consuming the library directly, update package.json and lockfiles, then rebuild and redeploy affected applications. If the dependency is transitive, update the parent package, use npm/yarn/pnpm override or resolution mechanisms where appropriate, and regenerate the lockfile. The upstream Git fix is commit 3d81dc3237b4ffe8b722bb3d1c70a7866657166e. As defense in depth, avoid sending sensitive headers to URLs influenced by users, validate outbound request destinations, disable automatic redirect following where not required, strip Authorization and Cookie headers before following cross-origin redirects, and use short-lived, least-privileged tokens.
How to confirm the fix worked
Confirm that no deployed application or container image includes follow-redirects versions prior to 1.14.8. Check package-lock.json, npm-shrinkwrap.json, yarn.lock, pnpm-lock.yaml, SBOMs, and node_modules/follow-redirects/package.json. Run dependency scanners such as npm audit, OSV-Scanner, Snyk, GitHub Dependabot, or equivalent SCA tooling and verify the finding is resolved. Functional validation can be performed in a controlled test by sending a request with a benign test Authorization header to a local server that redirects to a second host, then confirming the redirected request does not receive the sensitive header.
Typical attack path
- Identify an application or workflow that performs outbound HTTP requests using the vulnerable follow-redirects library.
- Cause the application to send a request containing sensitive headers, such as Authorization or Cookie, to a URL whose redirect behavior can be influenced.
- Return an HTTP 301, 302, 303, 307, or 308 redirect to an attacker-controlled domain or endpoint.
- Receive the redirected request and inspect headers for leaked credentials or tokens.
- Replay or use the exposed credential against the original service or related APIs, subject to token scope, expiration, and access controls.
How to detect it
There is no universal exploit signature for this issue because exploitation appears as normal outbound HTTP redirect behavior. To determine whether it was already exploited, review application, proxy, egress gateway, WAF, and HTTP client logs for outbound requests that included sensitive headers and then followed a 3xx redirect to a different host, domain, scheme, or trust boundary. Focus on requests made by Node.js services using follow-redirects before 1.14.8, especially requests to user-controlled URLs, webhook destinations, third-party integrations, URL fetchers, or previously compromised endpoints. Look for sequences where a request containing Authorization, Cookie, X-API-Key, Proxy-Authorization, or similar headers receives a 301/302/303/307/308 response and is immediately followed by a request to an unrelated domain. If full request headers were logged, search for sensitive header names in outbound requests to domains that should not receive them. If potential leakage is found, identify the exact credential, determine its scope and lifetime, revoke or rotate it, and review downstream service logs for subsequent use from unexpected IP addresses, user agents, geographies, or applications.
What your security team should do
- Inventory all Node.js applications and container images for direct or transitive use of follow-redirects prior to 1.14.8.
- Prioritize remediation for services that make outbound requests to user-supplied URLs, third-party endpoints, webhook targets, URL previewers, integrations, or any destination outside direct administrative control.
- Upgrade to follow-redirects 1.14.8 or later, or apply package-manager overrides/resolutions where transitive dependencies delay remediation.
- Review application code for outbound requests that attach Authorization, Cookie, X-API-Key, or similar sensitive headers while allowing redirects.
- Add guardrails to block or require approval for cross-origin redirects when sensitive headers are present.
- Rotate credentials if logs show sensitive headers may have been sent to untrusted redirect destinations.
- Add monitoring for unusual outbound 3xx redirect chains from backend services to unfamiliar domains.
The record
Improper Removal of Sensitive Information Before Storage or Transfer in NPM follow-redirects prior to 1.14.8.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | follow-redirects | 0 | 1.14.8 |
| Debian:11 | node-follow-redirects | 0 | 1.13.1-1+deb11u1 |
| Debian:12 | node-follow-redirects | 0 | 1.14.8+~1.14.0-1 |
| Debian:13 | node-follow-redirects | 0 | 1.14.8+~1.14.0-1 |
| Ubuntu:18.04:LTS | node-follow-redirects | 0 | No fix |
| Ubuntu:20.04:LTS | node-follow-redirects | 0 | No fix |
| Ubuntu:22.04:LTS | node-follow-redirects | 0 | No fix |
| Ubuntu:24.04:LTS | node-follow-redirects | 0 | No fix |
| Ubuntu:24.10 | node-follow-redirects | 0 | No fix |
| Ubuntu:25.04 | node-follow-redirects | 0 | No fix |
| Ubuntu:25.10 | node-follow-redirects | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | node-follow-redirects | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | node-follow-redirects | 0 | No fix |
Related vulnerabilities
- GHSA-r4q5-vmmm-2653 follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets Also affects follow-redirects
- CVE-2023-26159 Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input… Also affects follow-redirects
- CVE-2026-111756 follow-redirects is a Node.js HTTP and HTTPS client wrapper that automatically follows… CWE-212
- CVE-2026-53604 nebula-mesh is a self-hosted control plane for Slack Nebula mesh VPN. CWE-212
- CVE-2026-78658 IBM UCD - IBM UrbanCode Deploy 7.2 through 7.2.3.25, and 7.3 through 7.3.2.20 and IBM UCD… CWE-212
- CVE-2026-85094 The Canva Android App before 2.376.0 did not restrict the headers returned to an external… CWE-212
- CVE-2026-62900 Improper removal of sensitive information before storage or transfer in .NET allows an… CWE-212
- CVE-2024-5300 An access control bypass and information disclosure vulnerability exists in the base… CWE-212