Redbot Labs / Attack Intelligence

Malicious AI Model Supply Chain

Record ID
RB-048
Severity
Critical
Category
Prompt Injection
Confidence Score
98
Published
Updated

Summary

An attacker compromises an AI model supply chain by distributing or modifying malicious model artifacts, weights, adapters, dependencies, configuration files, or supporting code that execute unauthorized behavior, introduce hidden model capabilities, or compromise systems when incorporated into an enterprise AI environment.

Executive Summary

Modern AI applications rarely originate entirely inside the enterprise deploying them.

Organizations increasingly obtain models, fine-tunes, adapters, embeddings, libraries, containers, datasets, and supporting components from external repositories and vendors.

That creates an AI-specific software supply chain.

A malicious or compromised artifact can potentially introduce risk before the model ever receives its first production prompt.

Attackers may publish intentionally malicious models, compromise trusted repositories or accounts, tamper with artifacts, exploit unsafe model serialization formats, distribute malicious dependencies, or introduce backdoored model behavior designed to activate under specific conditions.

The security problem therefore extends beyond asking whether a model produces safe outputs.

Enterprises must determine:

Where did this model come from, what exactly are we loading, what executes when we load it, and can we prove the artifact is the one we approved?

Attack Overview

An attacker targets a component of the AI development or deployment supply chain.

The attacker may distribute a malicious model through a public repository, compromise a legitimate publisher, modify an artifact after review, poison an adapter or fine-tune, introduce a malicious dependency, or abuse an unsafe serialization mechanism.

An enterprise developer, automated pipeline, or AI platform retrieves the compromised artifact.

The artifact is subsequently loaded into a development, evaluation, or production environment.

Depending on the attack, compromise may occur at different layers.

A malicious serialized artifact may trigger code execution during loading.

A backdoored model may behave normally until a specific trigger is encountered.

A compromised adapter may modify an otherwise trusted foundation model.

A malicious dependency may compromise the infrastructure surrounding the model.

The trust chain becomes:

External Source → Artifact → Enterprise Pipeline → AI Runtime → Enterprise Environment

A failure at any point can undermine the security assumptions of everything downstream.

Attack Flow

1. Supply Chain Targeting
The attacker identifies a model, repository, publisher, dependency, adapter, or distribution mechanism used by AI developers.

2. Artifact Compromise
A malicious component is created, modified, substituted, or published.

3. Trust Establishment
The artifact appears legitimate through branding, repository reputation, naming, compromised publisher credentials, or dependency relationships.

4. Enterprise Acquisition
A developer or automated system downloads the component.

5. Validation Failure
Integrity, provenance, serialization safety, dependencies, or model behavior are insufficiently validated.

6. Artifact Loading
The model or supporting component enters an enterprise AI environment.

7. Malicious Behavior Activation
The compromise manifests through code execution, backdoor behavior, altered inference, credential access, data manipulation, or another malicious objective.

8. Persistence or Propagation
The compromised artifact may subsequently be incorporated into containers, applications, internal model registries, CI/CD pipelines, or downstream products.

Affected Systems

  • AI/ML development environments
  • Model repositories
  • Model registries
  • Foundation models
  • Open-source models
  • Fine-tuned models
  • Model adapters
  • LoRA adapters
  • Model serialization formats
  • ML libraries
  • Python dependencies
  • AI containers
  • CI/CD pipelines
  • MLOps platforms
  • GPU infrastructure
  • Cloud AI environments
  • Internal model catalogs
  • AI applications
  • Development workstations

Business Impact

The adoption of third-party AI models creates a security decision that can easily be underestimated.

Downloading a model can resemble downloading data.

Operationally, however, enterprises may be introducing a complex external software and behavioral artifact into a privileged compute environment containing sensitive data and credentials.

That changes the risk considerably.

A compromised model supply chain can potentially affect:

  • AI development infrastructure
  • Production applications
  • Proprietary datasets
  • Cloud credentials
  • Developer environments
  • GPU clusters
  • Customer-facing services
  • Downstream AI products

The impact can also propagate.

If an organization imports a compromised external model into its internal registry and subsequently distributes it across multiple teams, one upstream compromise can become an enterprise-wide AI security problem.

For offensive AI testing, the critical question is:

Can your organization prove that the AI artifact running in production is trustworthy from source through deployment?

Redbot should test that chain rather than assuming a reputable model name equals a trusted artifact.

Testing Methodology

Authorized testing should evaluate the entire model acquisition and deployment trust chain, not simply the running AI application.

Testing should include:

  • Model provenance validation
  • Artifact hash verification
  • Digital-signature validation
  • Repository trust controls
  • Publisher-account security
  • Dependency inspection
  • Unsafe serialization testing
  • Model-loading behavior
  • Static inspection of supporting code
  • Container inspection
  • Adapter and fine-tune validation
  • Model configuration review
  • Unexpected network activity during loading
  • File-system modification during model initialization
  • Credential-access attempts
  • CI/CD model-download controls
  • Internal model-registry permissions
  • Artifact substitution testing
  • Version-pinning validation
  • Rollback integrity
  • Behavioral testing for model backdoors
  • Trigger-based output testing
  • Model provenance documentation

Testing should determine whether an attacker could substitute a malicious artifact after security review but before deployment.

That is especially important where pipelines automatically retrieve “latest” models or dependencies.

Detection Guidance

Monitor for:

  • Unexpected changes to model hashes
  • Unsigned model artifacts
  • New or unapproved model sources
  • Repository ownership changes
  • Model versions changing unexpectedly
  • Network activity during model loading
  • Unexpected subprocess creation
  • File-system modifications during initialization
  • New dependencies introduced by model packages
  • Model artifacts containing executable components
  • Changes to internal model registries
  • Unusual service-account activity
  • Model downloads from personal or unknown repositories
  • Behavioral changes following model updates
  • Unexpected activation patterns
  • Pipeline retrieval of unapproved versions

Mitigation Guidance

  • Maintain an approved model inventory
  • Verify model provenance
  • Pin model versions
  • Verify cryptographic hashes
  • Require signed artifacts where supported
  • Restrict approved repositories
  • Scan model artifacts before deployment
  • Avoid unsafe serialization formats
  • Sandbox model loading
  • Restrict runtime privileges
  • Block unnecessary outbound network access
  • Maintain AI/ML software bills of materials
  • Scan supporting dependencies
  • Secure model-registry credentials
  • Protect CI/CD pipelines
  • Require review for model updates
  • Validate adapters separately from base models
  • Monitor model behavior after updates
  • Maintain rollback capability
  • Red-team third-party models before production deployment

MITRE Mapping

MITRE Mapping Relevant ATT&CK techniques may include: T1195 — Supply Chain Compromise T1195.002 — Compromise Software Supply Chain T1204 — User Execution T1059 — Command and Scripting Interpreter T1078 — Valid Accounts MITRE ATLAS is particularly relevant because it includes adversarial techniques involving ML supply chains, model artifacts, and compromised AI systems. The exact mapping should reflect whether the attack targets the software surrounding the model, the model artifact itself, or model behavior.

OWASP Mapping

OWASP Mapping Strongly related to: OWASP LLM03 — Supply Chain Agentic supply-chain vulnerabilities where AI agents depend on external tools, plugins, models, or components It can also intersect with insecure plugin design, excessive agency, and model integrity risks depending on the deployment architecture.

Technical References

  • OWASP GenAI Security Project — OWASP Top 10 for LLM Applications
  • OWASP — LLM03: Supply Chain
  • OWASP GenAI Security Project — Agentic AI: Threats and Mitigations
  • MITRE ATLAS — Adversarial Threat Landscape for Artificial-Intelligence Systems
  • MITRE ATT&CK — T1195: Supply Chain Compromise
  • NIST AI Risk Management Framework (AI RMF 1.0)
  • NIST Secure Software Development Framework (SSDF)
  • NIST Cybersecurity Framework 2.0
  • CISA — Secure by Design guidance
  • CISA — Software supply-chain security guidance
  • OpenSSF — Supply-chain security practices
  • Hugging Face — model security and malware scanning guidance

Related Attack Intelligence