CVE-2023-2800: Insecure Temporary File in transformers
Summary
CVE-2023-2800: transformers has Insecure Temporary File. Affects transformers versions < 4.30.0. Fixed in 4.30.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The transformers package is a popular Python library used for natural language processing tasks, such as text classification, translation, and summarization. It provides a high-level API for utilizing pre-trained models and fine-tuning them on specific tasks. The package is widely used in various applications and has a large user community.
Vulnerability Detail
The vulnerability identified in the transformers package (version 4.29.2 and prior) is an insecure temporary file issue. This vulnerability allows an attacker to exploit the temporary file created by the package during certain operations. By manipulating the temporary file, an attacker could potentially overwrite or modify sensitive data, leading to unauthorized access or other security breaches. The vulnerability has a CVSS score of 4.7, indicating a moderate severity level.
How To Fix
Latest published version: 5.20.2 as of 22 Oct 2026
pip install --upgrade "transformers==5.20.2"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.30.0
This is the first release that contains the fix.
pip install --upgrade "transformers==4.30.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The insecure temporary file vulnerability in the transformers package (version 4.29.2 and prior) can be mitigated by updating to version 4.30.0 or later. It is recommended to promptly apply the fix to ensure the security of your application. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for transformers →
FAQ
The vulnerability allows an attacker to manipulate temporary files created by the transformers package, potentially leading to unauthorized access or modification of sensitive data.
At the time of this advisory, there are no known public exploits targeting this vulnerability.
No, only versions 4.29.2 and prior are affected. Updating to version 4.30.0 or later will address the vulnerability.
No, the recommended solution is to update the transformers package to the latest version.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it for any open-source vulnerabilities, including this one.
References
Related vulnerabilities
Recent vulnerabilities recorded for transformers.