CVE-2025-14926CWE-94code-injection

CVE-2025-14926

High · published December 24, 2025

CVSS v3.0
7.8
EPSS
0%
Percentile
26.5
In the wild
Unconfirmed
What it is

🚨 A crafty attacker can remotely execute arbitrary code on Hugging Face Transformers installations, but only after a user unwittingly converts a malicious checkpoint! ⚡ Think of this like a food delivery service that accepts any recipe without checking the ingredients — one wrong dish can lead to a disastrous meal. In this case, the convert_config function is like the kitchen that blindly follows the recipe, allowing toxic code to be served. This could lead to an attacker running malicious code in the user's environment, potentially compromising sensitive data or gaining full control of the system. It's like letting a stranger into your home who then rearranges everything or even worse! Without proper validation, the attack surface is significantly larger, making any affected system vulnerable.

Put simply

Think of this like a food delivery service that accepts any recipe without checking the ingredients — one wrong dish can lead to a disastrous meal. In this case, the convert_config function is like the kitchen that blindly follows the recipe, allowing toxic code to be served. The vulnerability exists in the convert_config function, which fails to validate user-supplied strings before executing them as Python code, allowing for remote code execution if a malicious checkpoint is processed.

What to do

This could lead to an attacker running malicious code in the user's environment, potentially compromising sensitive data or gaining full control of the system. It's like letting a stranger into your home who then rearranges everything or even worse! Without proper validation, the attack surface is significantly larger, making any affected system vulnerable. To mitigate this vulnerability, you should update Hugging Face Transformers to the latest version, which includes a patch for this issue. Additionally, avoid converting checkpoints from untrusted sources and implement stricter code validation practices. You've got this! With these steps, you can safeguard your installations and keep your environment secure. 🛡️

The record
Technical detail
CVSS v3.0
7.8 · HIGH
Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00342 · 26.5th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2025-12-24T02:15Z
Affected products (1)
ProductVersionsFixed in
huggingface/transformersall versions—
References (1)
EPSS history
Timeline
  • 23 DEC 21:04Z
    Hugging Face Transformers SEW convert_config Code Injection Remote Code Execution Vulnerability
    cvelistv5