CVE-2026-5241
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
Also known as GHSA-fgcw-684q-jj6r, PYSEC-2026-2290
Mitigation
- Upgrade transformers to 5.5.0 or later.
Who should check
- Projects that depend on PyPI package transformers (< 5.5.0)
- Anyone running huggingface/transformers >= unspecified, < 5.5.0
Vulnerability facts
- Affected
- transformers < 5.5.0
- Fixed in
- 5.5.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, login needed
- CVSS
- 7.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: Low
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.94% chance of exploitation in 30 days (percentile 59, 2026-11-26)
- CWE
- CWE-829
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI transformers | < 5.5.0 | 5.5.0 | osv |
| huggingface/transformers | >= unspecified, < 5.5.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-5241. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-5241.md Affected: transformers < 5.5.0 Fixed in: 5.5.0 Steps: 1. Search this machine and project for transformers (PyPI), huggingface/transformers: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Exploits and PoCs
Other
- 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
- https://github.com/huggingface/transformers
- https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2026-2290.yaml
FAQ
Is CVE-2026-5241 being exploited?
There is no confirmed exploitation: CVE-2026-5241 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.94% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-5241?
High: CVSS 7.7 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-5241?
transformers < 5.5.0.
Is there a fix for CVE-2026-5241?
Yes. Fixed in 5.5.0. Upgrade transformers to 5.5.0 or later.
How do I check if I'm affected by CVE-2026-5241?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.