huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path
CVE-2026-5241 · GHSA-fgcw-684q-jj6r · published 2026-06-03 · updated 2026-07-21
- Severity
- High
- CVSS score
- 8.0
- Chance of exploitation (EPSS)
- 0.60%
- Fixed in
- 5.5.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Total
- CISA SSVC
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 trustremotecode 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.frompretrained() with trustremotecode=False, the LightGlueConfig reads the trustremotecode value from the untrusted config.json file and propagates it into nested AutoConfig.frompretrained() calls.
Upgrade transformers to 5.5.0 or later.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| transformers | PyPI | < 5.5.0 | 5.5.0 |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8n, n8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- CriticalJupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routesjupyter-mcp-server
- Criticalmem0ai Databricks vector store vulnerable to SQL injectionmem0ai
- Criticaltransformers has a Deserialization of Untrusted Data vulnerabilitytransformers
- HighHugging Face Transformers downloads custom generation code before trust consenttransformers
- HighTransformers save_pretrained path traversal allows arbitrary file writes through chat template namestransformers
- HighHuggingFace transformers vulnerable to remote code executiontransformers
- HighDeserialization of Untrusted Data in Hugging Face Transformerstransformers
- HighDeserialization of Untrusted Data in Hugging Face Transformerstransformers
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.