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.
The record classifies CVE-2026-4372 under weakness class CWE-1066. Its CVSS v3 base vector states that the flaw requires local access to the host, needs no prior authentication, needs a user to take an action first, and has high impact on confidentiality, integrity, availability. 1 affected-product entry is recorded, across 1 vendor, listed below. The identifier was first published 162 days ago.
Severity and exploitation probability
- CVSS v3.1 base score
- 7.8 — HIGH
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - EPSS (FIRST)
- 0.5% probability of exploitation in the next 30 days, higher than 47.0% of all scored CVEs
- CISA KEV
- Not listed in the CISA Known Exploited Vulnerabilities catalog
- Threadlinqs priority
- 5.8/10 — a Threadlinqs composite of the CVSS base score, the EPSS percentile and public exploit availability
- Published
- 2026-05-24, last modified 2026-05-26
Is CVE-2026-4372 being exploited?
It currently carries a trending score of 17 in the Threadlinqs vulnerability feed.
Affected products and versions
- huggingface: huggingface/transformers
Affected software packages:
pip:transformers— patched in 5.3.0
How to fix CVE-2026-4372
Fixed versions are recorded for 1 package: pip:transformers 5.3.0. No vendor patch reference has been recorded for CVE-2026-4372 in the tracked sources. Follow the references below for a fix, and treat the products listed above as exposed until the vendor states otherwise.
Threat activity tracking CVE-2026-4372
1 tracked threat in the Threadlinqs corpus references CVE-2026-4372, either in the campaign’s CVE list or as an indicator on the campaign record.
Sources
Enriched from CVE.org, FIRST EPSS, GitHub Security Advisories. Last verified by Threadlinqs on .