Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious HuggingFace model repository
-
DeliveryInduce victim to set model as base_model
-
ExploitAxolotl multipack patch path reads model metadata
-
Executiontrust_remote_code=None guard bypassed silently
-
PersistAutoModelForCausalLM loads with trust_remote_code=True
-
ImpactAttacker 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., |
| 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 |
| Exploit ScenarioDerived | An attacker publishes a Hugging Face model repository that includes a malicious |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-71971
GHSA-57g9-xg4g-rmpp
NVD
CVE.org
EPSS
VulDB
Exploit-DB