Skip to content

GHSA-282v-666c-3fvg CVE-2023-2800 PYSEC-2023-299

transformers has Insecure Temporary File

Medium PyPI
Severity
4.7 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.29%
Chance of exploitation in the next 30 days. Higher than 21.04% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-377 Insecure Temporary File
Fix
4.30.0
Upgrade transformers to this version or later

Description

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.

Affected versions

PyPI

PackageVulnerableFixed in
transformers
< 4.30.0
4.30.0
transformers
< 4.30.0
4.30.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

transformers PyPI → 4.30.0

pip
pip install --upgrade "transformers>=4.30.0"
poetry
poetry add "transformers>=4.30.0"
uv
uv add "transformers>=4.30.0"

Severity breakdown

CVSS 3.1 4.7

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-377: Insecure Temporary File

Creating and using insecure temporary files can leave application and system data vulnerable to attack.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-x9r9-c232-4q39
Hugging Face Transformers downloads custom generation code before trust consent
High Also affects transformers
GHSA-xrqw-3rrv-vx5w
Transformers save_pretrained path traversal allows arbitrary file writes through chat template names
High Also affects transformers
GHSA-fgcw-684q-jj6r
huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path
Critical Also affects transformers
GHSA-29pf-2h5f-8g72
HuggingFace transformers vulnerable to remote code execution
High Also affects transformers
GHSA-69w3-r845-3855
HuggingFace Transformers allows for arbitrary code execution in the `Trainer` class
High Also affects transformers
PYSEC-2025-218
Hugging Face Transformers GLM4 Deserialization of Untrusted Data Remote Code Execution Vulnerability.
High Also affects transformers
PYSEC-2025-217
Hugging Face Transformers X-CLIP Checkpoint Conversion Deserialization of Untrusted Data Remote Code Execution Vulnerability.
High Also affects transformers
PYSEC-2025-216
Hugging Face Transformers HuBERT convert_config Code Injection Remote Code Execution Vulnerability.
High Also affects transformers
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor