You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject traversal segments when constructing raw content URLs #3103
Raw repository-content URLs are assembled with url.URL.JoinPath. Because JoinPath normalizes dot segments, a path containing a .. segment can change the owner, repository, or ref represented by the resulting URL. Authorization remains enforced by GitHub, but the fetched content can differ from the resource URI returned to the client.
Affected version
Current main as of 2026-08-19.
Steps to reproduce the behavior
Construct a raw-content request whose content path contains parent-directory segments.
Observe the URL produced by the raw client.
See that normalization can consume the owner, repository, or ref path segments.
Expected vs actual behavior
Expected: repository content paths cannot alter the owner, repository, or ref used to construct the outbound request.
Actual: path normalization can rebind those components before the request is sent.
Activity