Code Injection in diffusers
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
A vulnerability tracked as CVE-2026-44827 has been found in diffusers.
Attackers can target a specific entry point like DiffusionPipeline.from_pretrained over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.8/10.
What to do: upgrade diffusers to 0.38.0 or later.
If unsure, ask your IT team or search "diffusers CVE-2026-44827" on the vendor's site.
CVE-2026-44827 (diffusers) — CWE-94 / CVSS v3 8.8
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: DiffusionPipeline.from_pretrained / custom_pipeline / DiffusionPipeline / _class_name
Patched: 0.38.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in diffusers. Attackers reach the vulnerable code path via DiffusionPipeline.from_pretrained without authentication.
Check the vendor advisory for the affected versions of diffusers. Attack surface: DiffusionPipeline.from_pretrained / custom_pipeline / DiffusionPipeline / _class_name.
Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover.
Update to 0.38.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'diffusers' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'diffusers' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
diffusersを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply patchpatch
Upgrade diffusers to 0.38.0ステージング環境で 0.38.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| pipdiffusers |
< 0.38.0→ 0.38.0 |
0.38.0 |
| PyPIdiffusers |
< 0.38.0→ 0.38.0 |
0.38.0 |
Original description The description as published by the source.
Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, diffusers 0.37.0 allows remote code execution without the trust_remote_code=True safeguard when loading pipelines from Hugging Face Hub repositories. The _resolve_custom_pipeline_and_cls function in pipeline_loading_utils.py performs string interpolation on the custom_pipeline parameter using f"{custom_pipeline}.py". When custom_pipeline is not supplied by the user, it defaults to None, which Python interpolates as the literal string "None.py". If an attacker publishes a Hub repository containing a file named None.py with a class that subclasses DiffusionPipeline, the file is automatically downloaded and executed during a standard DiffusionPipeline.from_pretrained() call with no additional keyword arguments. The trust_remote_code check in DiffusionPipeline.download() is bypassed because it evaluates custom_pipeline is not None as False (since the kwarg was never supplied), while the downstream code path that actually loads the module resolves the None value into a valid filename. An attacker can achieve silent arbitrary code execution by publishing a malicious model repository with a None.py file and a standard-looking model_index.json that references a legitimate pipeline class name, requiring only that a victim calls from_pretrained on the repository. This vulnerability is fixed in 0.38.0.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
References
- advisory nvd.nist.gov
- advisory github.com
- exploit github.com
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com