CVE-2022-39206
JSON

9.9critical

CI/CD Docker Escape in OneDev

Severity
9.9critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.76% (higher than 79% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

Onedev is an open source, self-hosted Git Server with CI/CD and Kanban. When using Docker-based job executors, the Docker socket (e.g. /var/run/docker.sock on Linux) is mounted into each Docker step. Users that can define and trigger CI/CD jobs on a project could use this to control the Docker daemon on the host machine. This is a known dangerous pattern, as it can be used to break out of Docker containers and, in most cases, gain root privileges on the host system. This issue allows regular (non-admin) users to potentially take over the build infrastructure of a OneDev instance. Attackers need to have an account (or be able to register one) and need permission to create a project. Since code.onedev.io has the right preconditions for this to be exploited by remote attackers, it could have been used to hijack builds of OneDev itself, e.g. by injecting malware into the docker images that are built and pushed to Docker Hub. The impact is increased by this as described before. Users are advised to upgrade to 7.3.0 or higher. There are no known workarounds for this issue.

Affected

Product or packageVersionsReported by
theonedev onedev< 7.3.0CVE List
onedev_project onedevbefore 7.3.0NVD

All scores

GitHub_M9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/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-610

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

What each source says

CVE List

Onedev is an open source, self-hosted Git Server with CI/CD and Kanban. When using Docker-based job executors, the Docker socket (e.g. /var/run/docker.sock on Linux) is mounted into each Docker step. Users that can define and trigger CI/CD jobs on a project could use this to control the Docker daemon on the host machine. This is a known dangerous pattern, as it can be used to break out of Docker containers and, in most cases, gain root privileges on the host system. This issue allows regular (non-admin) users to potentially take over the build infrastructure of a OneDev instance. Attackers need to have an account (or be able to register one) and need permission to create a project. Since code.onedev.io has the right preconditions for this to be exploited by remote attackers, it could have been used to hijack builds of OneDev itself, e.g. by injecting malware into the docker images that are built and pushed to Docker Hub. The impact is increased by this as described before. Users are advised to upgrade to 7.3.0 or higher. There are no known workarounds for this issue.

NVD (es)

Onedev es un servidor Git de código abierto, auto-alojado con CI/CD y Kanban. Cuando son usados ejecutores de trabajos basados en Docker, el socket de Docker (por ejemplo, /var/run/docker.sock en Linux) es montado en cada paso de Docker. Los usuarios que pueden definir y desencadenar trabajos CI/CD en un proyecto podrían usar esto para controlar el demonio Docker en la máquina anfitriona. Este es un patrón peligroso conocido, ya que puede ser usado para salir de los contenedores Docker y, en la mayoría de los casos, conseguir privilegios de root en el sistema anfitrión. Este problema permite a usuarios normales (no administradores) tomar potencialmente el control de la infraestructura de construcción de una instancia de OneDev. Los atacantes necesitan tener una cuenta (o ser capaces de registrar una) y necesitan permiso para crear un proyecto. Dado que code.onedev.io presenta las condiciones previas apropiadas para que esto sea explotado por atacantes remotos, podría haber sido usado para secuestrar las construcciones de OneDev en sí, por ejemplo, mediante la inyección de malware en las imágenes Docker que son construidas y son empujadas a Docker Hub. El impacto es incrementado por esto como ha sido descrito anteriormente. Es recomendado a usuarios actualizar a versión 7.3.0 o superior. No se presentan mitigaciones conocidas para este problema

References

Sources

SourceRecordLicence
CVE ListCVE-2022-39206 changed 2025-04-22CVE Terms of Use
NVDCVE-2022-39206 changed 2026-06-17Public domain