Vulnerability · Published May 30, 2024 · Assigned by @huntr_ai

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

Medium 4.4

In plain English

A medium-severity code injection in huggingface/text-generation-inference from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)4.4Medium
Exploit odds (30 days)0.3%top 75.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPItext-generation2.0.0GHSA-qq99-p57r-g3v7
PyPItext-generation2.0.0PYSEC-2026-1966

Affected products (as reported)

VendorProductVersions
huggingface huggingface/text-generation-inference unspecified – before 2.0.0

Weakness: CWE-94 · Vector: CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N

References