Skip to content
Heist/ feed
Back to feed
Medium

Code Injection in huggingface/text-generation-inference

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-3924
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 13:08 UTC · Revision 1

Source evidence

Code Injection in huggingface/text-generation-inference

core-osv · Original source

Published 30 May 2024, 14:59 UTC

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.

osv:CVE-2024-3924
Complete source record
{
  "id": "4f309dd9a79d02b566e48b2293ac5d07ffa950af38fd9fe271e71d60603741d1",
  "url": "https://osv.dev/vulnerability/CVE-2024-3924",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Code Injection in huggingface/text-generation-inference",
    "summary": "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.",
    "evidence": "osv:CVE-2024-3924",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-3924",
      "aliases": [
        "CVE-2024-3924",
        "GHSA-qq99-p57r-g3v7",
        "PYSEC-2026-1966"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/huggingface/text-generation-inference",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c38a7d7ddd9c612e368adec1ef94583be602fc7e"
                },
                {
                  "fixed": "88702d876383f7200eccf67e28ba00500dc804bb"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "SplitRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "88702d876383f7200eccf67e28ba00500dc804bb"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.4.5",
            "v1.4.4",
            "v1.4.3",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.4",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.9.4",
            "v0.9.3",
            "v0.9.2",
            "v0.9.1",
            "v0.9.0",
            "v0.8.2",
            "v0.8.1",
            "v0.8.0",
            "v0.7.0",
            "v0.6.0",
            "v0.5.0",
            "v0.4.3",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.1",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-3924.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.777100856Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/8af92fc2-0103-4d29-bb28-c3893154c422",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3924.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-3924",
        "https://github.com/huggingface/text-generation-inference/commit/88702d876383f7200eccf67e28ba00500dc804bb"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-94"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3924.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-3924",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 495675,
  "published_at": "2024-05-30T14:59:43.416+00:00"
}