Repository navigation
fix(deps): update dependency urllib to v5 [security] - #76
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
renovate
Bot
force-pushed
the
renovate/npm-urllib-vulnerability
branch
from
November 5, 2026 20:04
a0a2f79 to
c9b557b
Compare
renovate
Bot
force-pushed
the
renovate/npm-urllib-vulnerability
branch
from
November 25, 2026 17:59
c9b557b to
11644fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.3.0→^5.0.0urllib's cross-origin redirects preserve credential-bearing request headers, leading to potential credential leakage
CVE-2026-55553 / GHSA-hq3h-g68c-hp78
More information
Details
Summary
urllib supports redirect-following through
followRedirect, which is expected behavior for an HTTP client. The issue is that, when following a redirect to a different origin, urllib preserves the caller-supplied request headers verbatim, including credential-bearing headers such asAuthorization,Cookie,Proxy-Authorization, and custom auth headers (x-api-key,x-auth-token,x-access-token).If the redirect target is attacker-controlled or outside the trust boundary of the original target, credentials intended for the original origin can be delivered to the redirected origin. In a local multi-library reproduction, urllib v4.9.0 was the only tested client that stripped no headers on cross-origin redirect.
Affected behavior
Confirmed against urllib v4.9.0. The relevant code is in
#requestInternal(src/HttpClient.ts:639-656):The recursive call
this.#requestInternal(nextUrl.href, options, requestContext)reuses the originaloptionsobject. If the caller supplied credential-bearing headers inoptions.headers, those headers are reused for the redirected request, regardless of whether the redirect target shares the original origin.Redirect-header handling context
The CHANGELOG suggests that redirect-related header handling has been considered before, including changes around preserving or cleaning up
Hostduring redirects. Given that context, sensitive-header stripping may be an unintentional gap rather than an explicit policy decision.Proof of Concept: 3-container topology
The reproduction uses three separate containers (
partner,attacker,client) connected over a Podman bridge network. Each container has its own hostname, port, and process, so the redirect crosses a clear origin boundary. This is not alocalhostvs127.0.0.1same-host case.The origin tuple is
(scheme, host, port):http://partner:3001http://attacker:3002The host and port both differ, so the redirect target is a different URL origin. The headers are logged in a separate process inside a separate container.
Client invocation (
client/poc.mjs):Observed result
urllib 4.9.0, Node.js 22.22.2, linux/arm64:
The
user-agentvalue confirms that the redirected request was sent by urllib v4.9.0.Independent reproduction: multi-library comparison
A separate local harness tested the same cross-origin redirect topology against multiple Node.js HTTP clients:
partner:3001 → attacker:3002redirect;The results were deterministic across runs:
authorization,cookie,proxy-authorizationauthorization,cookie,proxy-authorizationauthorization,cookieauthorization,cookieauthorization,cookieauthorizationurllibwas the only tested library that stripped no headers on cross-origin redirect. Custom auth headers such asx-api-key,x-auth-token, andx-access-tokenare an ecosystem-wide gap in this comparison. The urllib-specific issue is the absence of any strip step for standard credential-bearing headers such asAuthorization,Cookie, andProxy-Authorization.The reproduction harness is small and can be shared if useful.
Impact
This affects Node.js applications that use urllib to make authenticated HTTP requests while allowing redirects to be followed automatically.
This exposes credentials to an origin that was not the intended recipient. Depending on the credential type and server-side validation, the leaked credentials may be reusable against the original partner API or related services.
This requires no user interaction. Realistic triggers include compromised partner subdomains, DNS hijacking, malicious partner endpoints during onboarding, internal services redirecting across trust boundaries, or an open redirect upstream of urllib's call site.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
node-modules/urllib (urllib)
v5.0.0Compare Source
Upgrading from 4.x
import { request } from 'urllib'in ESM orawait import('urllib')inside an async CommonJS function. #722 · #904 · #820{ allowH2: false }torequest()orHttpClient. If you supply an undiciPoolorClientas the dispatcher, set the option when you construct it. #820err.cause.codefor HTTP/2 response-header timeouts, update your check fromUND_ERR_INFOtoUND_ERR_HEADERS_TIMEOUT. #820type-fest6, which requires TypeScript 6 or later withstrictenabled.RequestOptions.signalnow acceptsAbortSignal | EventEmitter. #995 · #820Redirects and query strings
303 See Other, it changes any method other thanGETorHEADtoGETand drops the body and content headers. If the target needs a retry, urllib retries only the target. A failed redirect after aPOSTupload no longer resends the upload. #1000GETandHEAD, urllib appends requestdatato the query string before the URL fragment. For example, adding{ page: 2 }to/search?q=node#topsends/search?q=node&page=2to the server. #1000API and diagnostics
getCookies,getSetCookies,setCookie,deleteCookie,parseCookie, and theCookietype directly fromurllib. #742res.timing.dnslookupreports milliseconds from the start of the request until DNS lookup completes. It is0on a reused socket.getDispatcherPoolStats()combines HTTP/1.1 and HTTP/2 counters for each origin. #743 · #820RequestOptionstype now includesrejectUnauthorizedfor top-levelrequest()andcurl(). For anHttpClientinstance, configureconnect.rejectUnauthorized. #919Security fixes also available in 4.x. Version 4.9.1 stopped forwarding credentials on cross-origin redirects. Version 4.9.2 added escaping for multipart filenames and field names. Both fixes are included in 5.0.0. v4.9.1 · v4.9.2
First-time contributor. @dependabot[bot] contributed #631.
Full changelog since v4.9.0
v4.9.2Compare Source
What's Changed
Full Changelog: node-modules/urllib@v4.9.1...v4.9.2
v4.9.1Compare Source
What's Changed
Security
Authorization,Cookie,Proxy-Authorization) on cross-origin redirect, and clearauth/digestAuth, matching the WHATWG Fetch spec and undici'sRedirectHandler(#812). Same-origin redirects are unchanged and the caller'soptionsobject is never mutated.Dependencies
^7.24.0), qs, form-data, formstream, and type-fest.Internal
latest-4npm dist-tag (#817).Full Changelog: node-modules/urllib@v4.9.0...v4.9.1
v4.9.0Compare Source
What's Changed
671740aby @renovate[bot] in #608Full Changelog: node-modules/urllib@v4.8.2...v4.9.0
This release is also available on:
v4.8.2Compare Source
What's Changed
New Contributors
Full Changelog: node-modules/urllib@v4.8.1...v4.8.2
This release is also available on:
v4.8.1Compare Source
4.8.1 (2025-08-06)
This release is also available on:
v4.8.0Compare Source
Features
This release is also available on:
v4.7.1Compare Source
Bug Fixes
This release is also available on:
v4.7.0Compare Source
Features
This release is also available on:
v4.6.12Compare Source
Bug Fixes
This release is also available on:
v4.6.11Compare Source
Bug Fixes
This release is also available on:
v4.6.10Compare Source
Bug Fixes
This release is also available on:
v4.6.9Compare Source
Bug Fixes
This release is also available on:
v4.6.8Compare Source
Bug Fixes
This release is also available on:
v4.6.7Compare Source
Bug Fixes
This release is also available on:
v4.6.6Compare Source
Bug Fixes
This release is also available on:
v4.6.5Compare Source
Bug Fixes
This release is also available on:
v4.6.4Compare Source
Bug Fixes
This release is also available on:
v4.6.3Compare Source
Bug Fixes
This release is also available on:
v4.6.2Compare Source
Bug Fixes
This release is also available on:
v4.6.1Compare Source
Bug Fixes
This release is also available on:
v4.6.0Compare Source
Features
v4.5.1Compare Source
Bug Fixes
This release is also available on:
v4.5.0Compare Source
Features
This release is also available on:
v4.4.0Compare Source
Features
This release is also available on:
v4.3.1Compare Source
Bug Fixes
This release is also available on:
v4.3.0Compare Source
Features
This release is also available on:
v4.2.2Compare Source
Bug Fixes
This release is also available on:
v4.2.1Compare Source
Bug Fixes
This release is also available on:
v4.2.0Compare Source
Features
This release is also available on:
v4.1.0Compare Source
Features
This release is also available on:
v4.0.0Compare Source
⚠ BREAKING CHANGES
part of eggjs/egg#3644
Summary by CodeRabbit
New Features
README.md.HttpClient.Bug Fixes
Socketmethods.Refactor
Revised
exportsandscriptsinpackage.jsonfor betterconsistency.
subscribefunction in diagnostics channel.Chores
.eslintrc.tsconfig.json.Documentation
contributors-imginREADME.md.Tests
Refined import paths and added new imports for better error handling
in test files.
Features
This release is also available on:
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
This change is