4.4medium
Code Injection in huggingface/text-generation-inference
- Severity
- 4.4medium CVSS:3.0 by @huntr_ai
- Exploit likelihood
- 0.49% (higher than 35% of CVEs)
- Published
- Last changed
- Assigned by
- @huntr_ai
- Also known as
- GHSA-qq99-p57r-g3v7PYSEC-2026-1966
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| huggingface huggingface/text-generation-inference | from unspecified before 2.0.0 | CVE List |
| huggingface text_generation_inference | before 2.0.0 | CVE List |
| text-generation (PyPI) | before 2.0.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| @huntr_ai | 4.4medium CVSS:3.0 | CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 4.4medium CVSS:3.0 | CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N |
| PyPA Advisory Database | 4.4medium CVSS:3.0 | CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Existe una vulnerabilidad de inyección de código en el repositorio huggingface/text-generation-inference, específicamente dentro del archivo de flujo de trabajo `autodocs.yml`. La vulnerabilidad surge del manejo inseguro de la entrada del usuario `github.head_ref`, que se utiliza para construir dinámicamente un comando para instalar un paquete de software. Un atacante puede aprovechar esto bifurcando el repositorio, creando una rama con una carga útil maliciosa como nombre y luego abriendo una solicitud de extracción al repositorio base. La explotación exitosa podría conducir a la ejecución de código arbitrario dentro del contexto del ejecutor de GitHub Actions. Este problema afecta a las versiones hasta la v2.0.0 incluida y se solucionó en la versión 2.0.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-3924 changed 2024-08-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qq99-p57r-g3v7 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2024-3924 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1966 changed 2026-07-07 | CC-BY-4.0 |