cve.bz

CVE-2026-44513 huggingface diffusers: Code Injection

8.8 highExploit referenceEPSS 1.1%Fix available

High (8.8) in huggingface diffusers. EPSS 1.1% estimated probability of exploitation activity in the next 30 days. Fixed in diffusers 0.38.0.

On this page
Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, a trust_remote_code bypass in DiffusionPipeline.from_pretrained allows arbitrary remote code execution despite the user passing trust_remote_code=False (or omitting it, which is the default). The vulnerability has three variants, all sharing the same root cause — the trust_remote_code gate was implemented inside DiffusionPipeline.download() rather than at the actual dynamic-module load site, so any code path that bypassed or short-circuited download() also bypassed the security check. DiffusionPipeline.from_pretrained('repoA', custom_pipeline='attacker/repoB', trust_remote_code=False) — the gate evaluated against repoA's file list rather than repoB's, so repoB's pipeline.py was loaded and executed. DiffusionPipeline.from_pretrained('/local/snapshot', custom_pipeline='attacker/repoB', trust_remote_code=False) — the local-path branch never invoked download(), so the gate was never reached and remote code from repoB executed. DiffusionPipeline.from_pretrained('/local/snapshot', trust_remote_code=False) where the snapshot contains custom component files (e.g. unet/my_unet_model.py) referenced from model_index.json — same root cause; the local path skipped download() and custom component code executed. This vulnerability is fixed in 0.38.0.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
1.1% (unchanged from 1.1% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 66th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-05-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-358 Improperly Implemented Security Check for Standard
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-44513 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-44513?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-44513?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-44513 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
huggingface:diffusersbefore 0.38.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-98h9-4798-4q5vPyPIdiffusers<0.38.00.38.0
PYSEC-2026-40PyPIdiffusers<0.38.00.38.0

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an Important vulnerability in Diffusers, a library used in Red Hat AI/ML offerings, that allows arbitrary remote code execution. The `trust_remote_code` security mechanism in `DiffusionPipeline.from_pretrained` can be bypassed, enabling the loading and execution of malicious code despite explicit security settings. This misplacement of the security check increases the risk in environments where users load models from external or untrusted repositories.

Red Hat's mitigation

Use DiffusionPipeline.from_pretrained() only with model paths, custom pipelines,

and local snapshots from fully trusted and audited sources. Avoid setting

custom_pipeline= to a Hub repository that differs from the primary model path

unless its pipeline.py has been manually reviewed. When loading a local snapshot, check for unexpected *.py files at the snapshot root and under component subdirectories (unet/, scheduler/, etc.) before calling from_pretrained.

The only complete fix is upgrading to diffusers 0.38.0.

ProductPackageStateAdvisory
Red Hat AI Inference Server 3.4rhaii/vllm-cpu-rhel9:1789681128Fixed 2026-09-21RHSA-2026:69466
Red Hat AI Inference Server 3.4rhaii/vllm-cuda-rhel9:1789681126Fixed 2026-09-21RHSA-2026:69467
Red Hat AI Inference Server 3.4rhaii/vllm-cpu-rhel9:1790075793Fixed 2026-09-23RHSA-2026:70965
Red Hat AI Inference Server 3.4rhaii/vllm-cuda-rhel9:1790090131Fixed 2026-09-23RHSA-2026:70979
Red Hat Enterprise Linux AI 3.4rhelai3/disk-image-cuda-rhel9:1790957417Fixed 2026-10-05RHSA-2026:76149
Red Hat Enterprise Linux AI 3.4rhelai3/bootc-aws-cuda-rhel9:1790881122Fixed 2026-10-05RHSA-2026:76150
Red Hat Enterprise Linux AI 3.4rhelai3/bootc-azure-cuda-rhel9:1790881120Fixed 2026-10-05RHSA-2026:76150
Red Hat Enterprise Linux AI 3.4rhelai3/bootc-cuda-rhel9:1790868254Fixed 2026-10-05RHSA-2026:76150
Red Hat Enterprise Linux AI 3.4rhelai3/bootc-gcp-cuda-rhel9:1790881123Fixed 2026-10-05RHSA-2026:76150
Red Hat OpenShift AI 3.4rhoai/odh-th06-cuda130-torch210-py312-rhel9:1787077779Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-th06-rocm64-torch291-py312-rhel9:1787076481Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-training-cuda128-torch29-py312-rhel9:1786611803Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-training-rocm64-torch29-py312-rhel9:1786611435Fixed 2026-08-27RHSA-2026:60520
Red Hat AI Inference Serverrhaiis/vllm-rocm-rhel9Not affected
Red Hat AI Inference Serverrhaiis/vllm-tpu-rhel9Will not fix
Red Hat OpenShift AI (RHOAI)rhoai/odh-openvino-model-server-rhel9Affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-th06-cuda130-torch291-py312-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-44513.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON