CVE-2026-5241
Critical · 9.6CVSS
9.6
EPSS
0.9%
Published
Jun 3, 2026
CISA due date
—
The record
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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-114727 Roundcube Webmail before 1.6.20 and 1.7.x before 1.7.5 passes potentially unsafe content… CWE-829
- CVE-2026-0303 A code execution vulnerability in Palo Alto Networks Checkov by Prisma® Cloud can allow… CWE-829
- CVE-2026-79721 Code execution can occur in versions of the MLflow platform running version 0.0.1 or… CWE-829
- CVE-2026-86504 In JetBrains IntelliJ IDEA before 2026.2.2 missing project-trust confirmation before… CWE-829
- CVE-2026-18252 GitLab has remediated an issue in GitLab EE affecting all versions from 18.9 before… CWE-829
- CVE-2026-76139 A flaw was found in acm-operator-bundle. CWE-829
- CVE-2026-22306 Download of code without integrity check, inclusion of functionality from untrusted… CWE-829
- CVE-2026-62680 Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2… CWE-829