Skip to main content

Axolotl CVE-2026-86169

| EUVDEUVD-2026-71971 HIGH
Inclusion of Functionality from Untrusted Control Sphere (CWE-829)
2026-09-05 VulnCheck GHSA-57g9-xg4g-rmpp
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish malicious HuggingFace model repository
  2. Delivery
    Induce victim to set model as base_model
  3. Exploit
    Axolotl multipack patch path reads model metadata
  4. Execution
    trust_remote_code=None guard bypassed silently
  5. Persist
    AutoModelForCausalLM loads with trust_remote_code=True
  6. Impact
    Attacker Python payload executes on training host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Trusted source inclusion only
Exploitation Conditions

Two specific conditions must co-occur: (1) the Axolotl configuration must use the multipack / sample-packing code path (i.e., sample_packing: true or equivalent multipack-triggering settings), since the vulnerability is exclusively inside _apply_multipack_patches(); and (2) the user's YAML configuration must NOT explicitly set trust_remote_code - leaving it absent or null causes the Python value None, which breaks the security guard. Users who explicitly set trust_remote_code: false are protected on vulnerable versions because the guard fires correctly. Additionally, the chosen base model must include model code that claims remote execution capability (i.e., the model repository signals trust_remote_code support), which an attacker-controlled repository can trivially assert. Exploitation is limited to Axolotl ≤0.18.0; no OS-level access to the victim system is required from the attacker's side - only the ability to publish a HuggingFace model and influence model selection.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P) and score of 8.7 are well-calibrated. The attacker requires only a free Hugging Face account to publish a malicious repository, and any Axolotl user who specifies that repository as base_model with multipack enabled is at full risk. The UI:P rating reflects that a human or automation must select the malicious model - a realistic social engineering or supply-chain substitution scenario. Real-world risk is elevated for organizations running automated fine-tuning pipelines (MLOps CI/CD, scheduled retraining jobs) that pull model identifiers from external registries, where no human reviewer selects each model interactively. Users who explicitly set trust_remote_code: false in their YAML config are protected by the intended guard, even in vulnerable versions. Users who explicitly set trust_remote_code: true are also technically safe from the bypass (they already consent), but obviously inherit the broader risk of trusting remote code. Only users with the setting absent (the default) are silently exposed. No EPSS data was provided; no CISA KEV listing; no public exploit code identified at time of analysis. The vulnerability is limited strictly to the multipack code path - fine-tuning runs not using multipack patches (sample_packing: false) are unaffected.

Exploit ScenarioDerived

An attacker publishes a Hugging Face model repository that includes a malicious modeling_*.py file and sets trust_remote_code: true in the model's config.json. They then socially engineer an ML engineer - or compromise a model registry integration - to use this repository as base_model in an Axolotl fine-tuning job with sample packing enabled. Because the user has not set trust_remote_code in their YAML config (the default), the multipack patch path silently loads the model with trust_remote_code=True, executing the attacker's Python payload with the same OS privileges as the training process, typically a GPU-attached machine with access to training datasets, cloud credentials, and the local network. No public exploit code exists at time of analysis, but the attack requires no technical exploit - only a crafted model repository and a victim who selects it.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 05, 2026

Remote code execution in Axolotl through 0.18.0 allows an attacker who controls a Hugging Face model repository to execute arbitrary Python code on any machine running an Axolotl training job with multipack patches enabled. The root cause is a logic flaw in _apply_multipack_patches(): when a user has not explicitly set trust_remote_code in their YAML config (leaving it as Python None), the guard condition self.cfg.trust_remote_code is not None evaluates to False, skipping the override assignment and leaving has_remote_code=True from the model's own metadata claim. Downstream code in multipack.py then calls AutoModelForCausalLM.from_pretrained with trust_remote_code=True hardcoded, executing whatever Python the model repository supplies. No public exploit is identified at time of analysis, but the attack surface is broad for teams running automated fine-tuning pipelines that source models from HuggingFace without explicit config hardening.

RemediationAI

Upgrade to an Axolotl release that incorporates commit b62d60b101eea7f32532ee3c0b17c2f2430a9262 (merged via PR #3858 at https://github.com/axolotl-ai-cloud/axolotl/pull/3858). The fix replaces the faulty None-check guard with bool(self.cfg.trust_remote_code), ensuring that an unset value evaluates to False and blocks the unsafe load path by default. No specific patched release version is independently confirmed from the available input - the fix exists as a commit and PR; verify that your installed version post-dates this commit by checking git log or the PyPI release date. As an immediate workaround for users who cannot upgrade, explicitly add trust_remote_code: false to every Axolotl YAML configuration file; this causes the original guard to trigger correctly even on vulnerable builds, at the cost of blocking any model that legitimately requires remote code execution. Alternatively, disable the multipack/sample-packing feature (sample_packing: false) to avoid the vulnerable code path entirely; this trades training throughput for safety. For automated pipelines, enforce an allowlist of approved HuggingFace model identifiers at the orchestration layer to prevent arbitrary model substitution.

Affected VersionsENISA

axolotl 0 ≤0.18.0

Affected Packages

euvd axolotl no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Axolotl (cpe:2.3:a:axolotl-ai-cloud:axolotl:*:*:*:*:*:*:*:*) is a Python-based LLM fine-tuning framework wrapping Hugging Face Transformers. The vulnerable code path is src/axolotl/loaders/patch_manager.py lines 794-806 (v0.18.0), inside _apply_multipack_patches(), which applies sequence-packing optimizations before model loading. The method reads whether the configured model reports having remote executable code (has_remote_code), then is supposed to gate that flag on the user's explicit trust_remote_code setting. The conditional if has_remote_code and self.cfg.trust_remote_code is not None fails silently when the user omits the setting, because Python evaluates None is not None as False. The variable has_remote_code is therefore never overridden, remaining True from the model metadata. The companion file src/axolotl/monkeypatch/multipack.py (lines 86-96) then calls AutoModelForCausalLM.from_pretrained(..., trust_remote_code=True) unconditionally, triggering execution of arbitrary Python files bundled in the HuggingFace model repository. CWE-829 (Inclusion of Functionality from Untrusted Control Sphere) is the accurate root-cause class: untrusted model-repository code is imported into the training process without user consent. The fix in PR #3858 (commit b62d60b) changes the guard to if has_remote_code: has_remote_code = bool(self.cfg.trust_remote_code), which converts None to False, correctly blocking the unsafe load path by default.

Know when Axolotl gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Attacker needs no victim-system privileges; user must select the malicious model (UI:R); full code execution yields C:H/I:H/A:H with no scope change.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Axolotl through 0.18.0 contains a remote code execution vulnerability in the multipack patch path where trust_remote_code defaults to None instead of False, causing the security guard to be bypassed. Attackers can execute arbitrary Python code by crafting a malicious Hugging Face model repository selected as base_model, which is loaded with hardcoded trust_remote_code=True during AutoModelForCausalLM.from_pretrained.

Executive ViewAI

Why It Matters

Axolotl machine learning training framework (versions ≤0.18.0) contains a critical remote code execution flaw that can be exploited by malicious actors who compromise AI model repositories on Hugging Face. Organizations using Axolotl for automated fine-tuning pipelines face risk of full infrastructure compromise, model poisoning, and unauthorized access to training data-representing both operational and IP security threats.

Business Impact: High
Compensating Controls

Apply vendor patch. Until patched: disable multipack patches, restrict model sources to internal/approved repositories, explicitly set trust_remote_code: false in all YAML configurations, and implement approval workflows for external model sources.

Threat Intelligence Overview

EPSS Score
0.5%
Top 60% exploitable
Prevalence
Medium
popular LLM fine-tuning framework in AI/ML practitioner community
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy