CVE-2024-3924 Code Injection in huggingface/text-generation-inference
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
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.
Upgrade path
3 packages: 3 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| huggingface text generation inference | < 2.0.0 | 2.0.0 | Fixed |
| huggingface/text-generation-inference | < 2.0.0 | 2.0.0 | Fixed |
| pypi text-generation(PyPI) | < 2.0.0; = 0.1.0; = 0.2.0; = 0.2.1 +10 more | 2.0.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi text-generation(PyPI) | < 2.0.0 | 2.0.0 |
| pypi text-generation(PyPI) | = 0.1.0 | No fix listed |
| pypi text-generation(PyPI) | = 0.2.0 | No fix listed |
| pypi text-generation(PyPI) | = 0.2.1 | No fix listed |
| pypi text-generation(PyPI) | = 0.3.0 | No fix listed |
| pypi text-generation(PyPI) | = 0.3.1 | No fix listed |
| pypi text-generation(PyPI) | = 0.4.0 | No fix listed |
| pypi text-generation(PyPI) | = 0.4.1 | No fix listed |
| pypi text-generation(PyPI) | = 0.5.0 | No fix listed |
| pypi text-generation(PyPI) | = 0.5.1 | No fix listed |
| pypi text-generation(PyPI) | = 0.5.2 | No fix listed |
| pypi text-generation(PyPI) | = 0.6.0 | No fix listed |
| pypi text-generation(PyPI) | = 0.6.1 | No fix listed |
| pypi text-generation(PyPI) | = 0.7.0 | No fix listed |
| huggingface/text-generation-inference | < 2.0.0 | 2.0.0 |
| huggingface text generation inference | < 2.0.0 | 2.0.0 |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- github.com product
- huntr.com exploit
- pypi.org product
- github.com vendor-advisory