Skip to content
Access control Disclosed report Intermediate CVE-2026-3582

PATs without the required scope can leak issues

A classic personal access token without the repo scope could still retrieve issues and commits from private and internal repositories through the search REST API. An attacker with such a token and existing repository access could read data that the token's scope should have prevented.

s3rdz0 Follow

Originally disclosed on HackerOne

  • Triaged in 7 hours
  • Fixed in 55 days
  • Paid in 55 days
  • Disclosed after 55 days

Summary by the program

An Incorrect Authorization vulnerability was identified in GitHub Enterprise Server that allowed an authenticated user with a classic personal access token (PAT) lacking the repo scope to retrieve issues and commits from private and internal repositories via the search REST API endpoints. The user must have had existing access to the repository through organization membership or as a collaborator for the vulnerability to be exploitable. CVE-2026-3582

The original report as published on HackerOne, by s3rdz0. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

GitHub Enterprise Server search REST API endpoints returned issues and commits from private and internal repositories to an authenticated user holding a classic personal access token (PAT) that did not carry the repo scope. The program classifies the flaw as an Incorrect Authorization issue and tracks it as CVE-2026-3582.

The precondition is important: the token holder had to already have access to the repository, either through organisation membership or as a collaborator. The bug is therefore not a way in from outside; it is a way for a token with fewer privileges than the user's own account to reach data the token was never meant to authorise.

The report gives no request, response, endpoint path, parameter, header, version number or reproduction sequence, so there is nothing to reproduce verbatim here. It also does not state a bounty amount, a CVSS score or the patch details. What it does state is the outcome in terms of classification: medium severity, weakness type Improper Access Control - Generic, disclosed on 19 March 2026, credited to the researcher s3rdz0.

Root cause

The report does not describe the root cause beyond the missing scope check on the search endpoints. In other words, authorisation was evaluated against the user behind the token rather than against the token's granted scopes.

This is a classic confused-deputy pattern. A classic PAT is a bearer credential with an explicit scope list, and every endpoint that accepts one is expected to enforce that list.

Impact

Within the stated preconditions, an attacker holding a low-scope classic PAT could read issues and commits from private and internal repositories the underlying user could already reach. The flaw let a low-scope classic PAT read issues and commits from private and internal repositories the user could already reach.

The report does not claim that the bug allowed access to repositories the user could not otherwise see, and it does not describe write access, so the impact is limited to reading issues and commits within the user's existing access.

How this kind of bug works

Personal access tokens and similar bearer credentials carry a scope set that is meant to be a hard ceiling on what the credential can do, independent of what the owning account is allowed to do. The effective permission is the intersection of the two. Bugs in this class arise when an endpoint enforces only one side of that intersection.

Common causes:

  1. Authorisation middleware resolves the user from the token and then checks resource ownership, skipping the scope check entirely.
  2. A new endpoint, or a new response field on an existing endpoint, is added without being wired into the scope enforcement layer.
  3. Search and aggregation endpoints fan out across many resources and apply checks per resource type inconsistently.
  4. GraphQL or REST gateways translate a request into internal calls that carry the user identity but not the token scope.

The defences are scope enforcement at a single choke point that every authenticated route passes through, tests that assert a low-scope token is rejected on every route that returns scoped data, and treating scope as part of the authorisation decision rather than as a UI hint.

How to test for it

  1. Create two credentials for the same account: a full-scope token and a token with the minimum scopes, deliberately omitting the scope that governs the data you are targeting.
  2. Enumerate endpoints that return the target data, including search, listing, aggregation, export and GraphQL equivalents, not just the obvious single-resource routes.
  3. Send the same request with each token and compare status codes and bodies. A positive result is the low-scope token receiving the same private or internal data as the full-scope token, or a 200 with populated results where a 403 or an empty result set is expected.
  4. Vary the resource: issues, commits, pull requests, code search, and any endpoint that accepts a repository qualifier or an organisation filter.
  5. Check whether the result set changes when the underlying user loses access, to confirm the check is on the user and not the token.

Common false positives: the low-scope token belongs to an account with broad access and the endpoint is public; the endpoint returns only metadata that is intentionally public; caching returns a stale authorised response; or the scope you omitted is not the scope that governs that resource in the first place. Confirm by testing a second account with no repository access at all, and by repeating with a freshly minted token.

How it is fixed

Regression tests should assert that a token missing the governing scope is rejected on each such route. Where a route was missed because it was added later, centralising the check in shared middleware prevents recurrence.

Hunting notes

This class hides where credentials and permissions meet: PATs, OAuth tokens, app installation tokens, API keys, and any endpoint that accepts more than one credential type. Search, export, webhook payloads, notification feeds and GraphQL resolvers are frequent offenders because they aggregate data from many sources.

Recon signals worth following: documentation that lists scopes per endpoint, changelogs announcing new search filters, and any endpoint where the documented scope requirement looks narrower than the data returned. Compare the documented scope matrix against observed behaviour rather than trusting it.

State the precondition honestly, as this report does, so the program can judge severity accurately.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

GitHub is a website where people and companies keep their code. Much of that code is private: only the people and teams who have been given access can see it.

To use GitHub from a script or a tool rather than a browser, you do not log in with a password. Instead you create a personal access token (PAT). Think of it as a temporary key card: a long string of characters that you paste into the tool, and the tool shows it to GitHub on every request. When you create the key card, you choose which doors it opens. Those choices are called scopes. A token with the repo scope can access repository content; the token in this report lacked it.

The report describes a flaw in the search part of GitHub's REST API. An API is the machine-facing side of a website: instead of a page for a human to look at, it returns raw data for a program to read. REST is simply a common style for such APIs, where each URL represents a thing (an issue, a commit, a repository) and the program asks for it with a request.

According to the program's summary, an authenticated user holding a classic PAT that did not have the repo scope could still retrieve issues and commits from private and internal repositories through the search REST API endpoints. The flaw is classified as an Incorrect Authorization issue and tracked as CVE-2026-3582. A CVE is a public catalogue number given to a known security flaw so that everyone can refer to the same thing.

The precondition matters. The person using the token had to already have access to the repository, either because they were a member of the organisation that owns it or because they were added as a collaborator. So this was not a way for a stranger to break in. It was a way for a key card with fewer permissions than its owner to reach data it was never meant to open.

The report gives no request, response, endpoint path, parameter, header, version number or reproduction sequence, so there is nothing to copy verbatim here. It also does not state a bounty amount, a CVSS score or the patch details. What it does state is the classification: medium severity, weakness type Improper Access Control - Generic, disclosed on 19 March 2026, credited to the researcher s3rdz0.

In general, how this kind of bug works

A token is a bearer credential: whoever holds it is treated as entitled to use it, much like a cinema ticket. The ticket says which film and which seat, and the usher checks the ticket, not your name. Scopes are the printed conditions on that ticket.

The key idea is that two limits apply at once. The account behind the token can see certain repositories. The token itself is allowed to do certain things. The permission that should actually apply is the overlap of the two: the smaller of the two sets. A bug of this class appears when a part of the system checks only one of the two limits.

A useful comparison is a hotel. Your room key opens your room. A master key held by reception opens many rooms. If a guest's key somehow opened another guest's room, that would be a failure of the lock, not of the guest's right to be in the building.

Common causes of this pattern:

  1. The code works out who the user is from the token, then checks whether that user may see the repository, and never checks what the token itself was granted.
  2. A new endpoint, or a new field in an existing response, is added later and is not connected to the permission check.
  3. Search and aggregation endpoints gather results from many places at once, and the checks are applied unevenly across the different kinds of result.
  4. A gateway translates one request into several internal calls that carry the user's identity but lose the token's scope along the way.

The usual defences are to enforce scope in one central place that every authenticated route must pass through, to write tests that assert a low-scope token is rejected on every route returning protected data, and to treat scope as part of the permission decision rather than as a label shown in the interface.

How to test for it

  1. Create two credentials for the same account: one with full scope, and one with the minimum scopes, deliberately leaving out the scope that governs the data you are targeting.
  2. List the endpoints that return that data, including search, listing, export and GraphQL equivalents, not just the obvious single-item routes.
  3. Send the same request with each token and compare the status codes and the bodies. A positive result is the low-scope token receiving the same private or internal data as the full-scope token, or a success response with populated results where a refusal or an empty result set is expected.
  4. Vary the resource: issues, commits, pull requests, code search, and any endpoint that accepts a repository or organisation filter.
  5. Check whether the results change when the underlying user loses access, to confirm the check is on the user and not on the token.

Common false positives: the low-scope token belongs to an account with broad access and the endpoint is public; the endpoint returns only metadata that is intentionally public; caching returns a stale authorised response; or the scope you left out is not the scope that governs that resource in the first place. Confirm by testing a second account with no repository access at all, and by repeating with a freshly created token.

How it is fixed

The report does not describe how the issue was fixed. Regression tests should assert that a token missing the governing scope is rejected on each such route. Where a route was missed because it was added later, centralising the check in shared code prevents the same mistake from recurring.

Where to look

This class of bug hides where credentials and permissions meet: personal access tokens, OAuth tokens, app installation tokens, API keys, and any endpoint that accepts more than one kind of credential. Search, export, webhook payloads, notification feeds and GraphQL resolvers are frequent offenders because they gather data from many sources.

Signals worth following during reconnaissance: documentation that lists scopes per endpoint, changelogs announcing new search filters, and any endpoint where the documented scope requirement looks narrower than the data returned. Compare the documented scope matrix against observed behaviour rather than trusting it.

State the precondition honestly, as this report does, so the program can judge severity accurately.

Glossary

  • API: the machine-facing side of a service, returning raw data to programs instead of pages to people.
  • Authentication: proving who you are, for example by presenting a token.
  • Authorization: deciding what an authenticated identity is allowed to do.
  • Bearer credential: a secret that grants access to whoever presents it, without further proof of identity.
  • Classic personal access token (PAT): a long string a user creates to let tools act on their behalf, with a chosen list of scopes.
  • Collaborator: a person given access to a specific repository.
  • Commit: a recorded change to a repository's code, with its history and message.
  • Confused deputy: a program with permission to do something being tricked into doing it for someone with less permission.
  • CVE: a public catalogue number for a known security flaw.
  • CVSS: a scoring system for the severity of a vulnerability.
  • Endpoint: a specific URL in an API that performs a particular operation.
  • GraphQL: an API style where the client asks for exactly the fields it wants in one request.
  • Header: extra information sent alongside a request or response, such as the token or the content type.
  • Incorrect Authorization: a flaw where the permission decision is wrong, allowing or denying the wrong thing.
  • Internal repository: a repository visible to members of an organisation but not to the public.
  • Issue: a tracked item in a repository, such as a bug report or task.
  • Organisation: a group account that owns repositories and manages members and teams.
  • Parameter: a named value in a request, such as a search term or a filter.
  • Private repository: a repository visible only to people explicitly granted access.
  • Request: a message a program sends to a server asking for something.
  • Response: the server's reply to a request, including a status code and a body.
  • REST: a common style for APIs where each URL represents a resource.
  • Scope: the list of permissions attached to a token, acting as a ceiling on what it can do.
  • Search endpoint: an API route that returns items matching a query across many repositories.
  • Status code: a number in a response saying how it went, such as 200 for success or 403 for refusal.
  • Vulnerability: a weakness in software that can be used to break its intended behaviour.

More from GitHub

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.