huggingface transformers up to 5.2.x config.json AutoModelForCausalLM.from_pretrained _attn_implementation_internal missing serialization control element
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.4 | $0-$5k | 0.00 |
Summary
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.
Details
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.
Product
Vendor
Name
Version
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 6.5VulDB 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): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Missing serialization control elementCWE: 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-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: transformers 5.3.0
Patch: a7f8e7ff37d87d1a1a0c8cf607971c607741452f
Timeline
03/18/2026 CVE reserved05/25/2026 Advisory disclosed
05/25/2026 VulDB entry created
05/25/2026 VulDB entry last update
Sources
Product: github.comAdvisory: huntr.com
Status: Confirmed
CVE: CVE-2026-4372 (🔒)
GCVE (CVE): GCVE-0-2026-4372
GCVE (VulDB): GCVE-100-365468
EUVD: 🔒
Entry
Created: 05/25/2026 05:42Updated: 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.
No comments yet. Languages: en.
Please log in to comment.