Wednesday, May 7, 2025
HomeCyber Security NewsCodeQLEAKED: GitHub Supply Chain Attack Enables Code Execution via CodeQL Repositories

CodeQLEAKED: GitHub Supply Chain Attack Enables Code Execution via CodeQL Repositories

Published on

SIEM as a Service

Follow Us on Google News

A recent discovery has revealed a potential supply chain attack vulnerability in GitHub’s CodeQL repositories, which could have led to wide-ranging consequences for hundreds of thousands of GitHub users.

The exploit hinges on a publicly exposed secret found in a GitHub Actions workflow artifact, which, if utilized by an attacker, could allow malicious code execution in multiple repositories.

Despite GitHub’s assertions that no compromise occurred, the severity of this vulnerability highlights the ongoing challenges in maintaining the security of continuous integration and continuous delivery (CI/CD) environments.

- Advertisement - Google News

Background on CodeQL and GitHub Actions

CodeQL is GitHub’s powerful code analysis engine designed to identify vulnerabilities in repository code.

It has been instrumental in discovering several hundred CVEs, protecting organizations from potential breaches. However, this same critical role makes it an attractive target for attackers looking to exploit vulnerabilities.

GitHub Actions, on the other hand, is the platform’s CI/CD tool. It automates workflows for building, testing, and deploying code across repositories.

These workflows often rely on tokens like the GITHUB_TOKEN to authenticate and interact with GitHub. Tokens with high privileges pose significant risks if compromised.

GitHub App token installation token stored in a file containing the environment variables of the GitHub Runner executing the workflow
GitHub App token installation token stored in a file containing the environment variables of the GitHub Runner executing the workflow

The Vulnerability: “CodeQLEAKED”

In January 2025, security researchers embarked on a project to explore potential vulnerabilities in GitHub Actions workflows.

The GitHub token had full write privileges
The GitHub token had full write privileges

This investigation used a custom-built Actions Artifact Secrets Scanner, which downloaded and scanned GitHub Actions artifacts for exposed secrets.

The scanner uncovered a GitHub App installation token buried within an artifact from the github/codeql-action repository. This token, although valid for only a short duration, had full write permissions.

The exposed secret posed a risk because it was stored in an artifact uploaded during a workflow job using the v4 artifact upload API.

This allowed potential attackers to retrieve the artifact and extract the token before the workflow job completed. The crux of the vulnerability was the race against time: attackers had about two seconds to exploit the token before it expired.

Proving the Vulnerability

To demonstrate the exploit’s potential, researchers created a Python script named artifact_racer.py.

This tool continuously monitored the github/codeql-action repository for specific workflows, downloaded associated artifacts when detected, extracted the GITHUB_TOKEN, and used it to create a new branch and push an empty file to the branch.

The successful execution of these actions within the two-second window confirmed that an attacker could indeed exploit the vulnerability for malicious purposes.

Proving the Vulnerability
Proving the Vulnerability

Impact of the Vulnerability

The implications of this vulnerability are far-reaching. If an attacker could manipulate the github/codeql-action repository by adding malicious code and tags, they could compromise hundreds of thousands of repositories that enable CodeQL.

malicious code and tags
malicious code and tags

This could involve:

  1. Intellectual Property Exfiltration: Repositories using default CodeQL settings would execute malicious actions allowing attackers to access sensitive code.
  2. Supply Chain Attacks: By modifying tags used in CodeQL actions, attackers could inject malicious code into any dependency relying on these tags.
  3. GitHub Actions Secrets Compromise: With code execution capabilities, attackers could potentially exfiltrate sensitive secrets stored in GitHub Actions workflows.

The discovery was responsibly disclosed to GitHub, which investigated and acknowledged the vulnerability as CVE-2025-24362.

Despite no reported compromises, the situation highlights the importance of vigilant monitoring and secure practices in managing CI/CD environments.

The “CodeQLEAKED” incident underscores the challenges in securing complex software ecosystems like GitHub.

It emphasizes the need for robust secret management practices, timely vulnerability disclosure, and strict monitoring of workflow artifacts to prevent similar supply chain attacks.

As code repositories increasingly depend on automation tools like GitHub Actions and analysis engines like CodeQL, ensuring their integrity is crucial for protecting intellectual property and maintaining security across digital ecosystems.

Are you from SOC/DFIR Teams? – Analyse Malware, Phishing Incidents & get live Access with ANY.RUN -> Start Now for Free. 

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

Researchers Simulate DPRK’s Largest Cryptocurrency Heist Through Compromised macOS Developer and AWS Pivoting

Security researchers at Elastic have recreated the intricate details of the February 21, 2025,...

Lampion Banking Malware Uses ClickFix Lures to Steal Banking Credentials

Unit 42 researchers at Palo Alto Networks, a highly targeted malicious campaign orchestrated by...

DragonForce: Emerging Hybrid Cyber Threat in the 2025 Ransomware Landscape

DragonForce has swiftly risen as a formidable player in 2025, embodying a hybrid threat...

Mirai Botnet Actively Targeting GeoVision IoT Devices for Command Injection Exploits

The Akamai Security Intelligence and Response Team (SIRT) has identified active exploitation of command...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

Researchers Simulate DPRK’s Largest Cryptocurrency Heist Through Compromised macOS Developer and AWS Pivoting

Security researchers at Elastic have recreated the intricate details of the February 21, 2025,...

Lampion Banking Malware Uses ClickFix Lures to Steal Banking Credentials

Unit 42 researchers at Palo Alto Networks, a highly targeted malicious campaign orchestrated by...

DragonForce: Emerging Hybrid Cyber Threat in the 2025 Ransomware Landscape

DragonForce has swiftly risen as a formidable player in 2025, embodying a hybrid threat...