CVE-2024-3924: Code Injection in huggingface/text-generation-inference
Vulnerability summary
CVE-2024-3924 is a medium (CVSS 4.4) Improper Control of Generation of Code vulnerability in huggingface huggingface/text-generation-inference. EPSS estimates a 0.32% chance of exploitation in the next 30 days, higher than 24.9% of scored vulnerabilities.
Not severe (CVSS 4.4, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 30-05-2024PublishedVulnerability first disclosed.
- 01-08-2024Last modifiedVulnerability information updated.
Description
A code injection vulnerability exists in the huggingface/text-generation-inference repository, specifically within the `autodocs.yml` workflow file. The vulnerability arises from the insecure handling of the `github.head_ref` user input, which is used to dynamically construct a command for installing a software package. An attacker can exploit this by forking the repository, creating a branch with a malicious payload as the name, and then opening a pull request to the base repository. Successful exploitation could lead to arbitrary code execution within the context of the GitHub Actions runner. This issue affects versions up to and including v2.0.0 and was fixed in version 2.0.0.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · PypiEcosystem advisory · calculated4.4MediumCVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
- NVDNIST4.4MediumCVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.32%
Chance of exploitation in the next 30 days
Percentile
25%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.32% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Huggingface1 product
- huggingface/text-generation-inference≥ unspecified, < 2.0.0
PyPI1 product
- text-generation< 2.0.0
2 vendors · 2 products