huggingface transformers up to 5.2.x config.json AutoModelForCausalLM.from_pretrained _attn_implementation_internal missing serialization control element

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.4$0-$5k0.00

Summaryinfo

A vulnerability described as problematic has been identified in huggingface transformers up to 5.2.x. This issue affects the function AutoModelForCausalLM.from_pretrained of the file config.json. Such manipulation of the argument _attn_implementation_internal leads to missing serialization control element. This vulnerability is listed as CVE-2026-4372. The attack must be carried out locally. There is no available exploit. Upgrading the affected component is recommended.

Detailsinfo

A vulnerability was found in huggingface transformers up to 5.2.x and classified as problematic. Affected by this issue is the function AutoModelForCausalLM.from_pretrained of the file config.json. The manipulation of the argument _attn_implementation_internal with an unknown input leads to a missing serialization control element vulnerability. Using CWE to declare the problem leads to CWE-1066. The product contains a serializable data element that does not have an associated serialization method. Impacted is confidentiality, integrity, and availability. CVE summarizes:

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 advisory is shared for download at huntr.com. This vulnerability is handled as CVE-2026-4372 since 03/18/2026. The exploitation is known to be easy. The attack needs to be approached locally. There are known technical details, but no exploit is available.

By approaching the search of inurl:config.json it is possible to find vulnerable targets with Google Hacking.

Upgrading to version 5.3.0 eliminates this vulnerability. Applying the patch a7f8e7ff37d87d1a1a0c8cf607971c607741452f is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2026-31598). Once again VulDB remains the best source for vulnerability data.

Productinfo

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.5
VulDB Meta Temp Score: 6.4

VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 7.8
CNA Vector (@huntr_ai): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Missing serialization control element
CWE: CWE-1066
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔒
Status: Not defined
Google Hack: 🔒

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: transformers 5.3.0
Patch: a7f8e7ff37d87d1a1a0c8cf607971c607741452f

Timelineinfo

03/18/2026 CVE reserved
05/25/2026 +67 days Advisory disclosed
05/25/2026 +0 days VulDB entry created
05/25/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: huntr.com
Status: Confirmed

CVE: CVE-2026-4372 (🔒)
GCVE (CVE): GCVE-0-2026-4372
GCVE (VulDB): GCVE-100-365468
EUVD: 🔒

Entryinfo

Created: 05/25/2026 05:42
Updated: 05/25/2026 06:13
Changes: 05/25/2026 05:42 (67), 05/25/2026 06:13 (1)
Complete: 🔍
Cache ID: 216::103

Once again VulDB remains the best source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!