Dependency Vulnerabilities

Education for hackers and defenders

Hey everyone!

This week we’re talking about dependency vulnerabilities: how attackers poison the packages your builds install, and how defenders stop them.

Most people have the same picture of how a breach starts. An attacker finds a server or a web app on the internet, matches it to a known CVE, and exploits it. That picture is a misconception, or at least it is badly out of date. Many of the biggest incidents of the last year did not start with an exploit against anything the victim exposed. They started with a package that the victim installed on purpose.

That works because almost no software is written from scratch. Every build downloads hundreds of packages written by strangers, and it runs their code with the same access your own code has. Those packages are your dependencies.

Attackers have noticed. Breaking into one company is hard work, but poisoning one popular package gets them into every company that installs it. There is no CVE to patch and no exposed service to scan, because the malicious code arrives through the front door.

There are two main ways to do it. In dependency confusion, the attacker publishes a public package that uses the name of one of your private packages, and your build installs theirs instead of yours. In dependency hijacking, the attacker takes over a real package that you already trust and ships a malicious version of it.

Last week alone brought a backdoored npm release, a CI secret stealer sent from thousands of hijacked GitHub accounts, and new research from Depi on a path to backdooring the Codex npm package.

This issue is for both sides. If you attack, you will see how the two techniques work and where internal package names leak. If you defend, you will get the settings that stop each one, and most of them are config you already own.

Let’s get into it.

The TL;DR

  • The “exposed server plus CVE” picture of a breach is out of date. Attackers have moved upstream, to the code your code depends on. One tracker counted 37 supply chain campaigns between January and early June 2026 that had no CVEs while they were live, so a CVE-based scanner had nothing to match.

  • Dependency confusion and dependency hijacking are two different problems, and each one needs its own defense. Both defenses are org-wide config.

  • Your internal package names are probably already public in lockfiles, source maps, Docker layers, and git history. A name is all an attacker needs to start.

  • The fix is boring config with a named owner. That means one registry, claimed scopes, lockfiles, no install scripts, and a cooldown on new releases.

Sophisticated intrusions used to require years of hands-on skill. The rise in abliterated AI models are closing that gap.

Mentions of abliterated AI models on cybercrime forums and Telegram rose 745% between January and October 2026. Flare analyzed more than 100,000 Telegram channels and 100 dark web forums to measure how fast threat actors are adopting guardrail-free models, and what they’re using them for. And chances are, the tides behind this are only getting stronger by the day.

Are you ready for the next wave of AI-assisted attacks? Get the Full Report.

/ Part One: A Year of Poisoned Packages

A dependency is a valuable target for a simple reason. One stolen maintainer account puts code in every build that installs the package. Those builds run on developer laptops and CI runners that hold cloud keys, GitHub tokens, and publishing credentials.

The old picture is not wrong, but it is incomplete. Remote exploitation is still the top way in, at 31% of breaches in Verizon’s 2026 DBIR. But the same report has a third party involved in 48% of breaches, and your package registry is a third party that runs code inside your builds.

Three incidents from this year show how the technique changed.

In March, TeamPCP pushed backdoored LiteLLM releases to PyPI. They got there by first compromising Trivy, the security scanner that ran in LiteLLM’s own CI (Snyk).

In May, the TanStack attacker used a malicious pull request, a poisoned build cache, and an OIDC token read from runner memory. With those, they published 84 malicious versions across 42 packages in six minutes (Unit 42, Snyk). Every version had valid SLSA provenance.

In July, the AsyncAPI compromise also started with a pull request against a workflow. Its payload ran when the code was imported, not when it was installed, so --ignore-scripts did not stop it.

The rest of the year followed the same pattern. There was a hijacked axios release, a May dependency confusion campaign built on nine look-alike corporate scopes, the ChainDrop worm across more than 400 packages, and a second LiteLLM compromise in October.

That brings us to the week of November 9, which was not unusual.

  • On the 9th, npm received a backdoored release of @ethersphere/bee-js that came out of the project’s real release workflow (Socket).

  • On the 10th, 4,837 hijacked GitHub accounts opened probe pull requests on more than 61,000 repositories, and a CI secret stealer ran in at least 1,800 of them (Aikido).

  • On the 11th, Depi published research on how a prompt injection in a GitHub Actions workflow could be chained to backdoor OpenAI’s Codex npm package.

Two things stand out to us across all of these.

The first is speed. The LiteLLM and axios releases were each live for only two or three hours. Any CI job that installed dependencies during those hours could have pulled the malicious version.

The second is the entry point. In March, attackers got in through a compromised scanner or a hijacked account. By May, they got in through the build pipeline itself. This matters because valid provenance only proves where a package was built. It does not prove that the build was clean.

/ Part Two: Confusion vs. Hijacking

The intro gave each technique one sentence. This part goes one level deeper, because each technique needs a different defense.

Dependency Confusion: Tricking You Into a Fake Package

Most companies have internal packages that live on a private registry. Dependency confusion abuses the moment when your build goes looking for one of them.

The attacker publishes a package on a public registry, such as npmjs.com or PyPI, and gives it the same name as one of your internal packages. If your build is allowed to look in both places, the package manager can pull the attacker’s public copy instead of yours. This usually happens because the attacker’s copy carries a higher version number.

Alex Birsan named this bug class in 2021. He used it to get code running inside Apple, Microsoft, and dozens of other companies, and he found the internal names in public JavaScript files. Five years later, it still works.

It still works because the risky setups are still common. In pip, the --extra-index-url flag adds a second place to look for packages, and pip’s own docs still tell you not to use it with private packages.

The technique has also grown. On npm, a scope is the @company prefix that groups a company’s packages under one name. The May campaign that Microsoft wrote up shows that attackers now register entire scopes that companies forgot to claim.

Dependency Hijacking: Poisoning a Real One

In a hijack, the package is legitimate and you already depend on it. The attacker does not need to trick your package manager. The attacker needs to take control of the package.

There are a few ways to do that. The most common is to phish the maintainer or steal a publishing token. Sometimes the attacker claims an abandoned package name or namespace. More and more often, the attacker goes through the project’s CI pipeline.

Once the attacker has control, they push a malicious update, and everyone who depends on the package installs it.

Almost everything in Part One is hijacking. You can have correct registry config and still install a hijacked release, because you asked for that package by name.

Confusion is different. It is a misconfiguration on your side, so your own config can stop it. We will take it first.

/ Part Three: Where Your Internal Package Names Leak

Recon is the first step in a pentest or a bug hunt, and dependency confusion starts with recon too. The attacker needs only one thing, which is the name of a package that exists inside your company and does not exist on the public registry.

This is not theory for us. It is how we find package names to attack when we red team for this vulnerability, and we cover it in Arcanum’s external services.

Those names get out in four ways.

1. The things you publish on purpose. Manifests and lockfiles, such as package.json, requirements.txt, and go.mod, are exposed every time you open-source a project, make a repo public, or publish a package. Lockfiles often reveal your internal registry URL too. Config files like .npmrc, pip.conf, and nuget.config show scopes and registry hostnames, and sometimes they show auth tokens. Public workflow files, Dockerfiles, and build logs show install commands and their output. License pages and SBOMs list your dependencies, and that list includes the internal ones.

2. The things you ship. Front-end bundles and source maps contain internal module names. This was the main source in Birsan’s original research. Public Docker images keep manifests and configs in old layers, even if a later layer deletes them. Electron and mobile apps often bundle package.json inside the installer.

3. The things you leave exposed by accident. An Artifactory, Nexus, or Verdaccio server that is reachable from the internet lets an attacker list every internal package name at once. A deploy that copies the whole project into the web root makes /package.json, /.npmrc, or /.git/ fetchable. Open cloud buckets that hold build artifacts, backups, or deployment bundles expose the same files.

4. The things you cannot take back. Names that you removed remain in git history, in forks, and in the personal repos of employees and contractors. Developers paste manifests and stack traces into GitHub issues, Stack Overflow, and gists. The Wayback Machine and code search engines keep files that you deleted. Leaked source code from past breaches also circulates publicly.

If you are a bug hunter, those four groups are your recon checklist. Stay in scope, and claim a name only where the program allows it.

If you are a defender, run the same checklist against yourself. Then check whether each name is registered on the public registry, and check who owns it. If somebody else already owns one of your internal names on npm or PyPI, stop reading and go look at what that package does.

/ Part Four: Defensive Posture

The fix starts with ownership. Somebody has to own the package manager and registry config for the whole org. If nobody does, the config is left to each developer’s laptop and each repo’s defaults.

Stopping confusion

Two controls do most of the work against confusion.

The first is to route every install through one internal proxy registry. That registry must never fall back to the public registry for your internal names.

The second is to claim your names. Register your org scope or namespace on the public registries. Then register placeholder packages for any unscoped internal names, so that nobody else can.

Limiting hijacking

Hijacking is harder to stop, because the package is real. Three controls reduce the risk.

  • Lockfiles. Commit lockfiles with integrity hashes, and install strictly from them in CI. In practice, that means npm ci, or pip with --require-hashes. Your build then installs only the exact versions that you already reviewed.

  • A cooldown. Set a rule that nothing published in the last few days gets installed. The LiteLLM releases were pulled within hours, so a build that waits a few days never sees them. Both pnpm (minimumReleaseAge) and uv (exclude-newer) support a cooldown natively.

  • No install scripts. Keep install scripts off, and allow them only for the packages that need them. npm v12 made this the default in July. Do not rely on this control alone, because the AsyncAPI payload needed no install script.

Treating CI as production

TanStack, AsyncAPI, and the first LiteLLM compromise all went through the pipeline. Lock down who can trigger workflows from a fork, and give publish tokens only to the jobs that publish. If you publish packages yourself, use phishing-resistant MFA, and use short-lived publishing credentials instead of long-lived tokens.

The Config, by Ecosystem

  • npm: Bind your scope to your private registry with npm config set @yourco:registry=https://npm.yourco.internal/. A scope can point at only one registry. npm scope docs

  • pip: Use a single --index-url that points at your proxy. Never use --extra-index-url for private packages. pip install docs

  • uv: Keep the default index strategy, which stops at the first index that has the package. The unsafe-best-match option searches every index and takes the best version, and uv’s own docs flag it as a dependency confusion risk. uv index docs

  • NuGet: Use Package Source Mapping. It lets you say, for each package ID pattern, which feed a package is allowed to come from. Microsoft docs

  • Your proxy registry: Block requests for your internal names from going to the public registry. In Artifactory, that is an exclude pattern plus Priority Resolution. In Nexus, it is a BLOCK routing rule. In Azure Artifacts, it is the upstream protection, and you should check that nobody turned it off. JFrog docs, Sonatype docs, Azure DevOps blog

If you are a CISO, ask this at your next staff meeting: who owns our package manager config, and is it enforced or just documented? If nobody can answer, find that owner this week. It is a gap worth fixing this quarter.

Depi, built by Lupin (Roni Carta) and the Lupin & Holmes team, hunts for these attack classes. The same team did the Codex research in Part One.

/ Outro

The industry has spent about twenty years teaching people to patch what faces the internet, and that work is still needed. But more and more, the way in is software that you chose to install, and that software needs an owner too.

If you are in AppSec, run the leak check from Part Three against your own org before somebody else does. If you are a red teamer or a hunter, this is where your time pays off most right now.

We are going to keep covering this space closely. Thanks for reading, and as always, feel free to reply or hit us up on X if something in here sparked a thought.

Happy hacking 😎

-Jason & Ryan