CVE-2023-2800: Transformers Transformers Has Insecure Temporary File Vulnerability
MODERATECVE-2023-2800 is a MODERATE (CVSS 4.7) transformers has insecure temporary file vulnerability (CWE-377: Insecure Temporary File) affecting Transformers libraries in the PyPI ecosystem. The issue involves transformers has insecure temporary file. Remediation is available by upgrading affected packages to version 4.30.0.
CVE-2023-2800 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-2800
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.30.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-2023-2800, 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.30.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-377: Insecure Temporary File, where creating and using insecure temporary files can leave application and system data vulnerable to attack. 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-2023-2800 Affected Transformers Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
transformers
|
PyPI |
< 4.30.0
|
4.30.0
|
References
Frequently Asked Questions
What is CVE-2023-2800?
Which Transformers versions are affected?
What version fixes CVE-2023-2800?
Is transformers affected?
What is the CVSS score of CVE-2023-2800?
What CWE is associated with CVE-2023-2800?
How can I check PyPI dependencies for CVE-2023-2800?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-282v-666c-3fvg",
"modified" : "2024-11-22T20:34:48Z",
"published" : "2023-05-18T18:30:35Z",
"aliases" : [ "CVE-2023-2800" ],
"summary" : "transformers has Insecure Temporary File",
"details" : "Insecure Temporary File in GitHub repository huggingface/transformers 4.29.2 and prior. A fix is available at commit 80ca92470938bbcc348e2d9cf4734c7c25cb1c43 and has been released as part of version 4.30.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "transformers"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.30.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-2800"
}, {
"type" : "WEB",
"url" : "https://github.com/huggingface/transformers/pull/23372"
}, {
"type" : "WEB",
"url" : "https://github.com/huggingface/transformers/commit/80ca92470938bbcc348e2d9cf4734c7c25cb1c43"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/huggingface/transformers"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2023-299.yaml"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/a3867b4e-6701-4418-8c20-3c6e7084a44a"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-377" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-05-19T13:27:42Z",
"nvd_published_at" : "2023-05-18T17:15:08Z"
}
}