# CVE-2024-3924: Code Injection in huggingface/text-generation-inference

- Severity: Medium 4.4 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 35% of CVEs (2026-11-29)
- Published: 2024-05-30T14:59:43.416Z
- Modified: 2026-07-07T17:56:12.574Z
- Also known as: GHSA-qq99-p57r-g3v7, PYSEC-2026-1966
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- huggingface huggingface/text-generation-inference: from unspecified before 2.0.0
- huggingface text_generation_inference: before 2.0.0
- text-generation (PyPI): before 2.0.0

## Every score

- @huntr_ai: CVSS:3.0 4.4 Medium `CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.0 4.4 Medium `CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.0 4.4 Medium `CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://huntr.com/bounties/8af92fc2-0103-4d29-bb28-c3893154c422> (web)
- <https://github.com/huggingface/text-generation-inference/commit/88702d876383f7200eccf67e28ba00500dc804bb> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-3924> (advisory)
- <https://github.com/huggingface/text-generation-inference> (package)
- <https://pypi.org/project/text-generation> (package)
- <https://github.com/advisories/GHSA-qq99-p57r-g3v7> (advisory)

## Sources

- CVE List: [CVE-2024-3924](https://www.cve.org/CVERecord?id=CVE-2024-3924), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-qq99-p57r-g3v7](https://github.com/advisories/GHSA-qq99-p57r-g3v7), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2024-3924](https://nvd.nist.gov/vuln/detail/CVE-2024-3924), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1966](https://osv.dev/vulnerability/PYSEC-2026-1966), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-3924 · Whole record: https://cve.day/CVE-2024-3924.json · Rebuilt by cve.day 2026-11-25T22:58:41.114Z
