CVE-2026-65920: Diffusers: path traversal via weight_map exposes files
MEDIUM PoC AVAILABLE CISA: TRACK*A path traversal flaw in Diffusers' checkpoint-loading code lets a malicious model's index JSON specify weight_map entries containing '../' sequences or absolute paths, causing the library to read arbitrary files on disk instead of the expected safetensors shard. Diffusers underpins image-generation pipelines with 419 downstream dependents, and its OpenSSF Scorecard of 4.4/10 and package risk score of 26/100 already flag it as a below-average security posture, so this adds a concrete data-exposure primitive to an already thin trust boundary. There is no EPSS score, no CISA KEV listing, no public exploit, and no scanner template yet, so this is not being actively exploited in the wild today, but it requires only that a victim load an attacker-supplied or compromised model, which is a routine action in Hugging Face Hub-style workflows, satisfying the CVSS 'user interaction required' condition at low attack complexity and no privileges. Patch to a Diffusers build including commit cee298c (fixed after 0.39.0); until then, restrict which model sources your pipelines are allowed to load via from_pretrained and run model-loading processes with least-privilege filesystem access so a malicious weight_map cannot reach credentials, keys, or source code.
What is the risk?
Medium severity (CVSS 4.3): network-reachable and low complexity, but scoped to confidentiality only (arbitrary file read) with no integrity or availability impact, and it requires user interaction (the victim must load the malicious model/checkpoint). No EPSS score, no CISA KEV entry, no public exploit code, and no Nuclei template exist, indicating no observed active exploitation yet. Real-world risk is driven less by technical difficulty and more by the trust model of AI pipelines: applications and platforms that auto-pull third-party models from hubs or registries routinely perform the 'user interaction' step attackers need. Diffusers' below-average OpenSSF Scorecard (4.4/10), modest package risk score (26/100), and broad footprint (419 dependents, 3 other CVEs in the package) suggest a maturing but still-hardening security posture worth monitoring rather than an immediate five-alarm issue.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Diffusers | pip | — | No patch |
Do you use Diffusers? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step-
Upgrade Diffusers to a version that includes fix commit cee298c1f37c439a9a408396b8283a921238a1c6 (patched after 0.39.0). Until upgraded, only load models from trusted, reviewed sources and avoid auto-loading arbitrary third-party checkpoints into environments with access to secrets or sensitive files. Run model-loading code in a sandboxed, least-privilege environment (dedicated container/user, restricted filesystem mounts, no access to credential stores) so a path-traversal read has nothing sensitive to reach. Add validation/allowlisting of weight_map paths (reject absolute paths and '../' sequences) at the application layer if immediate upgrade isn't possible, and audit logs from model-loading services for read attempts outside expected model directories as a detection signal.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-65920?
A path traversal flaw in Diffusers' checkpoint-loading code lets a malicious model's index JSON specify weight_map entries containing '../' sequences or absolute paths, causing the library to read arbitrary files on disk instead of the expected safetensors shard. Diffusers underpins image-generation pipelines with 419 downstream dependents, and its OpenSSF Scorecard of 4.4/10 and package risk score of 26/100 already flag it as a below-average security posture, so this adds a concrete data-exposure primitive to an already thin trust boundary. There is no EPSS score, no CISA KEV listing, no public exploit, and no scanner template yet, so this is not being actively exploited in the wild today, but it requires only that a victim load an attacker-supplied or compromised model, which is a routine action in Hugging Face Hub-style workflows, satisfying the CVSS 'user interaction required' condition at low attack complexity and no privileges. Patch to a Diffusers build including commit cee298c (fixed after 0.39.0); until then, restrict which model sources your pipelines are allowed to load via from_pretrained and run model-loading processes with least-privilege filesystem access so a malicious weight_map cannot reach credentials, keys, or source code.
Is CVE-2026-65920 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-65920, increasing the risk of exploitation.
How to fix CVE-2026-65920?
Upgrade Diffusers to a version that includes fix commit cee298c1f37c439a9a408396b8283a921238a1c6 (patched after 0.39.0). Until upgraded, only load models from trusted, reviewed sources and avoid auto-loading arbitrary third-party checkpoints into environments with access to secrets or sensitive files. Run model-loading code in a sandboxed, least-privilege environment (dedicated container/user, restricted filesystem mounts, no access to credential stores) so a path-traversal read has nothing sensitive to reach. Add validation/allowlisting of weight_map paths (reject absolute paths and '../' sequences) at the application layer if immediate upgrade isn't possible, and audit logs from model-loading services for read attempts outside expected model directories as a detection signal.
What systems are affected by CVE-2026-65920?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines.
What is the CVSS score for CVE-2026-65920?
CVE-2026-65920 has a CVSS v3.1 base score of 4.3 (MEDIUM). The EPSS exploitation probability is 0.40%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.003 Model AML.T0011.000 Unsafe AI Artifacts AML.T0037 Data from Local System Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
An attacker publishes a diffusion model repository on Hugging Face Hub (or compromises an existing one via account takeover or a supply-chain rug pull) whose model_index.json weight_map contains entries such as '../../../.aws/credentials' or an absolute path to a secrets file instead of a legitimate shard filename. A victim's application or a developer, trusting the model source, calls diffusers' from_pretrained() to load the model — the required user interaction. Internally, _get_checkpoint_shard_files resolves the malicious weight_map entries without sanitizing them, so Diffusers opens and reads the attacker-specified file from outside the model directory, exposing its contents through resulting errors, logs, or any downstream code path that surfaces the 'loaded shard' data back to the attacker or into an accessible output.
Weaknesses (CWE)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N References
- github.com/huggingface/diffusers/commit/cee298c1f37c439a9a408396b8283a921238a1c6 patch
- github.com/huggingface/diffusers/issues/14175 technical-description exploit
- github.com/huggingface/diffusers/pull/14182 issue-tracking
- vulncheck.com/advisories/diffusers-path-traversal-via-weight-map-arbitrary-file-read third-party-advisory
Timeline
Related Vulnerabilities
GHSA-j7w6-vpvq-j3gm 8.8 diffusers: silent RCE via None.py trust_remote_code bypass
Same package: diffusers CVE-2026-44513 8.8 diffusers: trust_remote_code bypass enables silent RCE
Same package: diffusers CVE-2026-45804 7.5 diffusers: TOCTOU race bypasses trust_remote_code, RCE
Same package: diffusers CVE-2025-59528 10.0 Flowise: Unauthenticated RCE via MCP config injection
Same attack type: Supply Chain CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Data Leakage