Est.

Supply Chain Security Risks in LLM Model and Plugin Dependencies

Weights, adapters, RAG sources, and plugins each hide risks that scanners miss.

· 8 min read
Cover illustration for “Supply Chain Security Risks in LLM Model and Plugin Dependencies”
AI Application & MCP Security · November 13, 2026 · 8 min read · 1,842 words

Model weights, adapters, retrieval sources, and plugins can each introduce a compromise that ordinary code checks miss. Building a secure LLM feature means assessing every one of those layers with the rigor applied to traditional software dependencies, without assuming that the same tools can inspect them all.

Why LLM features expand the attack surface beyond what traditional dependency scanning covers

Engineers already know how to scan a package for known vulnerabilities and block a build when one appears. An LLM stack quietly adds dependencies that do not fit that process, including model weights, training data provenance, fine-tuning adapters, and tool integrations. Each introduces a separate trust boundary. A poisoned adapter or retrieval knowledge base can alter behavior without producing a known CVE for a scanner to find.

The distinction between code and data also weakens. Model weights encode behavior, prompt templates contain instructions, and tool outputs re-enter the context window where they can influence the next action. A compromised component can therefore arrive as a feature update that conceals its malicious nature. Large Language Model Supply Chain: Open Problems From the Security Perspective identifies 12 security risks across upstream data providers, model hubs, frameworks, libraries, and downstream applications. The paper argues that work focused on the model alone overlooks how compromise propagates between those components.

How the OWASP Top 10 for LLM Applications maps the threat landscape engineers are walking into

The OWASP Top 10 for LLM Applications provides a map for following those paths. LLM01 Prompt Injection covers how a model cannot reliably tell developer instructions apart from user-supplied content when they share a context window. LLM03 Supply Chain Vulnerabilities covers compromised models, vulnerable packages and adapters, weak provenance, licensing risks, and abuse of collaborative development. Poisoned training and fine-tuning data sit primarily in LLM04 Data and Model Poisoning.

LLM08 Vector and Embedding Weaknesses covers manipulation of retrieval, while LLM05 Improper Output Handling covers downstream systems trusting model output without validation. LLM06 Excessive Agency covers tools doing more than they were meant to do. Together, they connect poisoned content to consequences such as unauthorized actions, XSS, SSRF, or privilege escalation. The GitHub Security Advisories study found that Supply Chain, Excessive Agency, and Prompt Injection often occur together across execution stages as linked defects.

What the Python and ML framework dependency layer actually exposes

An LLM application can depend on PyTorch or TensorFlow, inference servers such as vLLM or TGI, orchestration libraries such as LangChain or LlamaIndex, vector databases, and transitive Python packages. Teams may audit application packages without examining the inference and orchestration libraries beneath them. That leaves critical hubs outside the review. The supply chain paper identifies frameworks and third-party libraries as foundations whose compromise can propagate into downstream applications.

A short window in March 2026 shows the pace of exposure. Across four days, LangChain and LangGraph disclosed three high-severity vulnerabilities, Langflow was actively exploited through CVE-2026-33017, and LiteLLM suffered a supply chain compromise. The cluster involved familiar vulnerability classes, including path traversal, deserialization, and SQL injection, inside AI infrastructure. LangChain and LangGraph had 60 million weekly downloads in 2026 download data. The LiteLLM compromise reached tens of thousands of AI pipelines within minutes after the malicious package was published.

Familiar defects do not mean familiar coverage is enough. The entry vector in the LiteLLM case was security tooling itself, so having a scanner was not equivalent to protecting the delivery path. A manifest-level scan also leaves out the fully resolved dependency tree, where transitive dependencies hide much of the risk. The practical distinction is between checking what a project declares and examining what its build actually includes. Neither check, however, can establish whether a model’s learned behavior contains a backdoor.

Why pre-trained model weights and fine-tuning adapters are a distinct trust problem

A public model download introduces a different kind of trust. Its weights encode behavior learned from training data that may be unknown to the team adopting it. That behavior can include memorized sensitive information or a backdoor activated by a particular input. Normal testing may never reach the trigger. A publicly available LoRA adapter, for example, may work as expected on ordinary prompts but leak data or produce harmful output when a specific prompt activates its hidden behavior.

The opportunity for manipulation begins before distribution. The supply chain paper identifies data selection, cleaning, and labeling as upstream points where an adversary can influence the resulting model. It also identifies model hubs as distribution points with minimal integrity guarantees and model optimization as another manipulation surface. Quantization pipelines therefore belong in the trust assessment.

This is where the analogy to package security breaks down. Signing and hashes can help establish an artifact’s identity and chain of custody, but they cannot establish the safety of its behavior. An AI-specific software bill of materials, or ML-BOM, records provenance while leaving the possibility of a backdoor unresolved. That is still useful evidence. Without it, a team cannot tell which base model and source repository an artifact came from, even before asking how it behaves.

How orchestration frameworks and RAG pipelines turn prompt injection into a supply chain vector

Orchestration connects those opaque model behaviors to outside content. In retrieval-augmented generation, or RAG, the application retrieves material and places it in the model’s context. That material can contain instructions as well as information. If the model treats both as authoritative, an attacker can redirect a legitimate request without changing application code or model weights. The retrieval source becomes an instruction channel.

A webpage summary illustrates the mechanism. Hidden instructions in the page can redirect the model toward a malicious site and cause it to leak conversation history, without further interaction beyond the original request. EchoLeak, CVE-2025-32711, made this risk concrete in Microsoft 365 Copilot. The zero-click indirect prompt injection had a CVSS score of 9.3 and could exfiltrate data without user interaction. Its exploit chain linked prompt injection to failures in how output was handled.

Poisoned retrieval data changes what the model gets as context, which makes the retrieval index an active part of the supply chain. The architectural response is to treat retrieved content as untrusted input throughout processing. Layered input validation, instruction hierarchy enforcement, and output scanning address different points in that path. Least privilege limits both what the orchestration layer can retrieve and what it can do with the results.

Why MCP servers and agent plugins are the fastest-growing and least-audited layer of the LLM stack

Plugins extend the retrieval problem into action. Through integrations such as MCP, agents can call external APIs, execute code, and interact with databases. Each connection adds another dependency that can change behavior or expose data. By early 2026, security researchers had catalogued thousands of internet-exposed MCP servers, with roughly half operating without authentication controls.

The vulnerability record adds to that picture. Between January and April 2026, researchers disclosed dozens of CVEs affecting MCP implementations across Python, TypeScript, Java, and Rust SDKs. A single April 2026 advisory found that an estimated 200,000 MCP servers were vulnerable. The same paper discusses MalTool, a concurrent study demonstrating that a coding LLM can synthesize large numbers of malicious tools.

The attack can reach beyond data theft. Malicious MCP tool responses can lead a model to produce completions that violate policy, and broad tool permissions can turn that influence into unauthorized actions, privilege escalation, or lateral movement. This is excessive agency amplifying a compromised dependency. Missing backend authentication, unchecked model-generated tool arguments, and unsanitized tool outputs each weaken the boundary further. Least privilege therefore has to apply to both the agent application as a whole and each integration.

Where traditional security tooling fails and what an LLM-aware assessment requires instead

Conventional scanning remains necessary, but its view is incomplete. It can find a vulnerable library or an implementation defect without explaining how a tool description influences retrieval or how an LLM planner interprets an instruction. Structural integrity is not the same as behavioral safety. The advisories study examined disclosures published between January 2025 and January 2026 and found that existing metadata captures code-level defects but underrepresents model-mediated exposure. The CWE framework on its own covers only part of the attack path.

MCP servers still require checks of authentication, authorization, input validation, and STDIO input handling. Semantic testing must then check how content and tool responses shape the model’s decisions. Improper output handling shows why the two cannot be separated. Finding an XSS or SSRF path requires traditional application testing plus an understanding of where model outputs are rendered or executed downstream.

Whitebox scope must include source code, cloud configuration, model provenance records, and plugin integration points. Blackbox testing leaves the model and adapter layers outside meaningful inspection. Continuous pull-request scanning can catch dependency drift between assessments, but human experts still need to review automated findings when exploit chains cross the code-to-model boundary. For findings presented to auditors or customers, that review is not optional.

How to build an audit-ready security posture across the full LLM supply chain

The practical response is to apply controls separately at each layer, with evidence that they run continuously. For Python and ML frameworks, teams should generate an SBOM from the fully resolved dependency tree at build time. They should sign both artifacts and SBOMs, produce SLSA provenance, and gate deployment on verification. Exact versions and integrity hashes make upgrades explicit. Reviewing diffs before changes to inference or orchestration libraries, and restricting outbound network access from inference environments, addresses both introduction of risk and possible exfiltration paths.

An ML-BOM should capture the base model ID, version, source repository, and cryptographic hash for every production model artifact. Models and adapters should come only from trusted, verified providers, with checksums and provenance examined before integration. Public hub downloads remain untrusted until that provenance is established. Dedicated backdoor detection tooling addresses weight-encoded behavior that ordinary CVE scanning does not cover.

At the orchestration layer, the untrusted-input rule needs concrete enforcement. Teams should apply input validation to retrieved content and architecturally separate system instructions from user-supplied and retrieved material. Outputs must be scanned before they reach downstream systems or users. Rendering or executing them without validation recreates the same trust failure at the next boundary. These controls connect RAG retrieval security to the application’s existing defenses.

Teams should inventory every MCP server and plugin on developer machines, CI runners, and production hosts, including transitive dependencies. An internal allowlisted registry, pinned versions, integrity hashes, and upgrade diff reviews constrain what enters that inventory. Each integration should receive minimum permissions, explicit allowlists rather than blocklists, and authenticated backend connections. Restricting outbound network access further limits the paths available to a compromised plugin.

Teams should retest after major dependency or model upgrades, including those between annual assessments. SOC 2, HIPAA, and ISO 27001 require demonstrable vendor and dependency risk management, making ML-BOMs and signed provenance records useful evidence of that work. A whitebox assessment with working exploit proof and sign-off from human experts links what is in the inventory to findings backed by tests. An audit-ready posture shows not just which components shipped, but how their trust boundaries were assessed.

Sources

  1. Large Language Model Supply Chain: Open Problems From the Security Perspective
  2. LLM-Enabled Open-Source Systems in the Wild: An Empirical Study of Vulnerabilities in GitHub Security Advisories
  3. Large Language Model Supply Chain: A Research Agenda
  4. Supply-Chain Poisoning Attacks Against LLM Coding Agent Skill Ecosystems

More in AI Application & MCP Security