huggingface/transformers: Inclusion of Functionality from Untrusted Control Sphere
CVE-2026-5241 is a critical-severity inclusion of functionality from untrusted control sphere vulnerability in huggingface/transformers from Huggingface, with a CVSS 3.1 base score of 9.6 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version 5.5.0 as the first without the flaw, so updating huggingface/transformers to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.6% chance of exploitation within 30 days, which is low compared with other CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update huggingface/transformers to 5.5.0 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Huggingface | huggingface/transformers | before 5.5.0 | 5.5.0 |
| Red Hat | Red Hat OpenShift AI 2.25 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI 3.3 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI 3.4 | Not specified in the record | Not stated |
| Red Hat | OpenShift Lightspeed | Not specified in the record | Not stated |
| Red Hat | Red Hat AI Inference Server | Not specified in the record | Not stated |
| Red Hat | Red Hat Ansible Automation Platform 2 | Not specified in the record | Not stated |
| Red Hat | Red Hat Enterprise Linux AI (RHEL AI) 3 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Not specified in the record | Not stated |
| Huggingface | Transformers | 5.2.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.6 | Critical | NVD |
| CVSS 3.1 | 7.7 | High | CNA |
| CVSS 3.0 | 8.0 | High | CNA (huntr.dev) |
Official description
A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model repository to execute arbitrary code during model initialization. The issue arises because the `trust_remote_code` parameter, intended to prevent remote code execution, is overridden by untrusted serialized configuration data in a nested code path. Specifically, when loading a LightGlue model using `AutoModel.from_pretrained()` with `trust_remote_code=False`, the `LightGlueConfig` reads the `trust_remote_code` value from the untrusted `config.json` file and propagates it into nested `AutoConfig.from_pretrained()` calls. This results in the execution of attacker-provided Python modules, even when the victim explicitly disables remote code execution. The vulnerability poses a high risk for environments such as API inference servers, research notebooks, CI/CD pipelines, and model evaluation workers, potentially leading to credential theft, lateral movement, or persistence/backdoor deployment.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
How developers prevent this class of flaw
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. For example, ID 1 could map to inbox.txt and ID 2 could map to profile.txt. Features such as the ESAPI AccessReferenceMap provide this capability.
- For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
More Inclusion of Functionality from Untrusted Control Sphere vulnerabilities (CWE-829)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Technical write-ups (may include proof of concept)
- huntr.com/bounties/ceb3ce1a-4c45-497a-b25e-cb9a7685e619Exploit, Third Party Advisory
Other references
- access.redhat.com/errata/RHSA-2026:34456
- access.redhat.com/errata/RHSA-2026:37275
- access.redhat.com/errata/RHSA-2026:42644
- access.redhat.com/errata/RHSA-2026:60520
- access.redhat.com/security/cve/CVE-2026-5241
- bugzilla.redhat.com/show_bug.cgi?id=2484384
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5241.json
Other vulnerabilities in huggingface/transformers
- 7.1 High severity
- 7.8 High severity
- 7.8 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Recent Inclusion of Functionality from Untrusted Control Sphere vulnerabilities
- 7.5 High severity
- 7.8 High severity
- 7.8 High severity
- 8.6 High severity
- 8.6 High severity
- 7.3 High severity
Spotted an error? Tell us.