exploiting-dependency-confusion

Identifies and exploits dependency confusion attacks across npm, PyPI, NuGet, and other package registries.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill exploiting-dependency-confusion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exploiting-dependency-confusion
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/web-application-security/exploiting-dependency-confusion
Command: npx skills add https://github.com/xalgord/xalgorix --skill exploiting-dependency-confusion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

During authorized penetration tests, organizations often unknowingly expose internal package names that can be claimed on public registries, allowing attackers to execute code on build servers and CI/CD runners. This Skill guides testers through finding, confirming, and safely demonstrating dependency confusion vulnerabilities before real attackers do.

Core Features & Use Cases

  • Internal Package Enumeration: Extract internal package names from leaked manifests, JS bundles, sourcemaps, CI logs, and exposed .git directories across npm, PyPI, NuGet, Maven, Gradle, Go, Cargo, and RubyGems.
  • Six Attack Variants: Covers non-existent names, version-preference takeover, typosquatting, npx binary-name takeover, transitive dependency hijacking, and namespace squatting.
  • Out-of-Band Confirmation: Uses DNS/HTTP callbacks via interactsh or Burp Collaborator to prove install-time code execution on CI runners without exfiltrating real secrets.
  • Use Case: A public JavaScript bundle references @acme/telemetry, which is unclaimed on npm. You publish a benign proof-of-concept package with a preinstall beacon, and the target's next CI build triggers a callback confirming remote code execution.

Quick Start

Ask the AI to check the recovered package.json and JS bundles from the target for internal package names that are unclaimed on public registries and plan a dependency confusion proof-of-concept.

Frequently Asked Questions about exploiting-dependency-confusion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for dependency confusion vulnerabilities?

Enumerate internal package names from leaked manifests, JS bundles, or CI logs, then check if those names are unclaimed on public registries like npm or PyPI. Publish a benign proof-of-concept package with an install-time beacon and confirm execution via out-of-band DNS or HTTP callbacks.

What is version preference in dependency confusion attacks?

Version preference occurs when a resolver sees both an internal and public registry and picks the highest version globally. Publishing a public package with a very high version like 99.99.99 causes the resolver to select the attacker-controlled package over the legitimate internal one.

Does dependency confusion work on Python and PyPI?

Yes, but Python wheels do not execute code on install by default. Use a source distribution with a malicious setup.py, which runs during pip install, or target import-time execution paths when the package is loaded.

How do I confirm dependency confusion code execution without a shell?

Use out-of-band callbacks through interactsh or Burp Collaborator. A DNS or HTTP request carrying the target's hostname, CI runner identity, or working directory confirms install-time execution, even when egress is restricted to DNS only.

What is npx binary-name takeover?

When CI runs npx with an unscoped binary name and no local binary matches, npm installs a public package with that name. Claiming the unscoped public package name grants code execution even when the real tool is a scoped internal package.

What authorization is needed before dependency confusion testing?

You need written engagement scope explicitly permitting publishing test packages to public registries, plus registry accounts, unique engagement-specific markers, and a cleanup plan to unpublish packages when testing concludes.