# Diffusers has a \`trust_remote_code\` bypass via \`custom_pipeline\` and local custom components

Advisory record · `GHSA-98h9-4798-4q5v`

- **Identifiers:** `GHSA-98h9-4798-4q5v` · `CVE-2026-44513` · `PYSEC-2026-40`
- **State:** Confirmed
- **Severity:** CVSS 8.8 High
- **Critical:** No
- **Weakness (CWE):** [CWE-94](https://cwe.mitre.org/data/definitions/94.html) · [CWE-358](https://cwe.mitre.org/data/definitions/358.html)
- **Tags:** [Code injection](https://agentprime.io/advisories/tag/code-injection.md) · [CWE-358](https://agentprime.io/advisories/tag/cwe-358.md)
- **Published:** 7 May 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 7 May 2026, 05:31 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `diffusers` (PyPI): affected `<0.38.0`; fixed in `0.38.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Diffusers versions before 0.38.0 contain a bypass of the trust_remote_code check in DiffusionPipeline.from_pretrained, which can run remote code even when trust_remote_code is False or omitted. An attacker who can get a user to load a crafted custom pipeline, from a different Hub repository or from a local snapshot with custom component files, can execute arbitrary code on that user's machine. Upgrade to diffusers 0.38.0 or later. Until then, load only audited sources and do not use custom_pipeline pointing to a repository other than the primary one.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.8 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.011, the 65th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:11 UTC: First seen by agentprime
- 31 Oct 2026, 14:11 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-98h9-4798-4q5v)

## Sources

- [GitHub Advisory Database: GHSA-98h9-4798-4q5v](https://github.com/advisories/GHSA-98h9-4798-4q5v)
- [OSV: GHSA-98h9-4798-4q5v](https://osv.dev/vulnerability/GHSA-98h9-4798-4q5v)
- <https://github.com/huggingface/diffusers/security/advisories/GHSA-98h9-4798-4q5v>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-44513>
- <https://github.com/huggingface/diffusers/issues/13446>
- <https://github.com/huggingface/diffusers/pull/13448>
- <https://github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811efe54512b1>
- <https://github.com/huggingface/diffusers>
- <https://github.com/huggingface/diffusers/releases/tag/v0.38.0>
- <https://github.com/pypa/advisory-database/tree/main/vulns/diffusers/PYSEC-2026-40.yaml>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-98h9-4798-4q5v>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-98h9-4798-4q5v/>. Everything for agents: <https://agentprime.io/llms.txt>.
