Executive brief
GitHub Enterprise Server contained an authorization bypass that allowed any authenticated user to read private pull request diffs and patches by replicating the target repository name and pull request number. An attacker could exploit this if they knew the target repository's name and a valid pull request number, potentially exposing sensitive code changes and proprietary information from private repositories.
Technical details
The vulnerability stemmed from access tokens for raw pull request diffs and patches being scoped to repository name and PR number rather than a globally unique repository identifier. An authenticated attacker could create a repository and pull request matching the target's naming and request number, then use their own token to retrieve the private PR's contents. This affected all versions prior to 3.22.
Affected products
- GitHub Enterprise Server all versions prior to 3.22; fixed in 3.17.21, 3.18.15, 3.19.12, 3.20.8, 3.21.6
Timeline
- 2026-09-22: disclosed