Quick answers
- Is CVE-2026-5241 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-5241 being exploited in the wild.
- How severe is CVE-2026-5241?
- High severity, with a CVSS score of 8, published 3 June 2026.
- Which products and versions are affected?
- Hugging Face Transformers < 5.5.0, 5.2.0; transformers (PyPI) ECOSYSTEM:introduced=0,fixed=5.5.0, ECOSYSTEM:introduced=0,last_affected=5.2.0.
- Is there a fix for CVE-2026-5241?
- Yes. transformers (PyPI): upgrade to 5.5.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-5241 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-5241?
- Check whether you run Hugging Face Transformers or transformers (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- transformers (PyPI): upgrade to 5.5.0 or later
pip install "transformers>=5.5.0"
Technical details
A vulnerability in the LightGlue model loading path of huggingface/transformers (specifically version 5.2.0 and others before 5.5.0) allows for arbitrary code execution. The root cause is a failure to properly enforce the 'trust_remote_code' security parameter. When a user loads a LightGlue model via 'AutoModel.from_pretrained()' with 'trust_remote_code=False', the 'LightGlueConfig' component incorrectly reads a 'trust_remote_code' value from the untrusted 'config.json' file within the model repository. This value is then propagated into nested 'AutoConfig.from_pretrained()' calls, overriding the user's safety preference and executing attacker-supplied Python modules. This can be exploited if a user is enticed to load a malicious model from a remote repository.
Affected products
- Hugging Face transformers < 5.5.0
Identifiers
- CVE-2026-5241
- GHSA-fgcw-684q-jj6r
- PYSEC-2026-2290
Timeline
- 2026-03-31: patched: Fix committed to repository
- 2026-06-03: disclosed: Initial advisory publication
- 2026-07-13: advisory: Advisory updated and reviewed
References
- https://github.com/huggingface/transformers/commit/676559d5022b74aaa0cee1cee0842b7f27c5320e
- https://huntr.com/bounties/ceb3ce1a-4c45-497a-b25e-cb9a7685e619
- https://access.redhat.com/security/cve/CVE-2026-5241
- https://bugzilla.redhat.com/show_bug.cgi?id=2484384
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5241.json