-
Notifications
You must be signed in to change notification settings - Fork 0
security(coverage): reject cross-origin uv redirects before any redirected request #751
Copy link
Copy link
Open
Labels
area: apiAPI, protocol, event, or external contractAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionSecurity boundary, hardening, or vulnerability preventionbugSomething isn't workingSomething isn't workingpriority: highHigh-priority or P1 workHigh-priority or P1 workstatus: triagedOpen issue has an organization taxonomy assignmentOpen issue has an organization taxonomy assignmenttype: securitySecurity vulnerability or security-specific remediationSecurity vulnerability or security-specific remediation
Description
Activity
Metadata
Metadata
Assignees
Labels
area: apiAPI, protocol, event, or external contractAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionSecurity boundary, hardening, or vulnerability preventionbugSomething isn't workingSomething isn't workingpriority: highHigh-priority or P1 workHigh-priority or P1 workstatus: triagedOpen issue has an organization taxonomy assignmentOpen issue has an organization taxonomy assignmenttype: securitySecurity vulnerability or security-specific remediationSecurity vulnerability or security-specific remediation
Problem
The trusted uv downloader starts from a literal HTTPS URL and verifies both the final origin and the archive SHA-256. However,
urllib.request.urlopenfollows an HTTP redirect beforeresponse.geturl()can verify the destination. A compromised or misconfigured release origin could therefore cause one unintended request to an internal or cross-origin address even though the returned bytes would later fail the origin or digest check.The current digest pin protects executable identity; it does not by itself prevent the redirected network side effect.
Required fix
file:, loopback, link-local, private-network, alternate-port, userinfo, or cross-origin target.TDD contract
file:, localhost, RFC 1918, link-local, IPv6 loopback, a different public host, or a nonstandard port produces zero requests to that target.Sequencing
Address before #743 becomes ready for merge. Keep this transport hardening independent from the exact-base uv-workspace reconstruction tracked in #750.