Poisoned Pipeline / Techniques / T0120
Dependency confusion
Dependency confusion is a type of supply chain attack that occurs when an attacker exploits the way some package managers, such as npm and PyPI, resolve dependencies when installing software libraries.
In a typical software development project, developers rely on a variety of external libraries, often referred to as dependencies, to build their applications.
These libraries are typically stored in a remote repository, and developers use a package manager to install and manage them.
An attacker will utilize prior knowledge of usage of dependencies (*Discover used open-source dependencies*) to upload a malicious package with the same name to a public repository.
This might "confuse" package managers to use to public resource instead of the local one - thus executing or infecting the CI/CD.
This can happen on the developer's machine or the build system and has the potential to further steps of an attack - for example, if the malicious code exfiltrate an access token to production environment
Where this idea came from
Birsan 2021; Google bin-entry harvesting, TXTBOOK, sl4x0 waves; conference: Black Hat USA 2026 “ThreatForest: Automated Attack Trees from Source Code” and “The 0-Day Engine” formalize how researchers reason about dependency attack paths.
- https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610
- https://pytorch.org/blog/compromised-nightly-dependency/
- https://www.blackhat.com/us-26/briefings/schedule/index.html
Mitigations
- M1200 Verify package authenticity
- M1201 Restrict egress traffic in CI/CD
- M1500 Verify third-party artifacts and open-source libraries
- M1502 Define trusted package managers and repositories
Detections
- D1090 Implement package or image integrity verification
- D1260 Implement regular security audit and review
- D1510 Implement Intrusion Detection System and anti-malware
- D1590 Implement continuous monitoring and logging of the CI/CD process
Observed in incidents (13)
- TXTBOOK dependency confusion against Tinkoff / T-Bank
- npm bin-entry harvesting against Google CLIs
- Moika npm dependency-confusion (Sberbank / EMCD impersonation)
- sl4x0 dependency confusion (92 packages, Fortune 500)
- PyTorch-nightly torchtriton dependency confusion
- Schedaero dependency-confusion packages
- Dependency confusion (Alex Birsan)
- Dependency confusion using Burp Collaborator callbacks
- Black Basta dependency-confusion ambitions in OSS
- @withgoogle/stitch-sdk scope squat
- Unclaimed packages in official llms.txt files
- victim59 dependency confusion (Genoma UI / Needl)
- Hyatt internal-dependency impersonation on npm