Repo jacking is a supply chain attack that takes advantage of abandoned or renamed repositories and package references. An attacker can claim the name or redirect trust relationships so that future downloads or updates point to malicious content, turning a previously legitimate dependency path into an injection point.
Expanded Definition
Repo jacking is a dependency trust failure that occurs when a repository name, package reference, or maintainer path is left vulnerable to takeover after abandonment, rename, or transfer. The attacker does not need to compromise the original project; the weakness is that downstream systems continue to trust a reference that no longer points to the intended source.
In practice, the attack sits between ordinary typosquatting and classic supply chain tampering. It depends on the stability of external identifiers that build tools, package managers, and developers assume will keep resolving to the same content. Once that assumption breaks, the attacker can publish malicious code under the captured name or redirect traffic to a hostile location.
The key boundary is that repo jacking is not just a broken link. The security issue is the persistence of trust in a name that has been abandoned, recycled, or reassigned. The same pattern can affect source repositories, package registries, and automated dependency update workflows. NIST guidance on supply chain and configuration control is a useful control reference here because the failure is fundamentally about retaining trust in externally referenced assets. NIST SP 800-53 Rev 5 Security and Privacy Controls
Examples and Use Cases
Repo jacking usually appears where software teams assume a dependency pointer is permanent. The practical pattern is not limited to one ecosystem, because the same trust gap can emerge anywhere a reference outlives the original maintainer relationship.
- A package manifest still points to a repository that was renamed, and the old name is later claimed by another party.
- An internal build pipeline pulls source from a project that has been abandoned, but nobody verifies whether the repository identity still belongs to the original maintainer.
- An automated dependency updater follows redirects or rename mappings without checking whether the new destination is still authoritative.
- A downstream application imports code from a public project whose ownership changed, creating an unnoticed change in the provenance of future updates.
The common tradeoff is convenience versus provenance assurance. Stable naming and automatic resolution reduce operational friction, but they also make it easier for teams to miss when a trusted dependency path has silently changed.
Security Implications
When repo jacking succeeds, the consequence is usually silent code substitution rather than immediate outage. Teams may continue to build, test, and deploy without noticing that the source of a dependency has shifted, which makes the attack especially effective in automated delivery environments.
The most important failure condition is stale trust. If a repository reference is assumed to remain valid indefinitely, then name reuse or redirect abuse can convert a legitimate update path into a delivery channel for malicious payloads. That can affect build integrity, introduce backdoors, or create a persistent foothold in environments that regularly refresh dependencies.
Operational symptoms are often subtle: an unexpected maintainer change, a redirect that no one reviewed, or an update that looks routine but comes from a different provenance chain. The underlying problem is not only malicious content, but the absence of controls that detect when trusted package relationships have changed.
Domain and Governance Relevance
Repo jacking matters because software supply chain security depends on more than code scanning. Organisations need ownership and lifecycle awareness for repository references, package names, and redirect behaviour, especially where build systems consume third-party source automatically.
For identity and access governance, the issue is that trust is being extended to an external source identity that may no longer be under the expected control. That makes provenance, maintainership, and reference integrity part of security governance rather than a purely developer convenience problem. In NHI-heavy environments, the same lesson applies to service-owned dependencies and automation accounts that consume external code paths: once the trusted reference changes, downstream systems can inherit the wrong source without any direct authentication failure.
Repo jacking is therefore a control problem as much as a software problem. The security question is not only whether the code is malicious, but whether the organisation can still prove that the dependency it is consuming is the one it intended to trust.
Risk and Threat Considerations
Repo jacking creates supply chain exposure because trusted dependency paths can be reassigned without breaking the consuming system. That makes it a persistence-friendly attack surface: the malicious content can arrive through ordinary update mechanics and remain difficult to distinguish from legitimate maintenance.
Failure mechanism: The attacker exploits abandoned, renamed, or transferable repository references, then publishes content under the captured name or redirect target. Build tools and dependency managers continue to resolve the reference because the trust anchor is the identifier, not the human maintainer relationship.
Impact: Malicious code can enter builds, packages, or deployment pipelines through a path defenders believe is still legitimate. The result can be compromise of software integrity, propagation into multiple downstream environments, and long-lived trust contamination across automated updates.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 15 — Service Provider Management | Repo jacking changes third-party source trust and dependency provenance. |
| 2 — Inventory and Control of Software Assets | Captured repository names affect which software assets are actually pulled. | |
| Recommendation — Review external dependency ownership and revoke trust in changed or abandoned source references. Inventory dependency sources and flag renamed or abandoned repositories for review. | ||
| NIST CSF 2.0 | ID.SC-4 — Supply Chain Risk Management | Repo jacking is a software supply chain trust and provenance failure. |
| Recommendation — Track dependency provenance and validate source identity before accepting updates. | ||
| MITRE ATT&CK | T1195.002 — Compromise Software Supply Chain | Repo jacking is a recognised software supply chain compromise technique. |
| Recommendation — Map dependency takeover indicators to T1195.002 and hunt for poisoned package updates. | ||
Practitioner Guidance
Common misunderstanding: Teams often treat repository renames, redirects, and abandoned dependencies as administrative noise rather than a security event. In reality, a name transfer can be enough to alter the provenance of future downloads even when no codebase compromise has occurred.
Governance implication: Ownership of external dependencies should include lifecycle oversight, not just initial approval. When the source identity behind a dependency changes, the consuming team should treat it as a trust reassessment rather than a routine maintenance update.
Practitioner takeaway: The key judgement is whether your dependency process can detect when a trusted reference is no longer the same trusted source.
Related resources from NHI Mgmt Group
- How can organisations reduce the blast radius of repo-open exploits?
- What should security teams do if a Hugging Face repo may have exposed browser and cloud credentials?
- How can teams tell whether a suspicious AI repo has already caused credential theft?
- How should security teams govern AI-generated authorization policies in the repo?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 8, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org