CVE-2026-65920: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in huggingface diffusers
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.
AI Analysis
Technical Summary
The huggingface diffusers library versions up to and including 0.39.0 contain a path traversal vulnerability in the _get_checkpoint_shard_files function. This vulnerability arises because the function does not properly restrict pathname inputs, allowing an attacker to craft malicious weight_map entries in the model index JSON. By including directory traversal sequences (../) or absolute paths, an attacker can escape the intended model directory and read safetensors files located elsewhere on the filesystem during model loading. The vulnerability is addressed in a commit identified as cee298c, which presumably implements proper pathname restrictions to prevent traversal.
Potential Impact
An attacker can read arbitrary files on the filesystem accessible to the application by exploiting the path traversal vulnerability during model loading. This could lead to unauthorized disclosure of sensitive information stored in files outside the model directory. There is no indication of privilege escalation, code execution, or modification of files. The vulnerability requires user interaction (UI:P) and has low complexity (AC:L) with no privileges required (PR:N).
Mitigation Recommendations
A fix is available and has been implemented in the commit identified as cee298c. Users of huggingface diffusers should upgrade to a version that includes this fix (versions later than 0.39.0). Since the vendor advisory or patch links are not explicitly provided, users should consult the official huggingface diffusers repository or release notes to obtain the patched version. Until upgraded, avoid loading untrusted model index JSON files containing weight_map entries.
CVE-2026-65920: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in huggingface diffusers
Description
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.
CVSS v4.0
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The huggingface diffusers library versions up to and including 0.39.0 contain a path traversal vulnerability in the _get_checkpoint_shard_files function. This vulnerability arises because the function does not properly restrict pathname inputs, allowing an attacker to craft malicious weight_map entries in the model index JSON. By including directory traversal sequences (../) or absolute paths, an attacker can escape the intended model directory and read safetensors files located elsewhere on the filesystem during model loading. The vulnerability is addressed in a commit identified as cee298c, which presumably implements proper pathname restrictions to prevent traversal.
Potential Impact
An attacker can read arbitrary files on the filesystem accessible to the application by exploiting the path traversal vulnerability during model loading. This could lead to unauthorized disclosure of sensitive information stored in files outside the model directory. There is no indication of privilege escalation, code execution, or modification of files. The vulnerability requires user interaction (UI:P) and has low complexity (AC:L) with no privileges required (PR:N).
Mitigation Recommendations
A fix is available and has been implemented in the commit identified as cee298c. Users of huggingface diffusers should upgrade to a version that includes this fix (versions later than 0.39.0). Since the vendor advisory or patch links are not explicitly provided, users should consult the official huggingface diffusers repository or release notes to obtain the patched version. Until upgraded, avoid loading untrusted model index JSON files containing weight_map entries.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-23T12:51:09.596Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6254f59c2644c7f8773ea1
Added to database: 07/23/2026, 17:52:53 UTC
Last enriched: 07/30/2026, 22:48:09 UTC
Last updated: 09/06/2026, 10:52:10 UTC
Views: 106
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.