Skip to main content
VulnerabilityPublished Updated

CVE-2026-4372: huggingface/transformers · Missing Serialization Control Element

Affects huggingface/transformersSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.8 High : upgrade to 5.3.0 soon.

Data as of 15 Nov 2026, 20:25 UTC

CVSS 3.0 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 53% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.3.0
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 24 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 15 Nov 2026.

What to do

Upgrade transformers to 5.3.0.

Affected software

ProductAffectedFixed in
huggingfacehuggingface/transformersAffected
  • ≥ unspecified, < 5.3.0
Fixed in–
PyPItransformerspkg:pypi/transformersOther threatsAffected
  • <5.3.0
Fixed in
  • 5.3.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Users should upgrade to HuggingFace transformers version 5.3.0 or later, where this vulnerability is fixed. Until upgrading, avoid loading untrusted models or config files. Patch status is confirmed by the vendor advisory recommending version 5.3.0 or later.

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.

References

Community reviews

Loading reviews…