CVE-2022-29184
JSON

8.8high

Command Injection/Argument Injection in GoCD

Severity
8.8high CVSS:3.1 by GitHub_M
Exploit likelihood
3.63% (higher than 89% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

GoCD is a continuous delivery server. In GoCD versions prior to 22.1.0, it is possible for existing authenticated users who have permissions to edit or create pipeline materials or pipeline configuration repositories to get remote code execution capability on the GoCD server via configuring a malicious branch name which abuses Mercurial hooks/aliases to exploit a command injection weakness. An attacker would require access to an account with existing GoCD administration permissions to either create/edit (`hg`-based) configuration repositories; create/edit pipelines and their (`hg`-based) materials; or, where "pipelines-as-code" configuration repositories are used, to commit malicious configuration to such an external repository which will be automatically parsed into a pipeline configuration and (`hg`) material definition by the GoCD server. This issue is fixed in GoCD 22.1.0. As a workaround, users who do not use/rely upon Mercurial materials can uninstall/remove the `hg`/Mercurial binary from the underlying GoCD Server operating system or Docker image.

Affected

Product or packageVersionsReported by
gocd gocd< 22.1.0CVE List
thoughtworks gocdbefore 22.1.0NVD

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
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.5medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:P/A:P

Classification

CWE-77CWE-88

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

What each source says

CVE List

GoCD is a continuous delivery server. In GoCD versions prior to 22.1.0, it is possible for existing authenticated users who have permissions to edit or create pipeline materials or pipeline configuration repositories to get remote code execution capability on the GoCD server via configuring a malicious branch name which abuses Mercurial hooks/aliases to exploit a command injection weakness. An attacker would require access to an account with existing GoCD administration permissions to either create/edit (`hg`-based) configuration repositories; create/edit pipelines and their (`hg`-based) materials; or, where "pipelines-as-code" configuration repositories are used, to commit malicious configuration to such an external repository which will be automatically parsed into a pipeline configuration and (`hg`) material definition by the GoCD server. This issue is fixed in GoCD 22.1.0. As a workaround, users who do not use/rely upon Mercurial materials can uninstall/remove the `hg`/Mercurial binary from the underlying GoCD Server operating system or Docker image.

NVD (es)

GoCD es un servidor de entrega continua. En GoCD versiones anteriores a 22.1.0, es posible que los usuarios autenticados existentes que presentan permisos para editar o crear materiales de canalización o repositorios de configuración de canalización obtengan la capacidad de ejecución de código remota en el servidor GoCD por medio de la configuración de un nombre de rama malicioso que abusa de los ganchos/aliases de Mercurial para explotar una debilidad de inyección de comandos. Un atacante necesitaría acceder a una cuenta con permisos de administración de GoCD para crear/editar repositorios de configuración (basados en "hg"); crear/editar pipelines y sus materiales (basados en "hg"); o, cuando son usados repositorios de configuración "pipelines-as-code", enviar una configuración maliciosa a dicho repositorio externo que será analizada automáticamente en una configuración de pipeline y una definición de material ("hg") por el servidor GoCD. Este problema ha sido corregido en GoCD versión 22.1.0. Como mitigación, los usuarios que no usan/dependen de los materiales Mercurial pueden desinstalar/eliminar el binario "hg"/Mercurial del sistema operativo subyacente del servidor GoCD o de la imagen Docker

References

Sources

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