CVE-2022-39321
JSON

8.8high

GitHub Actions Runner vulnerable to Docker Command Escaping

Severity
8.8high CVSS:3.1 by GitHub_M
Exploit likelihood
2.01% (higher than 81% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2c6m-6gqh-6qg3

Description

GitHub Actions Runner is the application that runs a job from a GitHub Actions workflow. 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 in versions prior to 2.296.2, 2.293.1, 2.289.4, 2.285.2, and 2.283.4 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. The Actions Runner has been patched, both on `github.com` and hotfixes for GHES and GHAE customers in versions 2.296.2, 2.293.1, 2.289.4, 2.285.2, and 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. As a workaround, users may consider removing any container actions, job containers, or service containers from their jobs until they are able to upgrade their runner versions.

Affected

Product or packageVersionsReported by
actions runner< 2.283.4, >= 2.284.0, < 2.285.2, >= 2.286.0, < 2.289.4, >= 2.290.0, < 2.293.1, >= 2.294.0, < 2.296.2CVE List
actions/runner (GitHub Actions)from 2.294.0 before 2.296.2, from 2.290.0 before 2.293.1, from 2.286.0 before 2.289.4, from 2.284.0 before 2.285.2, before 2.283.4GitHub Advisory Database
github runnerbefore 2.283.4, from 2.284.0 before 2.285.2, from 2.286.0 before 2.289.4, from 2.290.0 before 2.293.1, from 2.294.0 before 2.296.2NVD

All scores

GitHub_M8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-78

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

GitHub Actions Runner is the application that runs a job from a GitHub Actions workflow. 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 in versions prior to 2.296.2, 2.293.1, 2.289.4, 2.285.2, and 2.283.4 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. The Actions Runner has been patched, both on `github.com` and hotfixes for GHES and GHAE customers in versions 2.296.2, 2.293.1, 2.289.4, 2.285.2, and 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. As a workaround, users may consider removing any container actions, job containers, or service containers from their jobs until they are able to upgrade their runner versions.

GitHub Advisory Database
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:

NVD (es)

GitHub Actions Runner es la aplicación que ejecuta un trabajo desde un flujo de trabajo de GitHub Actions. El ejecutor de acciones invoca directamente el cli de la ventana acoplable para ejecutar contenedores de trabajo, contenedores de servicio o acciones de contenedor. En versiones anteriores a 2.296.2, 2.293.1, 2.289.4, 2.285.2 y 2.283.4, ha sido detectado un error en la lógica de cómo es codificado el entorno en estos comandos docker que permite que una entrada escape a la variable de entorno y modifique la invocación de ese comando docker directamente. Los trabajos que usan acciones de contenedor, contenedores de trabajo o contenedores de servicio junto con entradas de usuario no confiables en las variables de entorno pueden ser vulnerables. El Actions Runner ha sido parcheado, tanto en "github.com" como en hotfixes para los clientes de GHES y GHAE en versiones 2.296.2, 2.293.1, 2.289.4, 2.285.2 y 2.283.4. Los clientes de GHES y GHAE pueden querer parchear su instancia para que sus ejecutores actualicen automáticamente a estas nuevas versiones de ejecutores. Como mitigación, los usuarios pueden considerar la eliminación de cualquier acción de contenedor, contenedor de trabajo o contenedor de servicio de sus trabajos hasta que puedan actualizar las versiones de sus ejecutores

References

Sources

SourceRecordLicence
CVE ListCVE-2022-39321 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-2c6m-6gqh-6qg3 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-39321 changed 2026-06-17Public domain