QSearchQSearch

CVE-2026-5241

9.6 CRITICAL

A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model reposit...

Published: 2026-06-03 · Last updated: 2026-06-04

Severity and scoring

CVSS
9.6 CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CWE
CWE-829

Affected products

VendorProduct
huggingfacetransformers

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: NVD

References

Related CVEs

Same vendor

  • CVE-2026-4372 A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0 (7.8 HIGH)
  • CVE-2026-44827 Diffusers is the a library for pretrained diffusion models (8.8 HIGH)
  • CVE-2026-44513 Diffusers is the a library for pretrained diffusion models (8.8 HIGH)

Same CWE

  • CVE-2026-46529 Atril Document Viewer is the default document reader of the MATE desktop environment for Linux
  • CVE-2026-47292 Inclusion of functionality from untrusted control sphere in Visual Studio Code allows an unauthorized attacker to elevate privileges locally (7.8 HIGH)
  • CVE-2026-11269 Inappropriate implementation in Extensions in Google Chrome prior to 149.0.7827.53 allowed an attacker in a privileged network position t... (7.1 HIGH)
  • CVE-2026-8879 Version 3.0.7 of the Securly Chrome Extension dynamically registers content13.min.js as a content script via chrome.scripting.registerCon... (7.5 HIGH)
  • CVE-2022-49042 An inclusion of functionality from untrusted control sphere vulnerability in MinGW DLL component in Synology Hyper Backup Explorer before... (7.8 HIGH)