---
title: "GHSA-mfwh-5m23-j46w: Environment Variable Injection in GitHub Actions"
description: "Low severity. Environment Variable Injection in GitHub Actions. Affects @actions/core; fixed in 1.2.6."
url: https://inlinr.com/advisories/GHSA-mfwh-5m23-j46w
lang: en
---

[Packages](https://inlinr.com/packages) / [@actions/core](https://inlinr.com/packages/@actions/core) / [Security](https://inlinr.com/packages/@actions/core/security)

Low Vulnerability GHSA-mfwh-5m23-j46w CVE-2020-15228 Published 1 Oct 2020

# Environment Variable Injection in GitHub Actions

Your version 

Affected releases · [@actions/core](https://inlinr.com/packages/@actions/core)

- 1.x 1.0.0 – 1.2.5 Fixed in 1.2.6

On 1.x, the newest line:

```
npm install @actions/core@1.2.6
```

Every release on a timeline

3.x 

1. Not affected

3.0.0 – 3.0.1  
2 releases, latest

1.x 

1. Affected

1.0.0 – 1.2.5  
11 releases
2. Fixed

1.2.6 – 1.11.1  
16 releases

33 stable releases of @actions/core, oldest to newest, one row per major.

## What happens

Impact

The [@actions/core](https://inlinr.com/packages/@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](https://github.com/actions/toolkit/blob/main/docs/commands.md#environment-files "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.

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:

- Open an issue in [Actions Toolkit](https://github.com/actions/toolkit/issues "https://github.com/actions/toolkit/issues")

## How it is exploited

Exploitable over the network, with a low-privilege account and no action from a user.

- **Confidentiality**: low
- **Integrity**: none
- **Availability**: none

CVSS:3.1/​AV:N/​AC:H/​PR:L/​UI:N/​S:C/​C:L/​I:N/​A:N

## References

- [Reference](https://github.com/actions/toolkit/security/advisories/GHSA-mfwh-5m23-j46w "https://github.com/actions/toolkit/security/advisories/GHSA-mfwh-5m23-j46w")  
github.com/actions/toolkit/security/advisories/…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2020-15228 "https://nvd.nist.gov/vuln/detail/CVE-2020-15228")  
nvd.nist.gov/vuln/detail/CVE-2020-15228
- [Reference](https://github.com/actions/toolkit "https://github.com/actions/toolkit")  
github.com/actions/toolkit
- [Reference](http://packetstormsecurity.com/files/159794/GitHub-Widespread-Injection.html "http://packetstormsecurity.com/files/159794/GitHub-Widespread-Injection.html")  
packetstormsecurity.com/files/159794/GitHub-Wid…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
