CVE-2024-3568: Transformers Transformers Deserialization Of Untrusted Data Vulnerability
LOWCVE-2024-3568 is a LOW (CVSS 3.4) transformers deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Transformers libraries in the PyPI ecosystem. The issue involves transformers deserialization of untrusted data vulnerability. Remediation is available by upgrading affected packages to version 4.38.0.
CVE-2024-3568 at a Glance
Security Impact
CVSS: 3.4
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:C/C:N/I:N/A:L).
How to Fix CVE-2024-3568
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.
pip install transformers>=4.38.0
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-3568, 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.38.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
CVE-2024-3568 Affected Transformers Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
transformers
|
PyPI |
< 4.38.0
|
4.38.0
|
References
Frequently Asked Questions
What is CVE-2024-3568?
Which Transformers versions are affected?
What version fixes CVE-2024-3568?
Is transformers affected?
What is the CVSS score of CVE-2024-3568?
What CWE is associated with CVE-2024-3568?
How can I check PyPI dependencies for CVE-2024-3568?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-37q5-v5qm-c9v8",
"modified" : "2024-04-10T22:20:56Z",
"published" : "2024-04-10T18:30:48Z",
"aliases" : [ "CVE-2024-3568" ],
"summary" : "Transformers Deserialization of Untrusted Data vulnerability",
"details" : "The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "transformers"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.38.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-3568"
}, {
"type" : "WEB",
"url" : "https://github.com/huggingface/transformers/commit/693667b8ac8138b83f8adb6522ddaf42fa07c125"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/huggingface/transformers"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/b3c36992-5264-4d7f-9906-a996efafba8f"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-10T22:20:56Z",
"nvd_published_at" : "2024-04-10T17:15:58Z"
}
}