CVE-2024-25129
GitHub CodeQL XML External Entity Attack
Description
The CodeQL CLI repo holds binaries for the CodeQL command line interface (CLI). Prior to version 2.16.3, an XML parser used by the CodeQL CLI to read various auxiliary files is vulnerable to an XML External Entity attack. If a vulnerable version of the CLI is used to process either a maliciously modified CodeQL database, or a specially prepared set of QL query sources, the CLI can be made to make an outgoing HTTP request to an URL that contains material read from a local file chosen by the attacker. This may result in a loss of privacy of exfiltration of secrets. Security researchers and QL authors who receive databases or QL source files from untrusted sources may be impacted. A single untrusted `.ql` or `.qll` file cannot be affected, but a zip archive or tarball containing QL sources may unpack auxiliary files that will trigger an attack when CodeQL sees them in the file system. Those using CodeQL for routine analysis of source trees with a preselected set of trusted queries are not affected. In particular, extracting XML files from a source tree into the CodeQL database does not make one vulnerable. The problem is fixed in release 2.16.3 of the CodeQL CLI. Other than upgrading, workarounds include not accepting CodeQL databases or queries from untrusted sources, or only processing such material on a machine without an Internet connection. Customers who use older releases of CodeQL for security scanning in an automated CI system and cannot upgrade for compliance reasons can continue using that version. That use case is safe. If such customers have a private query pack and use the `codeql pack create` command to precompile them before using them in the CI system, they should be using the production CodeQL release to run `codeql pack create`. That command is safe as long as the QL source it precompiled is trusted. All other development of the query pack should use an upgraded CLI.
INFO
Published Date :
Feb. 22, 2024, 7:15 p.m.
Last Modified :
Feb. 5, 2025, 9:59 p.m.
Source :
[email protected]
Remotely Exploitable :
No
Impact Score :
3.6
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-25129
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-25129
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-25129
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Feb. 05, 2025
Action Type Old Value New Value Added CVSS V3.1 NIST AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N Added CWE NIST CWE-611 Added CPE Configuration OR *cpe:2.3:a:github:codeql_cli:*:*:*:*:*:*:*:* versions up to (excluding) 2.16.3 Changed Reference Type https://github.com/github/codeql-cli-binaries/releases/tag/v2.16.3 No Types Assigned https://github.com/github/codeql-cli-binaries/releases/tag/v2.16.3 Release Notes Changed Reference Type https://github.com/github/codeql-cli-binaries/releases/tag/v2.16.3 No Types Assigned https://github.com/github/codeql-cli-binaries/releases/tag/v2.16.3 Release Notes Changed Reference Type https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gf8p-v3g3-3wph No Types Assigned https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gf8p-v3g3-3wph Vendor Advisory Changed Reference Type https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gf8p-v3g3-3wph No Types Assigned https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gf8p-v3g3-3wph Vendor Advisory Changed Reference Type https://github.com/github/codeql/blob/main/java/ql/src/Security/CWE/CWE-611/XXELocal.ql No Types Assigned https://github.com/github/codeql/blob/main/java/ql/src/Security/CWE/CWE-611/XXELocal.ql Broken Link Changed Reference Type https://github.com/github/codeql/blob/main/java/ql/src/Security/CWE/CWE-611/XXELocal.ql No Types Assigned https://github.com/github/codeql/blob/main/java/ql/src/Security/CWE/CWE-611/XXELocal.ql Broken Link -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://github.com/github/codeql/blob/main/java/ql/src/Security/CWE/CWE-611/XXELocal.ql Added Reference https://github.com/github/codeql-cli-binaries/releases/tag/v2.16.3 Added Reference https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gf8p-v3g3-3wph -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Received by [email protected]
Feb. 22, 2024
Action Type Old Value New Value Added Description The CodeQL CLI repo holds binaries for the CodeQL command line interface (CLI). Prior to version 2.16.3, an XML parser used by the CodeQL CLI to read various auxiliary files is vulnerable to an XML External Entity attack. If a vulnerable version of the CLI is used to process either a maliciously modified CodeQL database, or a specially prepared set of QL query sources, the CLI can be made to make an outgoing HTTP request to an URL that contains material read from a local file chosen by the attacker. This may result in a loss of privacy of exfiltration of secrets. Security researchers and QL authors who receive databases or QL source files from untrusted sources may be impacted. A single untrusted `.ql` or `.qll` file cannot be affected, but a zip archive or tarball containing QL sources may unpack auxiliary files that will trigger an attack when CodeQL sees them in the file system. Those using CodeQL for routine analysis of source trees with a preselected set of trusted queries are not affected. In particular, extracting XML files from a source tree into the CodeQL database does not make one vulnerable. The problem is fixed in release 2.16.3 of the CodeQL CLI. Other than upgrading, workarounds include not accepting CodeQL databases or queries from untrusted sources, or only processing such material on a machine without an Internet connection. Customers who use older releases of CodeQL for security scanning in an automated CI system and cannot upgrade for compliance reasons can continue using that version. That use case is safe. If such customers have a private query pack and use the `codeql pack create` command to precompile them before using them in the CI system, they should be using the production CodeQL release to run `codeql pack create`. That command is safe as long as the QL source it precompiled is trusted. All other development of the query pack should use an upgraded CLI. Added Reference GitHub, Inc. https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gf8p-v3g3-3wph [No types assigned] Added Reference GitHub, Inc. https://github.com/github/codeql-cli-binaries/releases/tag/v2.16.3 [No types assigned] Added Reference GitHub, Inc. https://github.com/github/codeql/blob/main/java/ql/src/Security/CWE/CWE-611/XXELocal.ql [No types assigned] Added CWE GitHub, Inc. CWE-611 Added CVSS V3.1 GitHub, Inc. AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-25129
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-25129
weaknesses.