CVE-2022-39321

GitHub Actions Runner vulnerable to Docker Command Escaping

8.8 high EPSS 2.01%

Published 25 Oct 2022 Updated 23 Apr 2025 CNA: GitHub_M

Check your servers for CVE-2022-39321

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-39321 affects runner, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

8.8 high CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 2.01%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 81.4% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 23 Apr 2025):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command

Affected products

As the CNA lists them.

ProductVersions
runner
affected < 2.283.4
affected >= 2.284.0, < 2.285.2
affected >= 2.286.0, < 2.289.4
affected >= 2.290.0, < 2.293.1
affected >= 2.294.0, < 2.296.2

Is my server affected?

Find the installed version of runner and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i runner
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2022-39321 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2022-39321

RHEL, Rocky, Alma, Fedora

rpm -q runner
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2022-39321

Alpine

apk list --installed | grep -i runner

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-39321
trivy image --scanners vuln IMAGE | grep CVE-2022-39321

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-39321 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.