CVE-2024-3924
JSON

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 packageVersionsReported by
huggingface huggingface/text-generation-inferencefrom unspecified before 2.0.0CVE List
huggingface text_generation_inferencebefore 2.0.0CVE List
text-generation (PyPI)before 2.0.0GitHub Advisory Database, PyPA Advisory Database

All scores

@huntr_ai4.4medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
GitHub4.4medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
PyPA Advisory Database4.4medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-94

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

SourceRecordLicence
CVE ListCVE-2024-3924 changed 2024-08-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-qq99-p57r-g3v7 changed 2026-07-07CC-BY-4.0
NVDCVE-2024-3924 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1966 changed 2026-07-07CC-BY-4.0