{"id":"CVE-2022-39321","aliases":["CVE-2022-39321","GHSA-2c6m-6gqh-6qg3"],"related":[],"kind":"vulnerability","state":"published","title":"GitHub Actions Runner vulnerable to Docker Command Escaping","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe 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](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action), [job containers](https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container), or [service containers](https://docs.github.com/en/actions/using-containerized-services/about-service-containers) alongside untrusted user inputs in environment variables may be vulnerable.\n\n### Patches\nThe 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:\n- 2.296.2\n- 2.293.1\n- 2.289.4\n- 2.285.2\n- 2.283.4\n\nGHES and GHAE customers may want to patch their instance in order to have their runners automatically upgrade to these new runner versions.\n\n### Workarounds\nYou 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.\n\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the actions runner](https://github.com/actions/runner)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-10-25T00:00:00.000Z","modified":"2026-06-17T04:58:08.400Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 2.283.4","status":"affected"},{"version":">= 2.284.0, < 2.285.2","status":"affected"},{"version":">= 2.286.0, < 2.289.4","status":"affected"},{"version":">= 2.290.0, < 2.293.1","status":"affected"},{"version":">= 2.294.0, < 2.296.2","status":"affected"}],"vendor":"actions","product":"runner","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.294.0","status":"affected","fixed":"2.296.2"}],"ecosystem":"GitHub Actions","package":"actions/runner","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.290.0","status":"affected","fixed":"2.293.1"}],"ecosystem":"GitHub Actions","package":"actions/runner","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.286.0","status":"affected","fixed":"2.289.4"}],"ecosystem":"GitHub Actions","package":"actions/runner","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.284.0","status":"affected","fixed":"2.285.2"}],"ecosystem":"GitHub Actions","package":"actions/runner","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.283.4"}],"ecosystem":"GitHub Actions","package":"actions/runner","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.283.4"},{"status":"affected","introduced":"2.284.0","fixed":"2.285.2"},{"status":"affected","introduced":"2.286.0","fixed":"2.289.4"},{"status":"affected","introduced":"2.290.0","fixed":"2.293.1"},{"status":"affected","introduced":"2.294.0","fixed":"2.296.2"}],"vendor":"github","product":"runner","cpe":"cpe:2.3:a:github:runner:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/actions/runner/security/advisories/GHSA-2c6m-6gqh-6qg3","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/actions/runner/pull/2107","tags":["patch","release-notes","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/actions/runner/pull/2108","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39321","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/actions/runner","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-04-23T15:47:37.864Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-39321","url":"https://www.cve.org/CVERecord?id=CVE-2022-39321","licence":"CVE Terms of Use","modified":"2025-04-23T16:44:36.866Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2c6m-6gqh-6qg3","url":"https://github.com/advisories/GHSA-2c6m-6gqh-6qg3","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:18.762Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-39321","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39321","licence":"Public domain","modified":"2026-06-17T04:58:08.400Z"}],"updatedAt":"2026-11-25T22:58:15.993Z","epss":{"score":0.02007,"percentile":0.814,"date":"2026-12-01T12:00:22.000Z"}}