Title: Reject traversal segments when constructing raw content URLs · Issue #3103 · github/github-mcp-server · GitHub
Open Graph Title: Reject traversal segments when constructing raw content URLs · Issue #3103 · github/github-mcp-server
X Title: Reject traversal segments when constructing raw content URLs · Issue #3103 · github/github-mcp-server
Description: 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. Authori...
Open Graph Description: 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 r...
X Description: 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 r...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3103
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reject traversal segments when constructing raw content URLs","articleBody":"### Describe the bug\n\nRaw 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.\n\n### Affected version\n\nCurrent `main` as of 2026-08-19.\n\n### Steps to reproduce the behavior\n\n1. Construct a raw-content request whose content path contains parent-directory segments.\n2. Observe the URL produced by the raw client.\n3. See that normalization can consume the owner, repository, or ref path segments.\n\n### Expected vs actual behavior\n\nExpected: repository content paths cannot alter the owner, repository, or ref used to construct the outbound request.\n\nActual: path normalization can rebind those components before the request is sent.\n\n### Logs\n\nN/A","author":{"url":"https://github.com/SamMorrowDrums","@type":"Person","name":"SamMorrowDrums"},"datePublished":"2026-08-19T12:06:24Z","url":"https://github.com/github/github-mcp-server/issues/3103"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:37747bdf-1a18-ec97-3b34-0dfe56496751 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8120:161654:1C74968:25EEB5B:6B0691BB |
| html-safe-nonce | 33b306d49c1847e723d6afc248e864b8f746e187d87bd8676c82e1c53d34eaca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTIwOjE2MTY1NDoxQzc0OTY4OjI1RUVCNUI6NkIwNjkxQkIiLCJ2aXNpdG9yX2lkIjoiOTA4NDk3OTUzMzcxOTE3OTcwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 69fba93d43564a8a1b2b987eeb7890ea3734002ec08a5537b27baa6a401e833e |
| hovercard-subject-tag | issue:5192424423 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/3103/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a9a18ecb049de8c2730e5574e52eca0c316b991bf6b29dc19832749800bec737/github/github-mcp-server/issues/3103 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a9a18ecb049de8c2730e5574e52eca0c316b991bf6b29dc19832749800bec737/github/github-mcp-server/issues/3103 |
| og:image:alt | 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 r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SamMorrowDrums |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width