{"answers":{"affected":"3 open source packages ship an affected version, including text-generation.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-3924 exists.","fix":"Upgrade text-generation to 2.0.0 or later.","what":"CVE-2024-3924 is a medium-severity code injection vulnerability in huggingface/text-generation-inference, published on 30 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-3924 and fix it if it is affected.\n\nWhat it is: CVE-2024-3924 is a medium-severity code injection vulnerability in huggingface/text-generation-inference, published on 30 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-3924 exists.\n\nAffected packages and fixed versions:\n- text-generation (PyPI): affected all versions; fixed in 2.0.0\n- text-generation (PyPI): affected all versions; fixed in 2.0.0\n- text-generation (PyPI): affected all versions; fixed in 2.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-3924/ (Markdown: https://insights.sbomify.com/CVE-2024-3924/index.md)","id":"CVE-2024-3924","markdown":"https://insights.sbomify.com/CVE-2024-3924/index.md","name":"CVE-2024-3924","record":{"aliases":["GHSA-qq99-p57r-g3v7","PYSEC-2026-1966"],"analysis":{"component_type":"developer_tool","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"GitHub Actions workflow","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code on GitHub Actions runners by injecting malicious payloads into branch names via pull requests.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[],"cvss":{"score":4.4,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Code Injection in huggingface/text-generation-inference","id":"CVE-2024-3924","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"Cross-site scripting in Element Pack – Widgets, Templates \u0026 Addons for Elementor","id":"CVE-2024-3925"},"packages":[{"ecosystem":"PyPI","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"text-generation","purl":null,"source":"GHSA-qq99-p57r-g3v7"},{"ecosystem":"PyPI","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"text-generation","purl":"pkg:pypi/text-generation","source":"GHSA-qq99-p57r-g3v7"},{"ecosystem":"PyPI","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"text-generation","purl":"pkg:pypi/text-generation","source":"PYSEC-2026-1966"}],"prev":{"headline":"Beaver Builder – WordPress Page Builder \u003c= 2.8.1.1 - Authenticated (Contributor+) Stored Cross-Site Scripting","id":"CVE-2024-3923"},"products":["huggingface/text-generation-inference"],"published":"2024-05-30","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-01","vendors":["huggingface"]},"summary":"Attackers can execute arbitrary code on GitHub Actions runners by injecting malicious payloads into branch names via pull requests.","url":"https://insights.sbomify.com/CVE-2024-3924/"}