Repo Jacking: How GitHub exposes over 70,000 projects to remote code injection
Where
Day 2 Stream 1
BSides Las Vegas
Duration
36 min
Explains how reclaimed GitHub usernames let attackers hijack repositories and inject code into dependent open-source projects.
Summary
The talk examines repo jacking, a supply chain weakness in which a GitHub username that has been renamed or deleted can be registered by anyone else. Any dependency that still points at the old name then loads code from the new owner's account, which can lead to code injection without the dependent project changing anything. The speaker describes how the issue was first noticed during a code review, when a dependency URL redirected to a different repository and, once the original account was free, could be taken over.
The speaker explains why renames and transfers are more dangerous than outright deletions, because GitHub's repository redirects keep old URLs working and so hide the exposure. GitHub's earlier mitigation blocked re-registration only for repositories with more than 100 clones in the week before a rename, which the speaker judged insufficient for small, rarely cloned libraries. The mass analysis combined GitHub's source archive with libraries.io dependency data, finding roughly 50,000 unregistered usernames, about 18,000 directly vulnerable projects, and around 70,000 impacted projects once transitive dependencies were followed to depth five.
For practitioners, the main advice is to avoid linking directly to GitHub repositories and to rely on package managers instead. Where direct links cannot be avoided, pinning to a full commit hash is safer than pinning to a tag or branch, though the speaker found that pinning can be bypassed in some package managers. Lock files help only where they carry integrity checks for the fetched code.
Related talks
Proving Ground·19 min
Krity Kharbanda · Harini Ramprasad
Explains how software bill of materials help teams track dependencies, find vulnerable components and manage supply chain risk.
Talks·51 min
James Scott
Covers ten open source risks beyond known vulnerabilities, from compromised packages to untracked and oversized dependencies.
Talks·54 min
Akanksha Pathak
Shows startups how to secure their software supply chain using free tools, SBOMs, and low-cost vendor controls.


