CVE-2025-14928

Hugging · Hugging Face Transformers

A high-severity vulnerability has been identified in multiple Hugging Face products, specifically within the Transformers library.

Executive summary

A high-severity vulnerability has been identified in multiple Hugging Face products, specifically within the Transformers library. This flaw allows a remote attacker to execute arbitrary code on a vulnerable system by tricking it into processing a malicious AI model configuration file. Successful exploitation could lead to a complete system compromise, enabling data theft, service disruption, or further attacks into the network.

Vulnerability

The vulnerability is a code injection flaw within the convert_config function used for the HuBERT model in the Hugging Face Transformers library. The function fails to properly sanitize input when processing model configuration files. An unauthenticated remote attacker can craft a malicious configuration file containing arbitrary commands and host it. If a user or an automated system downloads and attempts to load this malicious model configuration, the embedded commands will be executed on the server with the privileges of the application running the Transformers library, resulting in remote code execution (RCE).

Business impact

This vulnerability is rated as High severity with a CVSS score of 7.8. A successful exploit could have a severe impact on the business, granting an attacker complete control over the affected application server. Potential consequences include the exfiltration of sensitive data such as proprietary AI models, training datasets, or customer information; deployment of ransomware; or using the compromised system as a pivot point to attack other internal network resources. The reputational damage and financial loss from such a compromise could be significant.

Remediation

Immediate Action: The primary remediation is to apply the security patches released by the vendor immediately, prioritizing all internet-facing systems and critical servers that utilize the Hugging Face Transformers library. After patching, review system and application access logs for any signs of compromise or unusual activity preceding the patch application.

Proactive Monitoring:

  • Log Analysis: Monitor application logs for errors or unusual inputs related to the convert_config function. Scrutinize system logs for unexpected child processes or shell commands spawned by the application process responsible for running ML models.
  • Network Traffic: Monitor for anomalous outbound network connections from servers running the vulnerable software, as this could indicate a successful compromise and communication with a command-and-control server.
  • Endpoint Detection: Utilize an Endpoint Detection and Response (EDR) solution to detect suspicious process execution chains, file modifications, or command-line activity originating from the ML application.

Compensating Controls: If immediate patching is not feasible, implement the following controls to reduce risk:

  • Input Sanitization: Only load model configurations from trusted, verified sources. If processing external configurations, use an intermediary service to scan and sanitize the files for malicious code before they are passed to the Transformers library.
  • Sandboxing: Run the model-loading process in a heavily restricted, containerized environment (e.g., Docker) with no network access and minimal file system permissions to limit the impact of a potential code execution event.
  • Principle of Least Privilege: Ensure the service account running the application has the absolute minimum permissions required for its operation.

Exploitation status

Public Exploit Available: false

Analyst recommendation

This vulnerability presents a critical risk to the organization and must be addressed with urgency. Although it is not currently listed on the CISA KEV catalog, its high CVSS score and the potential for complete system compromise warrant immediate action. We strongly recommend that all system owners identify vulnerable instances of the Hugging Face Transformers library and apply the vendor-provided security patches immediately. If patching is delayed, the compensating controls outlined above must be implemented as a temporary mitigation measure.