Skip to main content
Public proof of conceptFix available

CVE-2026-4372

A public proof of concept exists; no exploitation attested.

  • Published2026-05-24
  • Fixed in5.3.0
  • WeaknessCWE-1066 · CWE-502

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0. The vulnerability allows an attacker to craft a malicious `config.json` file containing the `_attn_implementation_internal` field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard `AutoModelForCausalLM.from_pretrained()` API, the library downloads and executes arbitrary Python code from the attacker's repository with the victim's full OS privileges. This issue arises due to unfiltered deserialization of configuration attributes, insufficient sanitization of internal fields, and unsandboxed execution of downloaded kernels. The vulnerability bypasses the `trust_remote_code` security mechanism, is invisible to the victim, and exploits the standard documented usage pattern, making it particularly severe. Users are advised to upgrade to version 5.3.0 or later to mitigate this issue.

Timeline

dates in UTC
  1. 2026-05-2414:16CVE publishedNVD
  2. 2026-10-2700:20First public proof of conceptPoC-in-GitHub

Versions per branch

NVD · OSV
Huggingface transformers
BranchAffectedFixed in
5.3< 5.3.05.3.0

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As @huntr_ai, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • huggingface/transformers
    Affected
    • < 5.3.0fixed in 5.3.0custom

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-05-24

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • nemoChainguardall versions · fixed in 2.7.3-r11
  • py3.10-transformers-4.51Chainguardall versions · no fixed version listedand 7 other packages
  • text-generation-inferenceChainguardall versions · fixed in 3.3.7-r18
  • transformersTuxCare:PyPIfrom 4.57.6.post0 · fixed in 4.57.6.post2+tuxcare
  • transformersEcho:PyPIall versions · fixed in 4.57.3+echo.1
  • tritonserver-backend-vllm-cuda-12.9Chainguardall versions · fixed in 25.9.0_git20260617-r2

Full record on NVD

Fix

  1. Update Huggingface transformers to 5.3.0

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionnone2026-05-26
  • CNACVSS 3.07.8known since 2026-10-23
  • CNAweakness (CWE)CWE-1066known since 2026-10-23
  • NVDweakness (CWE)CWE-502read 2026-10-23
  • FIRST EPSSEPSS score0.7 %2026-11-18
  • PoC-in-GitHubproof of concept1known since 2026-11-01
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHIGH2026-07-01

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
2026-05-24
Last Modified
2026-07-23
NVD status
Analyzed
GitHub Advisory
GHSA-29pf-2h5f-8g72

Frequently asked questions

What is CVE-2026-4372?

A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0. The vulnerability allows an attacker to craft a malicious `config.json` file containing the `_attn_implementation_internal` field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard `AutoModelForCausalLM.from_pretrained()` API, the library downloads and executes arbitrary Python code from the attacker's repository with the victim's full OS privileges. This issue arises due to unfiltered deserialization of configuration attributes, insufficient sanitization of internal fields, and unsandboxed execution of downloaded kernels. The vulnerability bypasses the `trust_remote_code` security mechanism, is invisible to the victim, and exploits the standard documented usage pattern, making it particularly severe. Users are advised to upgrade to version 5.3.0 or later to mitigate this issue.

Is CVE-2026-4372 actively exploited?

Active exploitation of CVE-2026-4372 has not been confirmed. Its EPSS score was 0.7% on 2026-11-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-4372?

CVE-2026-4372 has a CVSS v3 base score of 7.8 (HIGH severity), with vector string CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.

Running transformers? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record