View private repository NWO of deploy key via internal LFS API
A vulnerability exposed the names of private repositories that use deploy keys, allowing an attacker to enumerate them. It did not permit access to repository content beyond the name.
- Triaged in 3 hours
- Fixed in 3 months
- Paid in 3 months
- Disclosed after 3 months
Summary by the program
An exposure of sensitive information vulnerability in GitHub Enterprise Server would allow an attacker to enumerate the names of private repositories that utilize deploy keys. This vulnerability did not allow unauthorized access to any repository content besides the name. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.14 and was fixed in versions 3.13.1, 3.12.6, 3.11.12, 3.10.14, and 3.9.17.
What the report shows
The target is GitHub Enterprise Server, and the feature involved is deploy keys together with the internal LFS API. The report is short: the platform's own summary describes the finding as an exposure of sensitive information that would let an attacker enumerate the names of private repositories that use deploy keys. The summary is explicit that nothing beyond the repository name was reachable: the bug did not allow unauthorised access to any repository content.
The affected range is stated plainly: all versions of GitHub Enterprise Server prior to 3.14. The fix shipped in 3.13.1, 3.12.6, 3.11.12, 3.10.14 and 3.9.17. The weakness is classified as improper access control (generic) and the severity as medium. The report does not include the individual requests, parameters or responses that produced the enumeration, so the exact call sequence is not reproduced here.
Root cause
The report does not describe the root cause in detail; it frames the finding as an access control failure. Deploy keys are scoped to a single repository, so an endpoint that answers "which repository does this key belong to?" should only answer for callers entitled to know.
Impact
The impact is limited to information disclosure: enumeration of private repository names tied to deploy keys. The report is careful to say that no repository content was accessible, so the practical value to an attacker is reconnaissance, not code theft. Knowing that a named private repository exists and uses deploy keys can support further targeting, but on its own it is a low-to-medium signal, which matches the medium severity.
How this kind of bug works
Access control bugs of this shape arise when an endpoint is built for one caller (an internal service, a CI job, a deploy key holder) and then becomes reachable by another, or when the handler authenticates the caller but never checks that the caller is entitled to the specific object being returned. Internal APIs are a common home for this because they are often assumed to sit behind a trust boundary that the public edge does not actually enforce. The result is an object-level authorisation gap: the request is valid and the identity is real, but the relationship between identity and object is never verified.
Defences are straightforward in principle: enforce object-level authorisation on every handler, including internal ones; treat internal endpoints as untrusted and route them through the same checks as public ones; and return a uniform not-found response for objects the caller may not see, so existence itself does not leak.
How to test for it
- Map the internal and auxiliary APIs the product exposes: LFS, Git LFS batch endpoints, key lookups, and anything that resolves a credential to an object. Look for endpoints referenced in client code, mobile apps or documentation but not in the main API surface.
- Obtain a low-privilege credential of the relevant type, such as a deploy key or a scoped token, and identify the object it is bound to.
- Send requests that ask the endpoint to resolve that credential to an object, and vary identifiers in the request to point at objects you should not see. A positive result is a response that reveals a name, owner or identifier of an object your credential is not scoped to.
- Compare responses for objects you can and cannot legitimately access. Differences in status code, error text or timing between "exists but forbidden" and "does not exist" are the signal.
Common false positives: the endpoint returning only data your credential is already entitled to; names that are public anyway; and error messages that differ for reasons unrelated to authorisation, such as malformed input. Confirm the leak by repeating with a second credential that should not see the object.
How it is fixed
The report states only that the vulnerability was fixed in versions 3.13.1, 3.12.6, 3.11.12, 3.10.14 and 3.9.17. The fix shipped in versions 3.13.1, 3.12.6, 3.11.12, 3.10.14 and 3.9.17.
Hunting notes
This class of bug tends to hide in internal service APIs, admin or support tooling, and credential-resolution endpoints that were written for one consumer and later exposed more widely. Recon signals include endpoints that take a key or token and return object metadata, and any place where the client asks "what does this credential belong to?". To make a report land, show the exact request, the credential's intended scope, the object you should not see, and the response proving the leak, and state clearly what was and was not accessible.
What happened, in plain words
GitHub Enterprise Server is a version of GitHub that a company can run on its own computers, inside its own network, instead of using github.com. It has the same kind of features as the public site: repositories (project folders that hold code and its history), private repositories (visible only to chosen people), and deploy keys.
A deploy key is a small piece of cryptographic credential, a key, that is attached to exactly one repository. It is normally used by an automated system, such as a server that pulls the latest code to deploy it, so that the machine can read that one repository without a human password. Because a deploy key belongs to a single repository, it should never be able to tell you anything about any other repository.
Large files in a repository are often stored through a system called Git LFS (Large File Storage). Instead of keeping a big file inside the repository itself, Git LFS keeps a small pointer there and stores the actual file elsewhere, fetching it through a separate API, a set of web addresses that programs call to get things done. GitHub Enterprise Server has an internal LFS API for this purpose.
The report describes a flaw in that internal LFS API. It let an attacker enumerate the names of private repositories that use deploy keys. The platform's summary calls this an exposure of sensitive information: an attacker could enumerate, meaning list out one by one, the names of private repositories that use deploy keys.
The summary is equally clear about the limit: the bug did not allow unauthorised access to any repository content besides the name. No code, no files, no history. What leaked was the fact that a named private repository exists and uses deploy keys.
The affected range is stated plainly: all versions of GitHub Enterprise Server prior to 3.14. The fix shipped in versions 3.13.1, 3.12.6, 3.11.12, 3.10.14 and 3.9.17. The weakness is classified as improper access control (generic) and the severity as medium. The report does not include the individual requests, parameters or responses that produced the enumeration, so the exact call sequence is not reproduced here.
Why does a name matter? On its own, not much: it is reconnaissance, a first look around, rather than theft. But knowing that a particular private repository exists, and that it relies on deploy keys, gives an attacker a target to aim further work at. That fits the medium severity: a real leak, but a narrow one.
In general, how this kind of bug works
This is an access control bug. Access control is the part of a system that decides who is allowed to see or do what. A simple everyday comparison: a hotel reception desk that will confirm whether a guest is staying in room 412, but only to someone who is entitled to know. If the receptionist answers that question for anyone who walks in, the hotel has an access control problem even though no room was entered.
Bugs of this shape usually arise in one of two ways. Either an endpoint (a single web address that a program can call) was built for one kind of caller, such as an internal service or a CI job (an automated build and test pipeline), and later became reachable by another kind of caller. Or the handler (the code that answers the request) checks that the caller is authenticated, meaning it has a real identity, but never checks that this identity is entitled to the specific object being returned. The request is valid, the identity is real, but the relationship between the two is never verified. This is often called an object-level authorisation gap.
Internal APIs are a common home for this because people assume they sit safely behind a trust boundary, a line that outside callers cannot cross, when in reality the public edge does not enforce that line.
The defences are straightforward in principle:
- Enforce object-level authorisation on every handler, including internal ones: check not just who is calling, but whether this caller may see this particular object.
- Treat internal endpoints as untrusted and route them through the same checks as public ones.
- Return a uniform not-found response for objects the caller may not see, so that the very existence of an object does not leak through different error messages.
In general, how to test for it
- Map the internal and auxiliary APIs the product exposes: LFS, Git LFS batch endpoints, key lookups, and anything that resolves a credential to an object. Look for endpoints referenced in client code, mobile apps or documentation but not in the main API surface.
- Obtain a low-privilege credential of the relevant type, such as a deploy key or a scoped token, and identify the object it is bound to.
- Send requests that ask the endpoint to resolve that credential to an object, and vary identifiers in the request to point at objects you should not see. A positive result is a response that reveals a name, owner or identifier of an object your credential is not scoped to.
- Compare responses for objects you can and cannot legitimately access. Differences in status code, error text or timing between "exists but forbidden" and "does not exist" are the signal.
Common false positives: the endpoint returning only data your credential is already entitled to; names that are public anyway; and error messages that differ for reasons unrelated to authorisation, such as malformed input. Confirm the leak by repeating with a second credential that should not see the object.
In general, how it is fixed
The report states only that the vulnerability was fixed in versions 3.13.1, 3.12.6, 3.11.12, 3.10.14 and 3.9.17.
In general, where to hunt
This class of bug tends to hide in internal service APIs, admin or support tooling, and credential-resolution endpoints that were written for one consumer and later exposed more widely. Recon signals include endpoints that take a key or token and return object metadata, and any place where the client asks "what does this credential belong to?". To make a report land, show the exact request, the credential's intended scope, the object you should not see, and the response proving the leak, and state clearly what was and was not accessible.
Glossary
- GitHub Enterprise Server: a self-hosted edition of GitHub that an organisation runs on its own infrastructure.
- Repository: a project folder holding code and its change history.
- Private repository: a repository visible only to people who have been granted access.
- Deploy key: a cryptographic key attached to exactly one repository, typically used by an automated system to read that repository.
- Git LFS (Large File Storage): a system that stores large files outside the repository and fetches them through a separate API.
- API: a set of web addresses and rules that programs use to talk to a service.
- Endpoint: one specific web address that a program can call.
- Request: a message a browser or program sends to a server asking it to do something.
- Response: the message a server sends back.
- Parameter: a named value included in a request, such as an identifier.
- Credential: a secret that proves an identity, such as a key or token.
- Token: a string that acts like a temporary password for a program.
- Enumeration: listing items out one by one, here the names of private repositories.
- Exposure of sensitive information: a flaw that reveals data the caller should not be able to see.
- Access control: the part of a system that decides who may see or do what.
- Improper access control: a flaw where those decisions are missing or wrong.
- Object-level authorisation: checking that a specific caller may access a specific object, not just that the caller is logged in.
- Authentication: proving who you are.
- Authorisation: deciding what you are allowed to do once identified.
- Handler: the code that processes a request and produces a response.
- Trust boundary: a line between systems or zones that is assumed to keep untrusted callers out.
- CI job: an automated build and test pipeline.
- Reconnaissance: the early information-gathering phase of an attack.
- False positive: a finding that looks like a bug but is not.
- Status code: the number in a response, such as 200 or 404, that summarises the outcome.
- Severity: a rating of how serious a vulnerability is, here medium.
- NWO (name with owner): the full name of a repository including its owner, such as owner/repository.