CVE-2025-24362

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-24362
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-24362.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-24362
Related
  • GHSA-gqh3-9prg-j95m
  • GHSA-vqf5-2xx6-9wfm
Published
2025-01-24T18:15:32Z
Modified
2025-01-25T01:57:57.337756Z
Summary
[none]
Details

In 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. This vulnerability is patched in CodeQL Action version 3.28.3 or later, or CodeQL CLI version 2.20.3 or later.

For 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.

Environment variables are exposed only from workflow runs that satisfy all of the following conditions: - Code scanning workflow configured to scan the Java/Kotlin languages. - Running in a repository containing Kotlin source code. - Running with debug artifacts enabled. - Using CodeQL Action versions <= 3.28.2, and CodeQL CLI versions >= 2.9.2 (May 2022) and <= 2.20.2. - The workflow run fails before the CodeQL database is finalized within the github/codeql-action/analyze step. - 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.

The 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: - Using CodeQL Action versions >= 3.26.11 (October 2024) and <= 3.28.2, or >= 2.26.11 and < 3. - Running in GitHub.com or GitHub Enterprise Cloud only (not valid on GitHub Enterprise Server).

In 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 for more details.

In 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. This is a part of the CodeQL CLI and is invoked by the CodeQL Action for analyzing Kotlin repositories.

On Actions, the environment variables logged include GITHUB_TOKEN, which grants permissions to the repository being scanned. The 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.

Therefore, 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.

The impact of the GITHUB_TOKEN leaked in this environment is limited: - 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. - 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.

References

Affected packages

Git / github.com/github/codeql-action

Affected ranges

Type
GIT
Repo
https://github.com/github/codeql-action
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

Other

TEST
bundle-test
bundle-test-20200812
codeql-bundle-20200601
codeql-bundle-20200630
codeql-bundle-20200812
codeql-bundle-20200826
codeql-bundle-20201008
codeql-bundle-20201028
codeql-bundle-20201106
codeql-bundle-20201127
codeql-bundle-20210127
codeql-bundle-20210304
codeql-bundle-20210308
codeql-bundle-20210319
codeql-bundle-20210326
codeql-bundle-20210419
codeql-bundle-20210421
codeql-bundle-20210429
codeql-bundle-20210430
codeql-bundle-20210503
codeql-bundle-20210507
codeql-bundle-20210509
codeql-bundle-20210517
codeql-bundle-20210621
codeql-bundle-20210622
codeql-bundle-20210628
codeql-bundle-20210702
codeql-bundle-20210726
codeql-bundle-20210805
codeql-bundle-20210809
codeql-bundle-20210824
codeql-bundle-20210907
codeql-bundle-20210909
codeql-bundle-20210921
codeql-bundle-20211005
codeql-bundle-20211013
codeql-bundle-20211025
codeql-bundle-20211115
codeql-bundle-20211122
codeql-bundle-20211207
codeql-bundle-20211208
codeql-bundle-20220104
codeql-bundle-20220112
codeql-bundle-20220120
codeql-bundle-20220128
codeql-bundle-20220211
codeql-bundle-20220214
codeql-bundle-20220224
codeql-bundle-20220311
codeql-bundle-20220321
codeql-bundle-20220322
codeql-bundle-20220401
codeql-bundle-20220421
codeql-bundle-20220428
codeql-bundle-20220512
codeql-bundle-20220525
codeql-bundle-20220527
codeql-bundle-20220615
codeql-bundle-20220623
codeql-bundle-20220714
codeql-bundle-20220728
codeql-bundle-20220811
codeql-bundle-20220825
codeql-bundle-20220908
codeql-bundle-20220923
codeql-bundle-20221007
codeql-bundle-20221010
codeql-bundle-20221020
codeql-bundle-20221024
codeql-bundle-20221105
codeql-bundle-20221118
codeql-bundle-20221123
codeql-bundle-20221202
codeql-bundle-20221211
codeql-bundle-20230105
codeql-bundle-20230120
codeql-bundle-20230203
codeql-bundle-20230207
codeql-bundle-20230216
codeql-bundle-20230217
codeql-bundle-20230304
codeql-bundle-20230317
codeql-bundle-20230331
codeql-bundle-20230403
codeql-bundle-20230414
codeql-bundle-20230418
codeql-bundle-20230428
codeql-bundle-20230515
codeql-bundle-20230524
test-build-runner

codeql-bundle-v2.*

codeql-bundle-v2.13.4
codeql-bundle-v2.13.5
codeql-bundle-v2.14.0
codeql-bundle-v2.14.1
codeql-bundle-v2.14.2
codeql-bundle-v2.14.3
codeql-bundle-v2.14.4
codeql-bundle-v2.14.5
codeql-bundle-v2.14.6
codeql-bundle-v2.15.0
codeql-bundle-v2.15.1
codeql-bundle-v2.15.2
codeql-bundle-v2.15.3
codeql-bundle-v2.15.4
codeql-bundle-v2.15.5
codeql-bundle-v2.16.0
codeql-bundle-v2.16.1
codeql-bundle-v2.16.2
codeql-bundle-v2.16.3
codeql-bundle-v2.16.4
codeql-bundle-v2.16.5
codeql-bundle-v2.16.6
codeql-bundle-v2.17.0
codeql-bundle-v2.17.1
codeql-bundle-v2.17.2
codeql-bundle-v2.17.3
codeql-bundle-v2.17.4
codeql-bundle-v2.17.5
codeql-bundle-v2.17.6
codeql-bundle-v2.18.0
codeql-bundle-v2.18.1
codeql-bundle-v2.18.2
codeql-bundle-v2.18.3
codeql-bundle-v2.18.4
codeql-bundle-v2.19.0
codeql-bundle-v2.19.1
codeql-bundle-v2.19.2
codeql-bundle-v2.19.3
codeql-bundle-v2.19.4
codeql-bundle-v2.20.0
codeql-bundle-v2.20.1
codeql-bundle-v2.20.2
codeql-bundle-v2.6.0-beta.1

v1.*

v1.0.1
v1.0.10
v1.0.11
v1.0.12
v1.0.13
v1.0.14
v1.0.15
v1.0.16
v1.0.17
v1.0.18
v1.0.19
v1.0.2
v1.0.20
v1.0.21
v1.0.22
v1.0.23
v1.0.24
v1.0.25
v1.0.26
v1.0.27
v1.0.28
v1.0.29
v1.0.3
v1.0.30
v1.0.31
v1.0.32
v1.0.4
v1.0.5
v1.0.6
v1.0.7
v1.0.8
v1.0.9
v1.1.0
v1.1.1
v1.1.2
v1.1.3
v1.1.4
v1.1.5

v2.*

v2.1.10
v2.1.11
v2.1.12
v2.1.13
v2.1.14
v2.1.15
v2.1.16
v2.1.17
v2.1.18
v2.1.19
v2.1.20
v2.1.21
v2.1.22
v2.1.23
v2.1.24
v2.1.25
v2.1.26
v2.1.27
v2.1.28
v2.1.29
v2.1.30
v2.1.31
v2.1.32
v2.1.33
v2.1.34
v2.1.35
v2.1.36
v2.1.37
v2.1.38
v2.1.39
v2.1.6
v2.1.7
v2.1.8
v2.1.9
v2.13.4
v2.2.0
v2.2.1
v2.2.10
v2.2.11
v2.2.12
v2.2.2
v2.2.3
v2.2.4
v2.2.5
v2.2.6
v2.2.7
v2.2.8
v2.2.9
v2.20.0
v2.20.1
v2.20.2
v2.20.3
v2.20.4
v2.21.0
v2.21.1
v2.21.2
v2.21.3
v2.21.4
v2.21.5
v2.21.6
v2.21.7
v2.21.8
v2.21.9
v2.22.0
v2.22.1
v2.22.10
v2.22.2
v2.22.3
v2.22.4
v2.22.5
v2.22.6
v2.22.7
v2.22.8
v2.22.9
v2.3.0
v2.3.1
v2.3.2
v2.3.3
v2.3.4
v2.3.5
v2.3.6

v3.*

v3.22.11
v3.22.12
v3.23.0
v3.23.1
v3.23.2
v3.24.0
v3.24.1
v3.24.10
v3.24.2
v3.24.3
v3.24.4
v3.24.5
v3.24.6
v3.24.7
v3.24.8
v3.24.9
v3.25.0
v3.25.1
v3.25.10
v3.25.11
v3.25.12
v3.25.13
v3.25.14
v3.25.15
v3.25.2
v3.25.3
v3.25.4
v3.25.5
v3.25.6
v3.25.7
v3.25.8
v3.25.9
v3.26.0
v3.26.1
v3.26.10
v3.26.11
v3.26.12
v3.26.13
v3.26.2
v3.26.3
v3.26.4
v3.26.5
v3.26.6
v3.26.7
v3.26.8
v3.26.9
v3.27.0
v3.27.1
v3.27.2
v3.27.3
v3.27.4
v3.27.5
v3.27.6
v3.27.7
v3.27.8
v3.27.9
v3.28.0
v3.28.1
v3.28.2