Skip to main content

HuggingFace Diffusers CVE-2026-65920

| EUVDEUVD-2026-48343 MEDIUM
Path Traversal (CWE-22)
2026-07-23 VulnCheck GHSA-9576-hw58-7552
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Attacker crafts malicious model index JSON with traversal weight_map
  2. Delivery
    Publishes model to HuggingFace Hub or controlled registry
  3. Exploit
    Victim loads model via Diffusers API
  4. Execution
    _get_checkpoint_shard_files resolves unsanitized shard paths
  5. Persist
    Arbitrary file read escapes model directory
  6. Impact
    Sensitive filesystem contents returned to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the victim's Diffusers-based application or pipeline loads a model whose *.safetensors.index.json shard index file contains attacker-controlled weight_map values with path traversal sequences (../) or absolute paths. The attacker must control or compromise the model source - such as by publishing a malicious model to HuggingFace Hub, a self-hosted model registry, or by tampering with a locally cached index file. No authentication or privileges on the victim system are required of the attacker (PR:N), but the victim must perform the model-loading action (UI:P per CVSS 4.0). Exploitation is limited to files readable by the OS user running the Diffusers process. Environments that exclusively load models from vetted, internally-controlled repositories with signed or hash-verified index files are not exposed. The vulnerability does not affect model loading from paths whose index JSON is generated by the framework itself rather than supplied by an external model author.

Impact

The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N, score 5.3) correctly characterizes this as moderate severity: unauthenticated network reachability, low complexity, but requiring user interaction to load the malicious model, with only low confidentiality impact. No EPSS score is provided in the input data, so probabilistic exploitation likelihood cannot be quantified. The vulnerability is not in CISA KEV, meaning widespread active exploitation is not confirmed; however, a public POC issue (#14175) lowers the bar for exploitation by opportunistic actors. Real-world risk is meaningfully elevated in automated ML pipelines or research workflows that pull community models from HuggingFace Hub without vetting index contents, since these pipelines may load models programmatically without human review of the shard index. Impact is bounded by the files the Diffusers process can read - not a code execution primitive. Overall: a real but scoped vulnerability; priority depends on whether the deployment loads untrusted community models.

Exploit ScenarioDerived

An attacker publishes a malicious model to HuggingFace Hub containing a crafted diffusion_pytorch_model.safetensors.index.json with weight_map entries such as {"param": "../../../home/user/.aws/credentials.safetensors"}. When a researcher or automated inference pipeline running Diffusers 0.39.0 loads this model, the library resolves the traversed path and attempts to read the file at that location, leaking its contents. A public proof-of-concept issue (#14175 on GitHub) documents the technique.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 23, 2026

Path traversal in HuggingFace Diffusers through 0.39.0 enables arbitrary file reads when a user or pipeline loads a maliciously crafted model. The _get_checkpoint_shard_files function in hub_utils.py blindly resolves weight_map shard filenames from model index JSON without validating for path separators or absolute paths, allowing an attacker who controls a model repository to escape the model directory and read any file accessible to the Diffusers process. No active exploitation confirmed (not in CISA KEV), but a public POC issue exists on GitHub and the attack surface includes the widely-used HuggingFace Hub ecosystem.

RemediationAI

Upgrade HuggingFace Diffusers to any release incorporating commit cee298c - verify via pip show diffusers and cross-reference the package changelog, as the exact first patched release version is not confirmed from available data (upstream fix is in PR #14182 at https://github.com/huggingface/diffusers/pull/14182). As an immediate compensating control pending upgrade, audit any model index JSON files (*.safetensors.index.json) before loading - specifically grep weight_map values for ../, /, or absolute path strings and reject models containing them; this adds a manual review step but has no functional side effects. Running the Diffusers process under a least-privilege OS user or within a container with a minimal read-only filesystem mount (restricting access outside the model cache directory) limits exfiltration scope if exploitation occurs, at the cost of added operational complexity. Avoid loading models from untrusted or unreviewed sources on HuggingFace Hub until the library is patched.

Affected VersionsENISA

Diffusers 0 ≤0.39.0

Affected Packages

euvd diffusers 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

The vulnerable function _get_checkpoint_shard_files (src/diffusers/utils/hub_utils.py) reads a shard index JSON file (e.g., diffusion_pytorch_model.safetensors.index.json) and iterates over weight_map entries that map model parameter names to shard filenames within the model directory. Because the filenames were not sanitized, an attacker-controlled index could supply values such as ../secret/SECRET.safetensors or /home/user/.ssh/id_rsa.safetensors, causing the library to resolve and read paths outside the intended model directory. Root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal). The fix in commit cee298c adds a single validation: os.path.basename(shard_filename) != shard_filename raises a ValueError for any filename containing a path separator or parent-directory reference. Tests in PR #14182 confirm rejection of ../, absolute paths, and subdirectory components. Affected CPE: cpe:2.3:a:huggingface:diffusers:*:*:*:*:*:*:*:*.

Know when Diffusers 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 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 4.3 MEDIUM

Victim must actively load a malicious model (UI:R); no attacker privileges needed (PR:N); confidentiality limited to files readable by the process (C:L); no integrity or availability impact.

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

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
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Diffusers through 0.39.0, fixed in commit cee298c, contains a path traversal vulnerability in the _get_checkpoint_shard_files function that allows attackers to read arbitrary files by supplying malicious weight_map values in model index JSON. Attackers can use ../ sequences or absolute paths in weight_map entries to escape the model directory and read safetensors files outside the intended location during model loading.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular Hugging Face library for diffusion model inference
Exploit
POC
Public exploit code exists
Data Quality
9 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

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