CVE-2025-24362: Github/codeql action GitHub PAT Written To Debug Vulnerability
HIGHCVE-2025-24362 is a HIGH github pat written to debug vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Github/codeql action libraries in the GitHub Actions ecosystem. The issue involves github pat written to debug artifacts. Remediation is available by upgrading affected packages to version 3.28.3.
CVE-2025-24362 at a Glance
How to Fix CVE-2025-24362
To remediate this vulnerability, upgrade all affected Github/codeql action dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github/codeql-action to 3.28.3
Upgrade github/codeql-action to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github/codeql-action
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-24362, inspect your project dependencies for Github/codeql action:
inspect dependencies for github/codeql-action
Analyze the terminal output to locate any version of Github/codeql action in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.28.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Github/codeql action, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-24362 Affected Github/codeql action Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github/codeql-action
|
GitHub Actions |
≥ 3.26.11
< 3.28.3
|
3.28.3
|
|
github/codeql-action
|
GitHub Actions |
≥ 2.26.11
|
|
References
Frequently Asked Questions
What is CVE-2025-24362?
Which Github/codeql action versions are affected?
What version fixes CVE-2025-24362?
Is github/codeql-action affected?
What CWE is associated with CVE-2025-24362?
How can I check GitHub Actions dependencies for CVE-2025-24362?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vqf5-2xx6-9wfm",
"modified" : "2025-03-31T21:55:42Z",
"published" : "2025-01-24T18:44:55Z",
"aliases" : [ "CVE-2025-24362" ],
"summary" : "GitHub PAT written to debug artifacts",
"details" : "### Impact summary\n\nIn some circumstances, debug artifacts uploaded by the CodeQL Action after a failed code scanning workflow run may contain the environment variables from the workflow run, including any secrets that were exposed as environment variables to the workflow. Users with read access to the repository would be able to access this artifact, containing any secrets from the environment.\n\nFor some affected workflow runs, the exposed environment variables in the debug artifacts included a valid `GITHUB_TOKEN` for the workflow run, which has access to the repository in which the workflow ran, and all the permissions specified in the workflow or job. The `GITHUB_TOKEN` is valid until the job completes or 24 hours has elapsed, whichever comes first.\n\nEnvironment variables are exposed only from workflow runs that satisfy all of the following conditions:\n- Code scanning workflow configured to scan the Java/Kotlin languages.\n- Running in a repository containing Kotlin source code.\n- Running with [debug artifacts enabled](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/logs-not-detailed-enough).\n- Using CodeQL Action versions <= 3.28.2, and CodeQL CLI versions >= 2.9.2 (May 2022) and <= 2.20.2.\n- The workflow run fails before the CodeQL database is finalized within the `github/codeql-action/analyze` step.\n- Running in any GitHub environment: GitHub.com, GitHub Enterprise Cloud, and GitHub Enterprise Server. (Note: artifacts are only accessible to users within the same GitHub environment with access to the scanned repo.)\n\nThe `GITHUB_TOKEN` exposed in this way would only have been valid for workflow runs that satisfy all of the following conditions, in addition to the conditions above:\n- Using CodeQL Action versions >= 3.26.11 (October 2024) and <= 3.28.2, or >= 2.26.11 and < 3.\n- Running in GitHub.com or GitHub Enterprise Cloud only (not valid on GitHub Enterprise Server).\n\nIn rare cases during advanced setup, logging of environment variables may also occur during database creation of Java, Swift, and C/C++. Please read the corresponding CodeQL CLI advisory [GHSA-gqh3-9prg-j95m](https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gqh3-9prg-j95m) for more details.\n\n\n### Impact details\n\nIn CodeQL CLI versions >= 2.9.2 and <= 2.20.2, the CodeQL Kotlin extractor logs all environment variables by default into an intermediate file during the process of creating a CodeQL database for Kotlin code. \nThis is a part of the CodeQL CLI and is invoked by the CodeQL Action for analyzing Kotlin repositories. \nOn Actions, the environment variables logged include GITHUB_TOKEN, which grants permissions to the repository being scanned.\n\nThe intermediate file containing environment variables is deleted when finalizing the database, so it is not included in a successfully created database. It is, however, included in the debug artifact that is uploaded on a failed analysis run if the CodeQL Action was invoked in debug mode.\n\nTherefore, under these specific circumstances (incomplete database creation using the CodeQL Action in debug mode) an attacker with access to the debug artifact would gain unauthorized access to repository secrets from the environment, including both the `GITHUB_TOKEN` and any user-configured secrets made available via environment variables.\n\nThe impact of the `GITHUB_TOKEN` leaked in this environment is limited:\n- For workflows on GitHub.com and GitHub Enterprise Cloud using CodeQL Action versions >= 3.26.11 and <= 3.28.2, or >= 2.26.11 and < 3, which in turn use the `actions/artifacts v4` library, the debug artifact is uploaded before the workflow job completes. During this time the `GITHUB_TOKEN` is still valid, providing an opportunity for attackers to gain access to the repository.\n- For all other workflows, the debug artifact is uploaded after the workflow job completes, at which point the leaked `GITHUB_TOKEN` has been revoked and cannot be used to access the repository.\n\n### Mitigations\n\nUpdate to CodeQL Action version 3.28.3 or later, or CodeQL CLI version 2.20.3 or later.\n\n### Patches\n\nThis vulnerability has been fixed in CodeQL Action version 3.28.3, which no longer uploads database artifacts in debug mode.\nThis vulnerability will be fixed in CodeQL CLI version 2.20.3, in which database creation for all languages no longer logs the complete environment by default.\n\n### References\n\n- [Pull request that bundled CodeQL CLI 2.9.2 with Kotlin extractor environment variable logging ](https://github.com/github/codeql-action/pull/1074)\n- [Pull request that introduced the `actions/artifacts v4` library, allowing for `GITHUB_TOKEN` exposure in the CodeQL Action debug artifacts before the token was revoked](https://github.com/github/codeql-action/pull/2482)\n- [Related security advisory for the CodeQL CLI](https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gqh3-9prg-j95m)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "GitHub Actions",
"name" : "github/codeql-action"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.26.11"
}, {
"fixed" : "3.28.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.28.2"
}
}, {
"package" : {
"ecosystem" : "GitHub Actions",
"name" : "github/codeql-action"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.26.11"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 3.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/github/codeql-action/security/advisories/GHSA-vqf5-2xx6-9wfm"
}, {
"type" : "WEB",
"url" : "https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gqh3-9prg-j95m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24362"
}, {
"type" : "WEB",
"url" : "https://github.com/github/codeql-action/pull/1074"
}, {
"type" : "WEB",
"url" : "https://github.com/github/codeql-action/pull/2482"
}, {
"type" : "WEB",
"url" : "https://github.com/github/codeql-action/commit/519de26711ecad48bde264c51e414658a82ef3fa"
}, {
"type" : "WEB",
"url" : "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/logs-not-detailed-enough"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/github/codeql-action"
}, {
"type" : "WEB",
"url" : "https://news.ycombinator.com/item?id=43527044"
}, {
"type" : "WEB",
"url" : "https://www.praetorian.com/blog/codeqleaked-public-secrets-exposure-leads-to-supply-chain-attack-on-github-codeql"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-215", "CWE-532" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-24T18:44:55Z",
"nvd_published_at" : "2025-01-24T18:15:32Z"
}
}