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
Share

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
qualitative

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Jul 23, 2026 - 18:23 vuln.today
Analysis Generated
Jul 23, 2026 - 18:23 vuln.today
CVE Published
Jul 23, 2026 - 17:43 cve.org
MEDIUM 5.3

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.

AnalysisAI

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.

Technical ContextAI

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:*:*:*:*:*:*:*:*.

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.

CVE-2024-3568 CRITICAL POC
9.6 Apr 10

The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data

CVE-2023-6730 HIGH POC
8.8 Dec 19

Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36. Rated high severity (CVSS

CVE-2023-7018 HIGH POC
7.8 Dec 20

Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36. Rated high severity (CVSS

CVE-2025-3262 HIGH POC
7.5 Jul 07

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository,

CVE-2026-66007 MEDIUM POC
6.9 Jul 24

Path traversal in Hugging Face Datasets up to 5.0.0 allows attackers to read arbitrary local files when a victim process

CVE-2026-69112 MEDIUM POC
6.9 Aug 10

Path traversal in Hugging Face Accelerate through 1.14.0 exposes two distinct attack outcomes when a user loads a crafte

CVE-2026-63086 MEDIUM POC
6.9 Jul 16

Server-side request forgery in HuggingFace text-generation-inference through version 3.3.7 enables unauthenticated remot

CVE-2025-1194 MEDIUM POC
6.5 Apr 29

A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, spe

CVE-2026-5241 CRITICAL
9.6 Jun 03

Remote code execution in Hugging Face Transformers 5.2.0 allows a malicious model repository to bypass the user's explic

CVE-2026-25874 CRITICAL
9.3 Apr 23

Unauthenticated remote code execution in HuggingFace LeRobot (versions 0 through 0.5.1) stems from pickle.loads() being

CVE-2025-3264 MEDIUM POC
5.3 Jul 07

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp

CVE-2025-3263 MEDIUM POC
5.3 Jul 07

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp

Vendor StatusVendor

Share

CVE-2026-65920 vulnerability details – vuln.today

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