Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2026-5241

9.6 · CRITICAL
Published Jun 3, 2026 huggingface CWE-829

Overview

CVE-2026-5241 is a critical-severity vulnerability affecting huggingface transformers. It was published on June 3, 2026 and has a CVSS 3.1 base score of 9.6 (CRITICAL).

This vulnerability has a CVSS 3.1 base score of 9.6, rated CRITICAL. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

Technical 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

Remediation

Check the references section for vendor advisories and patches from huggingface. Update transformers to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status

Frequently Asked Questions

What is CVE-2026-5241?

CVE-2026-5241 is a critical-severity vulnerability affecting huggingface transformers. It was published on June 3, 2026 and has a CVSS 3.1 base score of 9.6 (CRITICAL).

How severe is CVE-2026-5241?

This vulnerability has a CVSS 3.1 base score of 9.6, rated CRITICAL. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

How do I fix or remediate CVE-2026-5241?

Check the references section for vendor advisories and patches from huggingface. Update transformers to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2026-5241?

CyberStrike's AI-powered security agents can automatically detect CVE-2026-5241 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.

Browse by year 2026