/

CVE-2026-55553

Severity:

HIGH RISK

(7.5)

Credential Leakage (CWE-200) in Node.js urllib Redirects

CVE-2026-55553

Deferred

Vulnerability type

Category:

Sensitive Information Exposure

CWE:

CWE-200, CWE-201, CWE-522

Impact:

Credential and Sensitive Data Exposure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A redirect-handling flaw in the Node.js urllib HTTP client can carry caller-supplied authentication and sensitive headers from one origin to a different redirect target. If an application follows redirects to an untrusted or unintended scheme, host, or port, credentials may be disclosed and potentially reused by another service.

Affected context

The vulnerability occurs in urllib deployments that enable redirect following while retaining request options across redirect destinations. It becomes risky when a redirect crosses an origin boundary and the original request includes authorization headers, cookies, proxy credentials, API keys, authentication tokens, or digest authentication values. The exposure depends on the application's redirect policy and the trustworthiness of redirect targets.

Exploit preconditions

  • Attack surface: HTTP requests made through urllib with redirect following enabled
  • Required access: Ability to cause or influence a requested resource to return a redirect, or control a reachable redirect destination
  • Trigger point: Processing a redirect to a different scheme, host, or port
  • Why exploitation is possible: Caller-supplied headers and authentication options are reused for the redirected request without sufficient origin-boundary filtering

Why this happens

The underlying bug is improper preservation of sensitive request state across origin changes. The redirect implementation recursively reuses the original request options, allowing credentials and security-sensitive headers to accompany a request sent to a different destination. This maps primarily to CWE-200, Exposure of Sensitive Information to an Unauthorized Actor, and is also related to CWE-201 and CWE-522 because transmitted credentials and authentication data are not adequately constrained to their intended origin.

Potential impact

  • An attacker could receive authorization headers, cookies, API keys, or access tokens.
  • Exposed credentials could be replayed against the original partner API or related services.
  • Proxy authentication data could be disclosed to an unintended endpoint.
  • A compromised token could enable unauthorized access, data retrieval, or account actions.
  • Sensitive request metadata could be exposed across network or service boundaries.

General mitigation guidance

Mitigation generally focuses on treating redirects as security-sensitive

origin transitions rather than transparent continuation requests.

Common defensive patterns include:

  • Strip authorization, cookie, proxy-authorization, API-key, and token headers when a redirect changes scheme, host, or port.
  • Rebuild authentication state only after independently validating the destination and its trust relationship.
  • Prefer redirect policies that allow only explicitly trusted origins and schemes.
  • Avoid sending bearer credentials or long-lived secrets to destinations selected from untrusted input.
  • Use narrowly scoped, short-lived credentials with least privilege.
  • Preserve sensitive headers only when the destination remains within a validated origin boundary.

How teams detect issues like this

Organizations can identify related issues through:

  • Static analysis searches for redirect handlers that reuse mutable request options or headers.
  • Code review checks for credential propagation across scheme, host, or port changes.
  • Tests that verify sensitive headers are removed during cross-origin redirects.
  • Runtime logging and policy enforcement for redirect destinations, without recording credential values.
  • Dependency and software composition analysis for HTTP clients with known redirect-handling weaknesses.

Sources

SourceLink
github.comgithub.com/node-modules/urllib/commit/7c86c465883ebd3dea5109c87d7bbe3b00960a16
github.comgithub.com/node-modules/urllib/commit/811a8d56e64e540bf6a19bf8b3737692f05d5c46
github.comgithub.com/node-modules/urllib/pull/812
github.comgithub.com/node-modules/urllib/pull/813
github.comgithub.com/node-modules/urllib/releases/tag/v2.44.1
github.comgithub.com/node-modules/urllib/releases/tag/v4.9.1
github.comgithub.com/node-modules/urllib/security/advisories/GHSA-hq3h-g68c-hp78

Frequently asked

questions

Yes, when an application follows a redirect that an attacker can influence or

when a trusted service redirects requests to an attacker-controlled origin.

The attacker generally does not need local access to the application.

The attacker must be able to influence a redirect response or control a

destination that the client will follow. No user interaction is necessarily

required once the vulnerable request is made.

Treat every cross-origin redirect as a new security context, remove

sensitive headers and authentication state, and permit credential forwarding

only to explicitly trusted destinations.

Combine origin-aware redirect policies, least-privilege short-lived

credentials, automated tests for header leakage, dependency review, and

code-review rules that flag credential reuse across redirect boundaries.

Find out what's already
exploitable in your codebase.