# Trojanized transitive dependency loader

Install- or import-time code in transitive or pinned packages that runs code absent from reviewed source

_Area: Software supply chain and CI/CD. Seen in 4 disclosed reports; latest 2026-11-04. Updated 2026-11-14._

## How it works
A dependency you did not choose directly — a transitive package, a pinned provider, a beta tarball — carries a loader that runs on install or on import. The broken assumption is that "pinned" and "transitive" mean "trusted and inert." Pinning fixes a version, not a publisher; a transitive dep inherits trust it never earned. The loader can stay dormant until a trigger (a hash gate, an import, a plugin load), so casual installs and scanners see nothing [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md)[E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md).

## Where it shows up
- Postinstall/preinstall hooks in any transitive package, especially ones you never named [E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md).
- Obfuscated blocks injected into built `dist/` bundles with no matching source change [E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md).
- Misspelled dependency names (`ts-bign`, `big-nunber`) in `package.json` or imported in source [E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md).
- `.terraform.lock.hcl` pinning a non-HashiCorp or lookalike registry [E4](https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md).
- Hash-gated branches: a hardcoded SHA256 compared against a value derived from inputs, then used as a key [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md).
- Blockchain RPC endpoints, Slack webhooks, or smart-contract addresses in package code [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md)[E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md).
- Backdated commits or forged release dates on a module proxy [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md).

## How to review
For every transitive dep and pinned artifact, establish: does the code that executes at install/import match the published source, and is the publisher the one you intended? Concretely: diff the published tarball against its source repo and against clean sibling versions [E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md); confirm the lockfile registry is the canonical one [E4](https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md); grep for install hooks and import-time side effects [E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md); and for any hash-gated branch, ask what value feeds the hash and whether an attacker controls it [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md). The invariant: no code path runs on install or import that is absent from reviewed source, and every pinned artifact resolves to a publisher you named.

## How finders spotted it
- Spotted a typosquat of a known provider, read the provider source, found a hash-gated branch, recognized the constant as an AES key, and linked the RAT's key and C2 infrastructure to an earlier campaign [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md).
- AI scan scored a package 0/REJECTED; detonated it under a sandbox and diffed malicious tarballs against clean siblings to extract the injected decoder; identical block in two packages implied one actor [E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md).
- Monitored a niche ecosystem, flagged a hijacked org, inflated stars from bot accounts, and two misspelled deps in `package.json`; deobfuscated and ran in a sandbox [E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md).
- Pivoted on published IOCs, clustered the trojanized provider among 16 goodware builds by similarity, read the loader to recover the AES key, and used submission-history/TLSH pivots to surface earlier builds [E4](https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md).

## Variants seen
- Hash-gated AES second stage in Terraform providers and Go modules [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md).
- Import-time RAT in beta tarballs of legitimate npm packages, no install hook [E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md).
- Typosquatted transitive deps with postinstall SSH backdoor plus runtime import [E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md).
- Weaponized lockfile pinning a lookalike registry serving a trojanized provider [E4](https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md).

## Impact and severity
Reached developer credentials and wallet keys [E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md)[E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md), cloud/infrastructure credentials [E1](https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md), and in one case a workstation compromise chained into wallet signing and a theft of ~$6.34B (~$3B frozen) [E4](https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md). Impact rose with worm-like self-propagation through the npm CLI [E2](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md), hijacked verified orgs and bot-farmed stars [E3](https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md), and targeting of signing paths [E4](https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md).

## Seen in real software
Open-source packages and projects, and products, where this pattern was found. If the target runs one, compare the version it runs with the fix.
- **Terraform AWS provider** terraform-provider-awsbeta_v1.0.0: Binance heist: what we know, and what RL sees in TraderTraitor's toolkit. Report: https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md
- **@joyfill/components** (dist/index.js, dist/index.esm.js, dist/joyfill.min.js) 4.0.0-rc24-2773-beta.4, 4.0.0-rc24-2773-beta.5, 4.0.0-rc24-2: Compromised npm Packages: @joyfill/components and @joyfill/layouts Ship an Obfuscated Remote Access Trojan. Report: https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md
- **ts-bign** 1.2.8: Malicious Polymarket Bot Hides in Hijacked dev-protocol GitHub Org and Steals Wallet Keys. Report: https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md

## Evidence
- E1: https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-graphalgo-terraform-go-modules.md
- E2: https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-joyfill-npm-supply-chain-compromise.md
- E3: https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-malicious-polymarket-bot-hides-in-hijacked-dev-protocol-github-org-and-steals-wallet-keys.md
- E4: https://bugbountylibrary.com/r/blog%3Areversinglabs-com-blog-binance-heist-what-we-know-and-what-rl-sees-in-tradertraitors-toolkit.md
