CVE-2020-15228: @actions/core Environment Variable Injection Vulnerability
LOWCVE-2020-15228 is a LOW (CVSS 3.5) environment variable injection vulnerability (CWE-20: Improper Input Validation) affecting @actions/core libraries in the npm ecosystem. The issue involves environment variable injection in github actions. Remediation is available by upgrading affected packages to version 1.2.6.
CVE-2020-15228 at a Glance
Security Impact
CVSS: 3.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N).
How to Fix CVE-2020-15228
To remediate this vulnerability, upgrade all affected @actions/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @actions/core@1.2.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @actions/core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-15228, inspect your project dependencies using npm:
npm ls @actions/core
Analyze the terminal output to locate any version of @actions/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.6), your application is affected.
Note: The npm ls @actions/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In @actions/core, 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-2020-15228 Affected @actions/core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@actions/core
|
npm |
< 1.2.6
|
1.2.6
|
References
Frequently Asked Questions
What is CVE-2020-15228?
Which @actions/core versions are affected?
What version fixes CVE-2020-15228?
Is @actions/core affected?
What is the CVSS score of CVE-2020-15228?
What CWE is associated with CVE-2020-15228?
How can I check npm dependencies for CVE-2020-15228?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mfwh-5m23-j46w",
"modified" : "2021-11-19T15:11:59Z",
"published" : "2020-10-01T17:16:20Z",
"aliases" : [ "CVE-2020-15228" ],
"summary" : "Environment Variable Injection in GitHub Actions",
"details" : "### Impact\nThe `@actions/core` npm module `addPath` and `exportVariable` functions communicate with the Actions Runner over stdout by generating a string in a specific format. Workflows that log untrusted data to stdout may invoke these commands, resulting in the path or environment variables being modified without the intention of the workflow or action author. \n\n### Patches\nThe runner will release an update that disables the `set-env` and `add-path` workflow commands in the near future. For now, users should upgrade to `@actions/core v1.2.6` or later, and replace any instance of the `set-env` or `add-path` commands in their workflows with the new [Environment File Syntax](https://github.com/actions/toolkit/blob/main/docs/commands.md#environment-files). Workflows and actions using the old commands or older versions of the toolkit will start to warn, then error out during workflow execution.\n\n### Workarounds\nNone, it is strongly suggested that you upgrade as soon as possible.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Actions Toolkit](https://github.com/actions/toolkit/issues)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@actions/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/actions/toolkit/security/advisories/GHSA-mfwh-5m23-j46w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15228"
}, {
"type" : "WEB",
"url" : "https://github.com/actions/toolkit"
}, {
"type" : "WEB",
"url" : "http://packetstormsecurity.com/files/159794/GitHub-Widespread-Injection.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-77" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-01T17:16:10Z",
"nvd_published_at" : "2020-10-01T18:15:00Z"
}
}