A significant vulnerability in GitHub’s CodeQL actions could have permitted attackers to execute malicious code across hundreds of thousands of repositories.
The vulnerability, assigned CVE-2025-24362, originated from a publicly exposed GitHub token in workflow artifacts that created a small but exploitable window of opportunity.
The vulnerability was discovered in January 2025 by a security researcher from Praetorian who detected a GitHub token with extensive privileges exposed in debug artifacts of the github/codeql-action repository.
Despite being valid for only 1.022 seconds, the researcher demonstrated that this narrow timeframe could be exploited through a race condition.
Using a custom-built tool called “artifact_racer.py,” the researcher proved that within this brief window, an attacker could download the artifact, extract the token, and perform repository operations including creating branches, pushing files, and crucially, creating tags:
“If an attacker removed and then added a v3 tag to their malicious commit, every single repository using the default CodeQL workflow would execute their malicious code,” explained the researcher in their report.
The implications were far-reaching due to CodeQL’s widespread adoption.
When users enable CodeQL in their repository settings, GitHub creates a workflow that executes actions from the github/codeql-action repository referenced by specific tags. Since these tags were not immutable, an attacker could replace them with references to malicious code.
The compromised token had significant privileges, including “Contents: write,” “Actions: write,” and “Packages: write,” allowing for extensive repository manipulation.
The token’s short lifespan proved insufficient as a security barrier. This attack vector presented four primary impact scenarios:
Particularly concerning was the potential for “GitHub Actions Cache Poisoning” through tools like Cacheract, which could maintain persistence even after the initial vulnerability was patched.
The malware would predict cache entries, overwrite them with malicious actions, and gain execution capabilities within workflows using action-cache. High-profile repositories identified as potentially vulnerable included Homebrew, Angular, and Grafana.
Within three hours of the report submission on January 22, 2025, GitHub acknowledged the vulnerability, disabled the problematic workflow, and submitted a pull request to prevent debug artifact uploads.
Two days later, they assigned CVE-2025-24362 and published an advisory stating they found no evidence of actual exploitation.
The vulnerability was fixed in CodeQL Action version 3.28.3. Security experts recommend several precautions for GitHub Actions users:
This vulnerability underscores growing concerns around supply chain attacks targeting CI/CD systems.
Similar to the recent tj-actions/changed-files incident, it demonstrates how seemingly minor issues in development tooling can cascade into significant security risks for the broader ecosystem.
Investigate Real-World Malicious Links & Phishing Attacks With Threat Intelligence Lookup - Try for Free
Google has released an important Chrome 153 security update that fixes 42 vulnerabilities across the…
The Cybersecurity and Infrastructure Security Agency (CISA) and the National Institute of Standards and Technology…
CISA and five international cybersecurity agencies have released detailed guidance describing 17 common techniques hackers…
Apple has released one of its largest coordinated security rollouts, addressing 273 distinct critical vulnerabilities…
You can’t detect today's attacks with yesterday’s threat intelligence; that’s how you could briefly formulate…
Microsoft has published a draft Humanist AI Code of Conduct that would prohibit its in-house…