CVE-2026-65920

Diffusers Path Traversal via weight_map Arbitrary File Read

Published Jul 23, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
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'}

Weaknesses
  • CWE-22

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 24, 2026, 9:35 PM
Reserved
Jul 23, 2026, 12:51 PM
Status
Deferred
Published
Jul 23, 2026, 6:17 PM
Modified
Oct 24, 2026, 1:10 PM
Severity
Moderate
Public date
Jul 23, 2026, 5:43 PM