Join our Newsletter — 33% off our NHI Course
Home Glossary Architecture & Implementation Dependency Hijacking
Architecture & Implementation

Dependency Hijacking

← Back to Glossary
By NHI Mgmt Group Updated September 1, 2026 Domain: Architecture & Implementation

Dependency hijacking is a software supply chain attack in which an attacker takes over an abandoned or outdated package and repurposes it with malicious code. Developers may import it as if it were legitimate, which can introduce backdoors, malware, or other hidden compromise into builds and downstream releases.

Expanded Definition

Dependency hijacking is a supply chain compromise that sits between package discovery and package execution: an attacker publishes or reclaims a dependency name, then waits for build systems, installers, or automation to resolve that name as trusted input. In NHI and IAM contexts, the risk is not just malicious code, but the way build pipelines often run with service account privileges, access to secrets, and deployment authority. That means a hijacked package can become a path to credential theft, CI/CD compromise, or downstream environment takeover rather than a simple malware event. Controls such as NIST SP 800-53 Rev 5 Security and Privacy Controls help frame the need for provenance, change control, and software integrity checks, but usage in the industry is still evolving across ecosystems and package registries. The most common misapplication is treating dependency hijacking as a pure developer hygiene issue, which occurs when organisations ignore build identities, package provenance, and automated update paths.

Examples and Use Cases

Implementing dependency controls rigorously often introduces release friction, requiring organisations to weigh rapid dependency updates against stricter provenance checks and review gates.
  • A build pipeline pulls a package name that was abandoned upstream and later republished with malicious code.
  • A compromised internal project depends on a transitive package that silently changes ownership and starts exfiltrating secrets.
  • An auto-update process installs a new version after the original maintainer loses control of the repository.
  • A CI runner with broad service account access executes compromised install hooks and exposes signing credentials.
A useful case study is the LiteLLM PyPI package breach, which shows how package trust can collapse when registry assumptions outpace verification. For governance depth, NIST SP 800-53 Rev 5 Security and Privacy Controls provides a control vocabulary for integrity monitoring and controlled software acquisition.

Why It Matters in NHI Security

Dependency hijacking matters in NHI security because the attack frequently targets machine identities that are already trusted to fetch, build, sign, or deploy software. Once those identities are abused, the incident can move from code execution to secrets exposure, lateral movement, and release tampering. NHI Management Group reports that 80% of identity breaches involved compromised non-human identities such as service accounts and API keys, which helps explain why package compromise so often becomes an identity incident rather than a standalone application issue. The same risk is amplified when organisations store secrets in code, allow broad token access, or fail to rotate credentials used by CI/CD systems and package managers. Dependency hijacking therefore forces teams to treat software intake as an identity control surface, not just a dependency management task. It also shows why external guidance such as NIST SP 800-53 Rev 5 Security and Privacy Controls is relevant to build integrity, provenance, and least privilege. Organisations typically encounter the operational impact only after a package update, pipeline failure, or secret leak, at which point dependency hijacking becomes unavoidable to investigate and contain.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02Dependency hijacking often succeeds by abusing exposed secrets and weak package trust.
OWASP Agentic AI Top 10A-04Agentic build and release automation can import untrusted code without human review.
NIST CSF 2.0PR.IP-1Secure development practices include controlled acquisition and integrity of software components.
NIST Zero Trust (SP 800-207)SC-7Zero trust limits implicit trust in package sources, runners, and update channels.
NIST SP 800-63AAL2Machine credentials used in pipelines need assurance proportional to their privileges.

Use strong authentication for build identities and protect tokens that can publish or deploy code.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 1, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org