CVE-2026-4372 | Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers

Exp

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.

Published: 2026-05-24 Last update: 2026-06-04 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-4372 is rated Exploit Available (55.2/100): CVSS High severity, with low exploitation likelihood (EPSS 0.09%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2026-4372

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2026-4372

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-05 0.03% 0.09% +0.06%
2 2026-05-25 0.03%

Full EPSS history (2 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-4372

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.0 HIGH
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]

Weakness enumeration for CVE-2026-4372

GitHub Security Advisory for CVE-2026-4372

GHSA-29pf-2h5f-8g72 · Severity: high — A critical remote code execution vulnerability exists in all versions of the HuggingFace...

Affected software / configurations for CVE-2026-4372

Vendor Product Version Raw CPE
huggingface transformers < 5.3.0 cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*

References for CVE-2026-4372

cvelogic Threat Intelligence