Skip to content

Docker Command Escaping in the GitHub Actions Runner

High severity GitHub Reviewed Published Oct 24, 2022 in actions/runner • Updated Jan 30, 2023

Package

actions actions/runner (GitHub Actions)

Affected versions

>= 2.294.0, < 2.296.1
>= 2.290.0, < 2.293.1
>= 2.286.0, < 2.289.4
>= 2.284.0, < 2.285.2
< 2.283.4

Patched versions

2.296.2
2.293.1
2.289.4
2.285.2
2.283.4

Description

Impact

The actions runner invokes the docker cli directly in order to run job containers, service containers, or container actions. A bug in the logic for how the environment is encoded into these docker commands was discovered that allows an input to escape the environment variable and modify that docker command invocation directly. Jobs that use container actions, job containers, or service containers alongside untrusted user inputs in environment variables may be vulnerable.

Patches

The Actions Runner has been patched, both on github.com and hotfixes for GHES and GHAE customers. Please update to one of the following versions of the runner:

  • 2.296.2
  • 2.293.1
  • 2.289.4
  • 2.285.2
  • 2.283.4

GHES and GHAE customers may want to patch their instance in order to have their runners automatically upgrade to these new runner versions.

Workarounds

You may want to consider removing any container actions, job containers, or service containers from your jobs until you are able to upgrade your runner versions.

For more information

If you have any questions or comments about this advisory:

References

@thboop thboop published to actions/runner Oct 24, 2022
Published by the National Vulnerability Database Oct 25, 2022
Published to the GitHub Advisory Database Oct 25, 2022
Reviewed Oct 25, 2022
Last updated Jan 30, 2023

Severity

High

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
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

0.120%
(47th percentile)

Weaknesses

CVE ID

CVE-2022-39321

GHSA ID

GHSA-2c6m-6gqh-6qg3

Source code

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