Cyber Resilience

CVE-2026-4372

Deserialization in Huggingface Transformers ≤ 5.3.0

Public PoCDeserialization
Published
24 May 2026
Modified
23 July 2026
Patch / advisory
CVSS Score v3 7.8
Click a component to see what it means
Raw vectorCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score 0.0048 39th percentile
Risk Priority 57 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-4372 is a high-severity Missing Serialization Control Element (CWE-1066) vulnerability in Huggingface Transformers. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 39th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as NLP and Transformers; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

AI Security AnalysisAI

AI Category
NLP and Transformers
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: huggingface, transformers

Related Threats

MITRE ATT&CK Enterprise Techniques

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-3568Same product: Huggingface Transformers
CVE-2023-7018Same product: Huggingface Transformers
CVE-2024-11393Same product: Huggingface Transformers
CVE-2025-14924Same product: Huggingface Transformers
CVE-2025-14921Same product: Huggingface Transformers
CVE-2024-11394Same product: Huggingface Transformers
CVE-2023-6730Same product: Huggingface Transformers
CVE-2025-14930Same product: Huggingface Transformers
CVE-2025-14929Same product: Huggingface Transformers
CVE-2024-11392Same product: Huggingface Transformers

Affected Assets

huggingface
transformers
≤ 5.3.0

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation can discover missing serialization methods through code analysis or test cases exercising serializable elements.

Input validation directly stops deserialization of untrusted data by ensuring inputs are valid before processing.

Requiring a documented development process and standards enforces consistent implementation of serialization controls for data elements.

Security engineering principles require explicit handling of data representation and transformation, directly stopping omission of serialization methods.

Integrity verification tools can detect malformed or tampered serialized data after the fact.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require proper serialization methods for serializable elements.

PR.PS-02 none match
prevents

PR.PS-02 addresses only post-deployment updates/patching and cannot prevent introduction of unsafe deserialization code, yet it can remediate some instances when the flaw exists in outdated libraries or components.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect missing serialization methods before production deployment.

prevents

Secure development lifecycle requires proper serialization handling to avoid missing control elements.

prevents

Application security requirements include specifying correct serialization methods for data elements.

prevents

Secure architecture principles mandate explicit serialization controls for serializable objects.

prevents

Secure coding standards directly address implementing required serialization methods for data elements.

finds

Regular scanning of third-party libraries and timely patching reduce the likelihood that unsafe deserialization vulnerabilities remain active.

References