GitBleed – Finding Secrets in Mirrored Git Repositories – CVE-2022-24975
Git's clone and mirror behaviours differ, so a mirrored copy of a repository can contain data that a normal clone does not show. An attacker who can obtain a mirror of a repository may therefore see secrets that were thought to have been removed.
Nightwatch Cybersecurity Follow
Published on wwws.nightwatchcybersecurity.com
Due to a discrepancy in Git behavior, partial parts of a source code repository are visible when making copies via the “git clone” command. There are additional parts of the repository that only become visible when using the “–mirror” option.
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, Git's clone and mirror operations expose different sets of repository data, so a mirror retains objects that a normal clone omits.
Impact
Secrets that were not properly removed from a repository could be exposed to anyone who can obtain a mirror copy of it.
What the attacker needed
Ability to mirror the repository
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.
Git is a tool for tracking versions of source code. When you copy a project with it, some old data is normally left out, but a special kind of copy called a mirror keeps more of it. If someone put a password or key into the project and later deleted it, that value can still be inside the mirror copy.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.