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.
Published: 2026-07-23
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the Diffusers library when the function that locates checkpoint shard files allows the weight_map field of a model’s index JSON to contain path traversal sequences or absolute paths. This flaw lets an attacker cause the loader to read any file accessible to the process, resulting in an arbitrary file read that can expose configuration files, secrets, or other sensitive data. The weakness is a classic path traversal (CWE-22).

Affected Systems

Vendors: Hugging Face. Product: Diffusers library for Python. Versions up to 0.39.0 are affected. The issue was fixed by commit cee298c1f37c439a9a408396b8283a921238a1c6, which validates weight_map entries and restricts file access to the model directory. Clients using earlier releases should upgrade to the patched version.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity. The EPSS score is under 1%, implying a low likelihood of exploitation as of now, and the vulnerability is not listed in CISA KEV. Likely, the attacker must supply a malicious model index file containing crafted weight_map entries during model download or loading to exploit the vulnerability. Because the loader runs with the same privileges as the application, the extent of data exposure depends on process privileges. The flaw can be local or remote depending on how the model file is acquired, but only a process that can write arbitrary model files can exploit it.

Generated by OpenCVE AI on August 3, 2026 at 21:10 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Diffusers library to the fixed version that includes commit cee298c1f37c439a9a408396b8283a921238a1c6 or newer.
  • If an immediate upgrade is not possible, add runtime validation for weight_map entries to ensure no '..' or absolute paths are present before loading checkpoint shards.
  • Restrict model loading to trusted repositories and enforce a hard‑coded model directory that cannot be changed by external input; consider sandboxing model loading processes.
  • Monitor application logs for abnormal file read attempts that could indicate exploitation attempts and set alerts for unexpected file system access.

Generated by OpenCVE AI on August 3, 2026 at 21:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
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.
Title Diffusers Path Traversal via weight_map Arbitrary File Read
First Time appeared Huggingface
Huggingface diffusers
Weaknesses CWE-22
CPEs cpe:2.3:a:huggingface:diffusers:*:*:*:*:*:python:*:*
Vendors & Products Huggingface
Huggingface diffusers
References
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N'}

cvssV4_0

{'score': 5.3, 'vector': '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'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Subscriptions

Huggingface Diffusers
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-24T21:35:29.163Z

Reserved: 2026-07-23T12:51:09.596Z

Link: CVE-2026-65920

cve-icon Vulnrichment

Updated: 2026-07-23T18:19:18.348Z

cve-icon NVD

Status : Deferred

Published: 2026-07-23T18:17:02.427

Modified: 2026-07-23T19:17:05.900

Link: CVE-2026-65920

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-23T17:43:56Z

Links: CVE-2026-65920 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T21:15:04Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')