CVE-2020-15228: Environment Variable Injection in @actions/core
Summary
CVE-2020-15228: Environment Variable Injection in GitHub Actions. Affects @actions/core versions < 1.2.6. Fixed in 1.2.6. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @actions/core npm module is a part of GitHub Actions, a platform for automating workflows and tasks. It provides functions like addPath and exportVariable that allow workflows to modify environment variables and paths. These functions communicate with the Actions Runner over stdout by generating a specific string format. However, workflows that log untrusted data to stdout may inadvertently invoke these commands, leading to unintended modification of environment variables or paths.
Vulnerability Detail
The vulnerability (CVE-2020-15228) arises from the potential for environment variable injection in GitHub Actions. When untrusted data is logged to stdout, it can trigger the addPath or exportVariable commands from the @actions/core module. This can result in the modification of environment variables or paths without the knowledge or intention of the workflow or action author. The impact of this vulnerability can range from unintended changes to the execution environment to potential security breaches.
How To Fix
Latest published version: 3.0.1 as of 22 Oct 2026
npm install @actions/core@3.0.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.2.6
This is the first release that contains the fix.
npm install @actions/core@1.2.6
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround for this vulnerability. It is strongly advised to upgrade to the latest version of @actions/core and follow the recommended steps to fix the vulnerability.
Conclusion
In conclusion, the CVE-2020-15228 vulnerability in the @actions/core npm module of GitHub Actions allows for environment variable injection. To mitigate this vulnerability, it is crucial to upgrade to the latest version of @actions/core and replace any deprecated commands in workflows. For further support and assistance in vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for @actions/core →
FAQ
The impact can range from unintended changes to the execution environment to potential security breaches.
Upgrade to @actions/core v1.2.6 or later, and replace any instances of the set-env or add-path commands in workflows with the new Environment File Syntax.
No, it is strongly recommended to upgrade to the latest version of @actions/core.
You can refer to the GitHub Actions Toolkit documentation and open an issue in the Actions Toolkit repository for any questions or comments.
Yes, the CVSS score for this vulnerability is 3.5.
References
Related vulnerabilities
Recent vulnerabilities recorded for @actions/core.