{"id":"CVE-2024-3924","published":"2024-05-30T14:59:43Z","modified":"2024-08-01T20:26:57Z","title":"Code Injection in huggingface/text-generation-inference","vendor":"huggingface","product":"huggingface/text-generation-inference","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.4,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00319,"percentile":0.25501,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://huntr.com/bounties/8af92fc2-0103-4d29-bb28-c3893154c422","tags":[]},{"url":"https://github.com/huggingface/text-generation-inference/commit/88702d876383f7200eccf67e28ba00500dc804bb","tags":[]}],"priority":{"score":8.2,"factors":[{"name":"EPSS percentile","points":5.1},{"name":"CVSS severity","points":3.08}]},"vendorSlug":"huggingface","affectedVersions":[{"vendor":"huggingface","product":"huggingface/text-generation-inference","versions":[">= unspecified, < 2.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-31T20:21:42.849506Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"text-generation","vulnerableRanges":["<2.0.0"],"patched":["2.0.0"],"from":["GHSA-qq99-p57r-g3v7","PYSEC-2026-1966"],"provenance":"source"}],"summary":{"text":"A code injection flaw exists in the autodocs.yml GitHub Actions workflow of the huggingface/text-generation-inference repository, where the untrusted github.head_ref value is insecurely interpolated into a command used to install a software package. An attacker who can open a pull request from a forked repository can use a crafted branch name to make that command execute arbitrary code on the GitHub Actions runner, which requires user interaction (a maintainer or workflow trigger) and a pull request against the base repository.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:13:40Z"},"euvd":{"id":"EUVD-2024-2148","exploited":false,"provenance":"source"}}