Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 57%

CVE-2026-5241: CWE-829 Inclusion of Functionality from Untrusted Control Sphere in huggingface huggingface/transformers

0
High
VulnerabilityCVE-2026-5241cvecve-2026-5241cwe-829gcve
Published: 06/03/2026 (06/03/2026, 12:33:10 UTC)
Source: CVE Database V5
Vendor/Project: huggingface
Product: huggingface/transformers

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.

CVSS v3.0

Score 8.0high

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N

Affected software

transformers
pkg:pypi/transformers
Affected versions
=5.2.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/31/2026, 13:01:54 UTC

Technical Analysis

The vulnerability in huggingface/transformers 5.2.0 arises because the trust_remote_code parameter, which is intended to prevent remote code execution, is overridden by untrusted serialized configuration data in the LightGlue model loading path. Specifically, when loading a LightGlue model using AutoModel.from_pretrained() with trust_remote_code set to 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 leads to execution of attacker-provided Python modules despite explicit disabling of remote code execution. The CVSS v3.0 score is 8.0, indicating high severity with network attack vector, high complexity, no privileges required, user interaction required, scope changed, and high confidentiality and integrity impact. The vulnerability poses risks in various environments that load models from potentially untrusted repositories.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary code during model initialization in huggingface/transformers 5.2.0. This can lead to credential theft, lateral movement within the victim environment, or deployment of persistence mechanisms or backdoors. The vulnerability affects any environment that loads LightGlue models from attacker-controlled repositories, including API inference servers, research notebooks, CI/CD pipelines, and model evaluation workers. The integrity and confidentiality of affected systems are severely impacted, while availability is not directly affected.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid loading LightGlue models from untrusted or unauthenticated sources. Explicitly verify the trustworthiness of model repositories before loading. Monitor vendor advisories, including the Red Hat advisory at https://access.redhat.com/security/cve/CVE-2026-5241, for updates on patches or official mitigations.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
@huntr_ai
Date Reserved
2026-03-31T14:26:14.353Z
Cvss Version
3.0
State
PUBLISHED
Remediation Level
null
Vendor Advisory Urls
[{"url":"https://access.redhat.com/security/cve/CVE-2026-5241","vendor":"Red Hat"}]

Threat ID: 6a2037c7e29bf47b50c14ed8

Added to database: 06/03/2026, 14:18:47 UTC

Last enriched: 07/31/2026, 13:01:54 UTC

Last updated: 07/31/2026, 21:34:08 UTC

Views: 107

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses