CVE-2024-11392: Transformers Deserialization Of Untrusted Data Vulnerability

HIGH
Advisory Identifier: GHSA-qxrp-vhvm-j765
CVSS 7.5
CWE-502
Published
Advisory Summary

CVE-2024-11392 is a HIGH (CVSS 7.5) deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Transformers libraries in the PyPI ecosystem. The issue involves deserialization of untrusted data in hugging face transformers. Remediation is available by upgrading affected packages to version 4.48.0.

CVE-2024-11392 at a Glance

CVE Identifier CVE-2024-11392
GHSA Identifier GHSA-qxrp-vhvm-j765
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Transformers
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-11392

To remediate this vulnerability, upgrade all affected Transformers dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

transformers fixed: 4.48.0
pip install transformers>=4.48.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show transformers

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-11392, inspect your installed packages using pip:

pip show transformers

Analyze the terminal output to locate any version of Transformers in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.48.0), your application is affected.

Note: The pip show transformers command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Transformers, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Hugging Face Transformers MobileViTV2 Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the handling of configuration files. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-24322.

CVE-2024-11392 Affected Transformers Versions

1 component(s)
Fixed Versions:
4.48.0
Product / Package Ecosystem Affected Versions Fixed Version
transformers
PyPI
< 4.48.0
4.48.0

References

Frequently Asked Questions

What is CVE-2024-11392?
CVE-2024-11392 is a security vulnerability in Transformers involving Deserialization of Untrusted Data in Hugging Face Transformers under CWE-502: Deserialization of Untrusted Data.
Which Transformers versions are affected?
Affected versions include releases prior to 4.48.0 across affected packages: transformers.
What version fixes CVE-2024-11392?
Upgrading to 4.48.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is transformers affected?
Yes, transformers is affected in releases prior to 4.48.0. Upgrade your dependency to 4.48.0 or later.
What is the CVSS score of CVE-2024-11392?
CVE-2024-11392 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-11392?
CVE-2024-11392 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2024-11392?
Run the dependency tree command: 'pip show transformers'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qxrp-vhvm-j765",
  "modified" : "2025-02-13T22:15:58Z",
  "published" : "2024-11-23T03:31:58Z",
  "aliases" : [ "CVE-2024-11392" ],
  "summary" : "Deserialization of Untrusted Data in Hugging Face Transformers",
  "details" : "Hugging Face Transformers MobileViTV2 Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the handling of configuration files. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-24322.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "transformers"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.48.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-11392"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/huggingface/transformers/issues/34840"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/huggingface/transformers/pull/35296"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/huggingface/transformers"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2024-227.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.zerodayinitiative.com/advisories/ZDI-24-1513"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-11T15:04:55Z",
    "nvd_published_at" : "2024-11-22T22:15:06Z"
  }
}