ChainJacking is a software supply chain attack in which an attacker takes over an abandoned or redirected repository path and uses it to serve malicious code. In Go ecosystems, the risk is amplified because packages can be fetched directly from version control, allowing trust in the old namespace to be abused downstream.
Expanded Definition
ChainJacking is a software supply chain attack that abuses namespace continuity. The attacker does not need to break the original package directly; instead, they exploit an abandoned, renamed, or redirected repository path so downstream tools keep trusting the old location.
That distinction matters because modern dependency resolution often treats a path as a stable identifier. In ecosystems such as Go, where packages can be fetched directly from version control, the repository path itself can become part of the trust decision. If the old path is later reused or redirected, consumers may pull code from a source they still assume is legitimate.
The term is closely related to repository hijacking, dependency takeover, and package confusion, but it is narrower than generic supply chain compromise. It focuses on the abuse of a previously trusted path, not just any malicious package publication. For a useful technical baseline on supply-chain integrity controls, SLSA helps frame provenance and verification requirements that reduce path-trust failure.
A common misunderstanding is to treat the package name as the trust anchor when the real risk is the combination of name, path, and fetch behaviour. The security issue is not only that malicious code is present, but that the ecosystem may still believe it is consuming the original software relationship.
Examples and Use Cases
ChainJacking tends to appear where dependency tooling, source control history, and developer convenience intersect. Typical cases include:
- a maintainer abandons a repository, and the path later resolves to a new owner who can publish incompatible or malicious code;
- a project is renamed, but old import paths still work through redirects, leaving a long tail of consumers attached to legacy trust;
- a package is fetched directly from VCS, so a stale repository reference becomes a live delivery channel;
- internal build systems mirror dependency paths without revalidating whether the original publisher still controls them.
In practice, the tradeoff is between convenience and explicit verification. Easy path-based retrieval speeds development, but it also means the dependency graph may continue to trust a historical namespace long after ownership has changed. That makes repo governance and provenance checks part of build security, not just release engineering.
Where teams already monitor software provenance, a supply-chain integrity control such as SLSA is a natural fit for detecting when fetched artifacts no longer match the expected source relationship.
Security Implications
ChainJacking turns stale trust into an attack path. Once an attacker controls the old path, they can serve backdoored code, Trojanised updates, or subtly altered dependencies to build systems that never rechecked who now owns the namespace.
The failure mode is especially dangerous in large dependency trees. A single reused path can propagate into many builds, create difficult-to-trace compromise, and make incident response harder because the malicious source still looks structurally consistent with the original project. The blast radius is broader when automation fetches dependencies without strong provenance validation or maintainership review.
For organisations trying to measure exposure, the practical symptom is not always an obvious malware alert. More often it is an unexpected source change, a redirect that was assumed to be benign, or a dependency update that looks normal until code review reveals the upstream relationship has shifted.
Where you need a control reference for governance and audit expectations, NIST SP 800-53 Rev 5 Security and Privacy Controls provides relevant control families for access control, configuration management, auditability, and integrity protection.
Security, Operational and Governance Implications
ChainJacking matters because it is as much a governance problem as a technical one. Teams need to know who owns a repository path, what happens when a project is renamed or abandoned, and how long old trust relationships remain valid in build pipelines.
The operational implication is that dependency management cannot rely on historical familiarity. Release engineering, package governance, and source verification have to account for namespace turnover, otherwise an old import path can silently become an attacker-controlled delivery point.
In ecosystems that fetch from VCS directly, path trust should be treated as a mutable risk surface. That means provenance, repository ownership changes, and redirect behaviour need to be visible to the people who approve dependencies, not just to developers troubleshooting build failures.
A supply-chain control model such as NIST Cybersecurity Framework 2.0 is useful here because it ties governance, protection, detection, response, and recovery to the dependency lifecycle rather than to a single build event.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | GV.1 — Cybersecurity Governance | Path ownership and dependency trust need governance |
| PR.DS — Data Security | Malicious code in dependencies threatens software integrity | |
| DE.CM — Continuous Monitoring | Redirects and namespace changes need detection | |
| Recommendation — Define ownership and approval rules for repository-path changes in the software supply chain. Protect build inputs and verify dependency integrity before release. Monitor dependency sources for ownership changes, redirects, and unexpected provenance shifts. | ||
| CIS Controls v8 | 16.11 — Monitor and Protect Service Provider Change | Repository ownership changes are a supplier-trust issue |
| Recommendation — Track external dependency ownership changes and revalidate trust when publishers change. | ||
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 16, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org