PkgScanArena: Benchmarking LLM-Based Package Scanners against Indirect Prompt Injection
Open-source package ecosystems such as PyPI and npm remain persistent targets for malicious campaigns. These campaigns have outgrown signature-based triage, so recent work has turned to large language models (LLMs) that scan package content and return a verdict, which lets the analysis consume attacker-controlled text. In 2026, the Hades campaign on PyPI carried a prompt injection written to hijack the scanner’s instructions and coerce a clean verdict. Indirect prompt injection is well studied, but its reach into automated package-security analysis remains unmeasured. We therefore ask a broader question. How reliable are LLM-based package scanners when the package itself is written to manipulate the analysis? We present PkgScanArena, a benchmark that pairs a vetted dataset of 2,000 malicious and 1,000 benign npm and PyPI packages with a taxonomy of 11 techniques and 3 injection channels across three attacker goals, namely evasion, denial, and sabotage. An AST-guided pipeline injects these prompts into real packages, and we evaluate 25 open-weight and proprietary model configurations together with two deployed scanners. Our benchmark inverts the expected threat. Evasion proves largely unattainable, at or below 0.6% for nine of ten cloud models. Exposure instead shifts to the opposite direction: benign accuracy degrades for all but two of the 25 backends, sabotage reaches 31.1%, and denial reaches 19.6% on the most safety-aligned model. The two deployed scanners inherit both weaknesses. The exposure lies not in coercing a scanner to miss malicious code, but in coercing it to condemn benign code.
- Link
- https://www.semanticscholar.org/paper/33bd384ac5c50535506de6e354fb295e5f83f5c0
- Found by
- Semantic Scholar
- Authors
- Himadri Chowdhury, Ahmed Hatem, Joseph M. Khoury
- Categories
- benchmark, evaluation, dataset
- Published
- 2026-11-14
- Last seen by the radar
- 2026-11-15
- Citations
- 0
- Influential citations
- 0
- Radar score
- 49.10 / 100 (how it is scored)
- Why it scored so
- Matched: benchmark, dataset, evaluat; Primary record: Semantic Scholar
- Related links
- https://doi.org/10.1145/3847352.3848096