Skip to content

Environment Variable Injection in GitHub Actions

Low severity GitHub Reviewed Published Oct 1, 2020 in actions/toolkit • Updated Feb 1, 2023

Package

npm @actions/core (npm)

Affected versions

< 1.2.6

Patched versions

1.2.6

Description

Impact

The @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.

Patches

The 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. Workflows and actions using the old commands or older versions of the toolkit will start to warn, then error out during workflow execution.

Workarounds

None, it is strongly suggested that you upgrade as soon as possible.

For more information

If you have any questions or comments about this advisory:

References

@chrispat chrispat published to actions/toolkit Oct 1, 2020
Reviewed Oct 1, 2020
Published to the GitHub Advisory Database Oct 1, 2020
Published by the National Vulnerability Database Oct 1, 2020
Last updated Feb 1, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N

EPSS score

0.095%
(41st percentile)

CVE ID

CVE-2020-15228

GHSA ID

GHSA-mfwh-5m23-j46w

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.