cve.bz

CVE-2026-1839 huggingface transformers: Deserialization of Untrusted Data

7.8 highExploit referenceEPSS 0.4%Fix available

High (7.8) in huggingface transformers. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in transformers 5.0.0, 5.0.0rc3.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 34th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2026-04-07. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-1839 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-1839?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-1839?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-1839 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
huggingface/transformersbefore v5.0.0rc3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-69w3-r845-3855PyPItransformers<5.0.0rc35.0.0rc3
PYSEC-2026-2288PyPItransformers<5.0.05.0.0

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Lightspeed Coreopenshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9Fix deferred
Lightspeed Coreredhat-user-workloads/lightspeed-stackFix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-ocp-rag-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-service-api-rhel9Fix deferred
OpenShift Lightspeedredhat-user-workloads/lightspeed-rag-toolFix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-cpu-ubi9-3-3Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-cuda-ubi9-3-2-2Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-cuda-ubi9-3-3Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-model-opt-cuda-ubi9-3-2-2Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-model-opt-cuda-ubi9-3-3Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-neuron-ubi9-3-3Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-rocm-ubi9-3-2-2Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-rocm-ubi9-3-3Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-spyre-ubi9Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-spyre-ubi9-3-3Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-tpu-ubi9Fix deferred
Red Hat AI Inference Serverredhat-user-workloads/rhaiis-tpu-ubi9-3-3Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-chatbot-rhel8Fix deferred
Red Hat Ansible Automation Platform 2redhat-user-workloads/lightspeed-chatbot-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3redhat-user-workloads/bootc-cuda-aws-3-3Fix deferred
33 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-1839.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON