CVE-2025-31479: canonical/get-workflow-version-action can leak a partial GITHUB_TOKEN in exception output

Published Apr 2, 2025
·
Updated

Impact Users using the github-token input are impacted.

If the get-workflow-version-action step fails, the exception output may include the GITHUBTOKEN. If the full token is included in the exception output, GitHub will automatically redact the secret from the GitHub Actions logs. However, the token may be truncated—causing part of the GITHUBTOKEN to be displayed in plaintext in the GitHub Actions logs.

Anyone with read access to the GitHub repository can view GitHub Actions logs. For public repositories, anyone can view the GitHub Actions logs.

The opportunity to exploit this vulnerability is limited—the GITHUBTOKEN is automatically revoked when the job completes. However, there is an opportunity for an attack in the time between the GITHUBTOKEN being displayed in the logs and the completion of the job. Normally this is less than a second, but it may be greater if continue-on-error is used in the get-workflow-version-action step or if status check functions are used in a later step in the same job. For an example of an attack in the time between the GITHUBTOKEN being displayed in the logs & the completion of the job, see https://www.praetorian.com/blog/codeqleaked-public-secrets-exposure-leads-to-supply-chain-attack-on-github-codeql/

For users who passed the GITHUBTOKEN to the github-token input, update to v1.0.1. Any secrets that were partially leaked while using v1.0.0 should have already been revoked, since the GITHUBTOKEN is automatically revoked when the job completes. However, in the unlikely event that an attack was executed using a GITHUBTOKEN before it was revoked (as described above), users' repositories may still be impacted—for example, a sophisticated attack could have used the GITHUBTOKEN to push something to the repository.

The potential effects of an attack depend on the permissions of any GITHUBTOKENs that were leaked. However, in a very sophisticated attack, even a GITHUBTOKEN with read-only permissions can affect other GitHub Actions in the same repository if those actions use the Actions cache. For more information, see the "But Wait, There’s More" section of https://www.praetorian.com/blog/codeqleaked-public-secrets-exposure-leads-to-supply-chain-attack-on-github-codeql/ and https://github.com/AdnaneKhan/Cacheract

If any users used a long-lived secret (e.g. a personal access token) instead of the GITHUBTOKEN in the github-token input, they should immediately revoke that secret. The get-workflow-version-action's documentation & examples all instructed the user to use the GITHUBTOKEN, so it is unlikely that users used a long-lived secret instead of the GITHUBTOKEN.

Patches This has been fixed in v1.0.1. Also, the v1 tag has been updated to include the fix.

References https://github.com/canonical/get-workflow-version-action/issues/2

Other sources

canonical/get-workflow-version-action is a GitHub composite action to get commit SHA that GitHub Actions reusable workflow was called with. Prior to 1.0.1, if the get-workflow-version-action step fails, the exception output may include the GITHUBTOKEN. If the full token is included in the exception output, GitHub will automatically redact the secret from the GitHub Actions logs. However, the token may be truncated—causing part of the GITHUBTOKEN to be displayed in plaintext in the GitHub Actions logs. Anyone with read access to the GitHub repository can view GitHub Actions logs. For public repositories, anyone can view the GitHub Actions logs. The opportunity to exploit this vulnerability is limited—the GITHUBTOKEN is automatically revoked when the job completes. However, there is an opportunity for an attack in the time between the GITHUBTOKEN being displayed in the logs and the completion of the job. Users using the github-token input are impacted. This vulnerability is fixed in 1.0.1.

MITRE

Affected Software

2 affected componentsFixes available
Canonical get-workflow-version-action<1.0.1
actions/canonical/get-workflow-version-action<1.0.1
1.0.1

Event History

Apr 2, 2025
CVE Published
via MITRE·09:09 PM
Data Sourced
via MITRE·09:09 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·10:36 PM

Frequently Asked Questions

1

What is the severity of CVE-2025-31479?

The severity of CVE-2025-31479 is classified as high due to the potential exposure of sensitive authentication tokens.

2

How do I fix CVE-2025-31479?

To fix CVE-2025-31479, update the get-workflow-version-action to version 1.0.1 or later.

3

What impacts does CVE-2025-31479 have on my GitHub workflows?

CVE-2025-31479 may expose your GITHUB_TOKEN in error messages, leading to unauthorized access if compromised.

4

Is my application affected by CVE-2025-31479?

Your application is affected by CVE-2025-31479 if you are using get-workflow-version-action versions prior to 1.0.1.

5

What can happen if CVE-2025-31479 is exploited?

If exploited, CVE-2025-31479 could allow attackers to misuse the GITHUB_TOKEN, potentially gaining access to private repositories and sensitive data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203