TL;DR
AI infrastructure projects frequently reimplement similar workflows (like model loading and data deserialization), causing vulnerabilities discovered in one repository to reappear as "variants" in others. This paper introduces INFRASCOPE, a reference-driven multi-agent framework that extracts the underlying trigger semantics of known vulnerabilities to automatically locate and verify equivalent security flaws across different AI infrastructure codebases. Testing INFRASCOPE on 20 popular repositories uncovered over 20 zero-day vulnerabilities, 11 of which have already been acknowledged by maintainers.
What Problem Does This Paper Address?
Modern AI infrastructure—spanning post-training, model serving, and LLM agent orchestration—frequently handles untrusted, user-controlled inputs (such as adapter paths, remote checkpoints, or tool configurations) alongside privileged system operations. Because many independent projects implement overlapping workflows, a security flaw disclosed in one project often recurs in another.
Traditional vulnerability detectors struggle to find these "cross-repository variants" because they look for exact code clones, patch lineages, or fixed syntactic signatures. AI infrastructure projects, however, often wrap identical functional logic in entirely different module boundaries and deployment assumptions. For example, an attacker-controlled path might reach an unsafe deserialization function (torch.load) via a direct function call in one project, but through a command-line argument invocation in another. This paper addresses the challenge of automatically identifying these semantically equivalent but syntactically diverse vulnerability variants.
Methods
The authors first conducted a large-scale measurement study of the AI infrastructure ecosystem to map out functional overlaps and vulnerability patterns.
Building on these insights, they developed INFRASCOPE, a multi-agent framework designed to automate variant hunting through three specialized LLM-powered agents:
- Semantics Modeling Agent: Extracts the core features of a known "reference vulnerability" (e.g., trigger conditions, data propagation paths, missing guards) and maps the target repository into functional modules based on a custom AI infrastructure role taxonomy.
- Inspection Agent: Prioritizes which modules to search based on functional similarity to the reference exploit. It uses a localization-aware state management system to maintain a compact "audit memory" across bounded LLM sessions, preventing the agent from getting lost or wasting its token budget on irrelevant code.
- Exploitability Verification Agent: To eliminate LLM hallucinations, this agent acts as a sandboxed coding assistant. It attempts to reconstruct the full execution path from the source input to the dangerous sink and automatically generates a minimal Proof-of-Concept (PoC) exploit to confirm the vulnerability.
Datasets
The authors curated and analyzed two primary datasets:
- Ecosystem Dataset: 688 active AI infrastructure GitHub repositories and 251 publicly disclosed vulnerabilities (with 232 containing sufficient trigger details for analysis).
- Evaluation Benchmark: 8 reference vulnerabilities (spanning command injection, SSRF, SQL injection, XML abuse, and unsafe deserialization) evaluated against 20 popular target repositories (including AutoGPT, Langflow, Dify, LangChain, Ragflow, LLaMA-Factory, and NeMo).
Key Insights and Ideas
- Functional Homogeneity Breeds Shared Flaws: The AI infrastructure ecosystem is highly concentrated around a few core capability families (primarily Python-based). This structural overlap means that public disclosures are rarely isolated, project-specific failures; they represent recurring architectural blind spots.
- Syntax Lies, Semantics Don't: Vulnerability variants easily survive refactoring and API migrations. As shown in the comparison between LLaMA-Factory and ms-swift, traditional call-graph analysis misses variants when propagation shifts from direct function calls to command-mediated execution, whereas semantic modeling successfully bridges the gap.
- Common AI Infra Attack Surfaces: The measurement study highlighted that model-loading deserialization bugs, serving API resource exhaustion, and attacker-controlled URL fetches leading to SSRF are the most prevalent cross-project vulnerability patterns.
Key Results
- High Precision & Accuracy: In benchmark evaluations, INFRASCOPE reported 31 candidate vulnerabilities, achieving 24 true positives. It demonstrated a precision of 0.774 and an accuracy of 0.603, significantly outperforming baseline tools like Claude Code and Vulnhalla.
- Token Efficiency: INFRASCOPE consumed 7× fewer tokens than Claude Code while capturing nearly the same number of true positives (only a 4% reduction in recall), proving the value of its targeted module prioritization and memory compaction.
- Real-World Impact: Across the benchmark and an independent case study on OpenClaw, INFRASCOPE successfully uncovered over 20 zero-day vulnerabilities, resulting in 11 acknowledged cases and 4 assigned CVEs to date.
Limitations and Future Work
The primary limitation of INFRASCOPE is its reliance on a human-defined, domain-specific module taxonomy to extract repository semantics. While highly effective for current AI infrastructure, this taxonomy limits the framework's immediate generalizability to other software domains (e.g., IoT or web frameworks) without manual re-engineering.
Additionally, the tool suffered from occasional false negatives when a repository's asset-loading logic spanned multiple distributed modules that fell outside the agent's localized inspection budget. As future work, the authors plan to deploy sub-agents capable of automatically constructing and maintaining functional taxonomies directly from raw codebase codebases.
Summary updated