LearnCTEM.com, Best CTEM Learning Platform
CVE Intelligence Hub

CVE-2026-5241: Huggingface Transformers Security Vulnerability (CVSS 9.6)

CVE-2026-5241 is a critical severity security vulnerability in Huggingface Transformers with a CVSS score of 9.6. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Last updated: Aug 28, 2026

Quick answer

Direct answer

CVE-2026-5241 is a critical severity security vulnerability in Huggingface Transformers with a CVSS score of 9.6. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Risk scores

CVSS base score
9.6CRITICAL
EPSS probability
0.94%
Higher than 60 percent of all CVEs
CISA KEV
Not listed
CVSS metricWhat it means
Attack vector (AV:N)Network: reachable remotely
Attack complexity (AC:L)Low complexity
Privileges required (PR:N)No privileges required
User interaction (UI:R)A user must take an action
Scope (S:C)Scope changed: impact spreads beyond the component
Confidentiality (C:H)High confidentiality impact
Integrity (I:H)High integrity impact
Availability (A:H)High availability impact

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

About Huggingface Transformers

CVE-2026-5241 affects Huggingface Transformers, a product from Huggingface. Before acting, confirm where Huggingface Transformers runs in your estate, who owns it and whether it is reachable from the internet, because exposure decides real risk more than the score alone.

What the flaw is

In plain terms: 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.

Based on its CVSS vector, the flaw can be reached over the network, needs no login, and relies on a user taking an action. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Affected versions and timeline

FieldDetail
ProductHuggingface Transformers
Affected versionsTransformers 5.2.0
PublishedJun 3, 2026
Last modifiedAug 28, 2026
Added to CISA KEVNot listed
Assigning CNAsecurity@huntr.dev

How to detect it

  • Inventory every instance of Huggingface Transformers and record the running version against the affected range above.
  • Check external attack surface scans for internet facing instances of the component.
  • Review logs on affected systems for unusual requests, errors or new processes around the vulnerable function.
  • Confirm with an authenticated vulnerability scan once your scanner has a check for this CVE.

How to fix it

  • Apply the fixed version of Huggingface Transformers named in the vendor advisory.
  • If patching must wait, restrict network access to the affected service and put it behind authentication or a web application firewall rule.
  • Rescan after the change to prove the exposure is gone, then close the ticket.

CTEM action plan

CTEM stageWhat to do for this CVE
ScopeAdd every business service that depends on Huggingface Transformers to the current CTEM cycle.
DiscoverFind all instances, including shadow and cloud deployments, and record versions and exposure.
PrioritizeRank using EPSS and CVSS together with asset exposure and business impact.
ValidateConfirm the flaw is reachable and exploitable in your environment and that compensating controls work.
MobilizeAssign the fix to the asset owner with a due date matched to the priority, then verify closure.

CWE References

Technical References

Frequently asked questions

CVE-2026-5241 is a critical severity security vulnerability in Huggingface Transformers with a CVSS score of 9.6. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Related CVEs

CRITICAL9.3
CVE-2026-25874
Huggingface Lerobot

LeRobot through 0.5.1 contains an unsafe deserialization vulnerability in the async inference pipeline where pickle.loads() is used to deserialize data received over unauthenticated gRPC channels without TLS in the policy server and robot client components. An unauthenticated network-reachable attacker can achieve arbitrary code execution on the server or client by sending a crafted pickle payload through the SendPolicyInstructions, SendObservations, or GetActions gRPC calls.

Apr 23, 2026
HIGH7.8
CVE-2026-1839
Huggingface Transformers

A vulnerability in the HuggingFace Transformers library, specifically in the `Trainer` class, allows for arbitrary code execution. The `_load_rng_state()` method in `src/transformers/trainer.py` at line 3059 calls `torch.load()` without the `weights_only=True` parameter. This issue affects all versions of the library supporting `torch>=2.2` when used with PyTorch versions below 2.6, as the `safe_globals()` context manager provides no protection in these versions. An attacker can exploit this vulnerability by supplying a malicious checkpoint file, such as `rng_state.pth`, which can execute arbitrary code when loaded. The issue is resolved in version v5.0.0rc3.

Apr 7, 2026
CRITICAL10.0
CVE-2026-1699
Eclipse Theia Website

In the Eclipse Theia Website repository, the GitHub Actions workflow .github/workflows/preview.yml used pull_request_target trigger while checking out and executing untrusted pull request code. This allowed any GitHub user to execute arbitrary code in the repository's CI environment with access to repository secrets and a GITHUB_TOKEN with extensive write permissions (contents:write, packages:write, pages:write, actions:write). An attacker could exfiltrate secrets, publish malicious packages to the eclipse-theia organization, modify the official Theia website, and push malicious code to the repository.

Jan 30, 2026
CRITICAL9.4
CVE-2026-44336
Praisonai

PraisonAI is a multi-agent teams system. Prior to version 4.6.34, PraisonAI's MCP (Model Context Protocol) server (praisonai mcp serve) registers four file-handling tools by default — praisonai.rules.create, praisonai.rules.show, praisonai.rules.delete, and praisonai.workflow.show. Each accepts a path or filename string from MCP tools/call arguments and joins it onto ~/.praison/rules/ (or, for workflow.show, accepts an absolute path) with no containment check. The JSON-RPC dispatcher passes params["arguments"] blind to each handler via **kwargs without validating against the advertised input schema. By setting rule_name="../../<some-path>" an attacker walks out of the rules directory and writes any file the running user can write. Dropping a Python .pth file into the user site-packages directory escalates this primitive to arbitrary code execution in any subsequent Python process the user spawns — the next praisonai CLI invocation, an IDE script run, the user's python REPL, or any background Python service. This issue has been patched in version 4.6.34.

May 8, 2026
CRITICAL9.4
CVE-2026-33075
Fastgpt

FastGPT is an AI Agent building platform. In versions 4.14.8.3 and below, the fastgpt-preview-image.yml workflow is vulnerable to arbitrary code execution and secret exfiltration by any external contributor. It uses pull_request_target (which runs with access to repository secrets) but checks out code from the pull request author's fork, then builds and pushes Docker images using attacker-controlled Dockerfiles. This also enables a supply chain attack via the production container registry. A patch was not available at the time of publication.

Mar 20, 2026
CRITICAL9.4
CVE-2026-43944
Electerm Project Electerm

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. From versions 3.0.6 to before 3.8.15, electerm is vulnerable to arbitrary local code execution via deep links, CLI --opts, or crafted shortcuts. Exploit requires clicking a crafted electerm://... link or opening a crafted shortcut/command that launches electerm with attacker-controlled opts. This issue has been patched in version 3.8.15.

May 8, 2026
All Huggingface CVEs in 2026
Your next credential

Earn your free CTEM certification.

Learn to scope, prioritize, validate and mobilize fixes for CVEs like CVE-2026-5241 with a free CTEM certification.

Free to takePublicly verifiable

Beginner / Practitioner / Program Leader

Explore certifications