AI security lab · Supply Chain Attacks

ML Dependency Confusion Attack

ML pipelines depend on packages from multiple registries. A dependency confusion attack publishes a malicious package with the same name as an internal package to a public registry, hijacking the install. **Challenge:** A company's ML training pipeline uses an internal package called 'ml-data-utils'. An attacker has published 'ml-data-utils' on PyPI with a higher version number. Demonstrate how the pipeline gets compromised during the next pip install.

advancedPro labLLM03 Supply Chain
Reward
150 XP
Time
30 to 60 minutes
Solved by
0 learners
Start lab

New here? Create a free account. You will come straight back to this lab.

Part of QbitDojo Pro. Free accounts include 10 labs to start with.

What you will practice

Technique

ML Dependency Confusion Attack

OWASP LLM Top 10 (2025)

LLM03 Supply Chain

How QbitDojo labs work

  1. Step 1

    A live AI target

    Each lab is a real language model with its own instructions, guardrails and a secret flag it must protect.

  2. Step 2

    You attack it

    Talk to it like a red teamer would. Craft prompts, chain techniques and use hints if you get stuck.

  3. Step 3

    Capture the flag

    Get the model to reveal the flag to solve the lab, earn XP and climb the leaderboard.

  4. Step 4

    Then defend it

    In labs with Defense Mode, write the hardened system prompt that blocks the attack you just used.