REDHAT-BUG-2477507: High severity Hugging Face Diffusers vulnerability

Published May 14, 2026
·
Updated

Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, a trustremotecode bypass in DiffusionPipeline.frompretrained allows arbitrary remote code execution despite the user passing trustremotecode=False (or omitting it, which is the default). The vulnerability has three variants, all sharing the same root cause — the trustremotecode 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.frompretrained('repoA', custompipeline='attacker/repoB', trustremotecode=False) — the gate evaluated against repoA's file list rather than repoB's, so repoB's pipeline.py was loaded and executed. DiffusionPipeline.frompretrained('/local/snapshot', custompipeline='attacker/repoB', trustremotecode=False) — the local-path branch never invoked download(), so the gate was never reached and remote code from repoB executed. DiffusionPipeline.frompretrained('/local/snapshot', trustremotecode=False) where the snapshot contains custom component files (e.g. unet/myunetmodel.py) referenced from modelindex.json — same root cause; the local path skipped download() and custom component code executed. This vulnerability is fixed in 0.38.0.

Affected Software

1 affected component
Hugging Face Diffusers<0.38.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade diffusers to a version that resolves this vulnerability.

    Fixed in 0.38.0

Event History

May 14, 2026
Data Sourced
via Red Hat·05:02 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2477507?

The severity of REDHAT-BUG-2477507 is high, rated at 7.

2

What is the risk associated with REDHAT-BUG-2477507?

The risk associated with REDHAT-BUG-2477507 is categorized as 33.

3

How do I fix REDHAT-BUG-2477507?

To fix REDHAT-BUG-2477507, upgrade the Hugging Face Diffusers library to version 0.38.0 or later.

4

What impact does REDHAT-BUG-2477507 have on security?

REDHAT-BUG-2477507 allows for arbitrary remote code execution even when trust_remote_code is set to False.

5

Which library is affected by REDHAT-BUG-2477507?

The affected library is Hugging Face Diffusers prior to version 0.38.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203