Poisoned Pipeline / Techniques / T0108
Accounts in public registry
An attacker can use accounts in public registries, such as PyPI or DockerHub, to perform a supply chain attack in several ways.
One approach is to compromise the credentials of a legitimate developer account and use it to upload malicious packages or container images.
The attacker can then promote the malicious artifact by using misleading descriptions or keywords, potentially increasing the number of downloads.
Alternatively, the attacker can create a fake developer account and upload malicious packages or container images using it.
The attacker may use a similar username or avatar to legitimate developers to trick users into thinking the account is legitimate.
Once the malicious artifact is uploaded, the attacker can promote it using various techniques, such as hijacking popular package names or using misleading descriptions.
Another approach is to target the infrastructure used by public registries, such as the servers or the communication channels used by developers to upload packages or container images.
An attacker may compromise the infrastructure and use it to inject malicious code into legitimate packages or container images as they are being uploaded.
Where this idea came from
Identified in published CI/CD or supply-chain security research cited below.
- https://blog.gitguardian.com/poisoning-the-source-how-and-why-attackers-are-targeting-developer-accounts/
- https://thenewstack.io/php-supply-chain-attack-shows-open-sources-virtues-and-vices/
Mitigations
- M1500 Verify third-party artifacts and open-source libraries
- M1503 Implement SCA analysis
- M1720 Implement regular patches and updates
- M1732 Implement code scanning for security risks
Detections
- D1262 Implement vulnerability assessment
- D1500 Configure monitoring of used artifacts and open-source libraries
- D1510 Implement Intrusion Detection System and anti-malware
Observed in incidents (17)
- tw-pkgprobe-7731 npm campaign targeted Twilio developers
- wshu.net 15-package multi-stage infostealer
- Apex Accelerator published a malicious npm coding agent and a fake audit MCP
- PhantomRaven hidden HTTP npm dependencies
- GemStuffer RubyGems campaign abused RubyDoc.info builders
- marchos1as typosquatted yay on the AUR and ran a root install scriptlet
- Seven fake NebulaAI npm packages drop a Windows KNTRAT at install
- testmetest npm names ship a Miasma-family worm that wipes the home directory if a stolen GitHub token is revoked
- WeaselBiscuit npm import-time stealer
- Elf-Stats Christmas npm spam worm
- Forty-two RubyGems from reqthrottle_3474 run a reverse shell or a crypto stealer at install
- IndonesianFoods npm worm (86k+ packages)
- MALFEX npm campaign, including a native imgdecode loader with no install script
- crates.io arrayref / proc-macro1 build-time dropper
- Graphalgo spreads to Terraform providers and Go modules
- Graphalgo spreads to Terraform providers and Go modules
- Claude eval agent published a malicious package to live PyPI