Phantom Secrets: Undetected Secrets Expose Major Corporations
Secrets scanning tools that rely on a standard git clone miss secrets that are only reachable through a mirror clone, such as those in pull request references or dangling remote-tracking branches. Attackers who use mirror clones can find these secrets and gain access to cloud environments, internal infrastructure, and telemetry platforms.
Published on aquasec.com
Yakir KadkodaIlay Goldman
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the root cause is that standard git clone does not fetch all references (such as pull request refs and dangling remote-tracking branches) that a mirror clone does, so secrets in those references remain unscanned.
Impact
Attackers could gain access to cloud environments, internal fuzzing infrastructure, telemetry platforms, network devices, and camera footage, and could potentially manipulate fuzzing data to hide vulnerabilities.
What the attacker needed
Public repository with secrets in refs; attacker can run git clone --mirror; secret remains valid
How it was found
- Clone the repository using git clone --mirror to fetch all references.
- Scan the mirrored repository for secrets that are not present in a regular clone.
- Use the discovered secret to access the associated service or infrastructure.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When developers accidentally put passwords or API keys into code, they often try to remove them later. But some copies of that code, such as those kept for pull requests, can still contain the secret. Most security scanners only look at the normal copy of the code, so they miss these hidden copies. An attacker who knows where to look can find the secret and use it to break in.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.