Describe the bug
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.
Logs
N/A
Describe the bug
Raw repository-content URLs are assembled with
url.URL.JoinPath. BecauseJoinPathnormalizes 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
mainas of 2026-08-19.Steps to reproduce the behavior
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.
Logs
N/A