CVE-2022-36109
JSON

5.3medium

Moby vulnerability relating to supplementary group permissions

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.11% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rc4r-wh2q-q6c4GO-2022-0985

Description

Moby is an open-source project created by Docker to enable software containerization. A bug was found in Moby (Docker Engine) where supplementary groups are not set up properly. If an attacker has direct access to a container and manipulates their supplementary group access, they may be able to use supplementary group access to bypass primary group restrictions in some cases, potentially gaining access to sensitive information or gaining the ability to execute code in that container. This bug is fixed in Moby (Docker Engine) 20.10.18. Running containers should be stopped and restarted for the permissions to be fixed. For users unable to upgrade, this problem can be worked around by not using the `"USER $USERNAME"` Dockerfile instruction. Instead by calling `ENTRYPOINT ["su", "-", "user"]` the supplementary groups will be set up properly.

Affected

Product or packageVersionsReported by
moby moby< 20.10.18CVE List
github.com/docker/docker (Go)before 20.10.18, before 20.10.18+incompatibleGitHub Advisory Database, Go Vulnerability Database
mobyproject mobybefore 20.10.18NVD
fedoraproject fedora36, 37NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
NVD6.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Classification

CWE-863

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

What each source says

CVE List

Moby is an open-source project created by Docker to enable software containerization. A bug was found in Moby (Docker Engine) where supplementary groups are not set up properly. If an attacker has direct access to a container and manipulates their supplementary group access, they may be able to use supplementary group access to bypass primary group restrictions in some cases, potentially gaining access to sensitive information or gaining the ability to execute code in that container. This bug is fixed in Moby (Docker Engine) 20.10.18. Running containers should be stopped and restarted for the permissions to be fixed. For users unable to upgrade, this problem can be worked around by not using the `"USER $USERNAME"` Dockerfile instruction. Instead by calling `ENTRYPOINT ["su", "-", "user"]` the supplementary groups will be set up properly.

GitHub Advisory Database

Moby is an open-source project created by Docker to enable software containerization. A bug was found in Moby (Docker Engine) where supplementary groups are not set up properly. If an attacker has direct access to a container and manipulates their supplementary group access, they may be able to use supplementary group access to bypass primary group restrictions in some cases, potentially gaining access to sensitive information or gaining the ability to execute code in that container. This bug is fixed in Moby (Docker Engine) 20.10.18. Users should update to this version when it is available. Running containers should be stopped and restarted for the permissions to be fixed. For users unable to upgrade, this problem can be worked around by not using the "USER $USERNAME" Dockerfile instruction. Instead by calling ENTRYPOINT ["su", "-", "user"] the supplementary groups will be set up properly.

Thanks to Steven Murdoch for reporting this issue.


Impact

If an attacker has direct access to a container and manipulates their supplementary group access, they may be able to use supplementary group access to bypass primary group restrictions in some cases, potentially gaining access to sensitive information or gaining the ability to execute code in that container.

Patches

This bug is fixed in Moby (Docker Engine) 20.10.18. Users should update to this version when it is available.

Workarounds

This problem can be worked around by not using the "USER $USERNAME" Dockerfile instruction. Instead by calling ENTRYPOINT ["su", "-", "user"] the supplementary groups will be set up properly.

References

https://www.benthamsgaze.org/2022/08/22/vulnerability-in-linux-containers-investigation-and-mitigation/

For more information

If you have any questions or comments about this advisory:

Go Vulnerability Database

Docker supplementary group permissions not set up properly, allowing attackers to bypass primary group restrictions in github.com/docker/docker

NVD (es)

Moby es un proyecto de código abierto creado por Docker para permitir una contención de software. Ha sido encontrado un bug en Moby (Docker Engine) en el que los grupos complementarios no son configurados apropiadamente. Si un atacante presenta acceso directo a un contenedor y manipula su acceso a grupos suplementarios, puede ser capaz de usar el acceso a grupos suplementarios para omitir las restricciones de grupos primarios en algunos casos, obteniendo potencialmente acceso a información confidencial o ganando la capacidad de ejecutar código en ese contenedor. Este error ha sido corregido en Moby (Docker Engine) versión 20.10.18. Los contenedores en ejecución deben ser detenidos y reiniciados para que los permisos sean corregidos. Para usuarios que no puedan actualizar, este problema puede mitigarse al no usar la instrucción ""USER $USERNAME"" de Dockerfile. En su lugar, llamando a "ENTRYPOINT ["su", "-", "user"]" los grupos complementarios serán configurados apropiadamente

References

https://github.com/moby/moby/security/advisories/GHSA-rc4r-wh2q-q6c4advisory, third-party-advisory, web
https://github.com/moby/moby/commit/de7af816e76a7fd3fbf06bffa6832959289fba32patch, third-party-advisory, web
https://github.com/moby/moby/releases/tag/v20.10.18third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O7JL2QA3RB732MLJ3RMUXB3IB7AA22YUweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RQQ4E3JBXVR3VK5FIZVJ3QS2TAOOXXTQweb
https://www.benthamsgaze.org/2022/08/22/vulnerability-in-linux-containers-investigation-and-mitigationweb
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RQQ4E3JBXVR3VK5FIZVJ3QS2TAOOXXTQ/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O7JL2QA3RB732MLJ3RMUXB3IB7AA22YU/vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2022-36109advisory
https://github.com/moby/mobypackage
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O7JL2QA3RB732MLJ3RMUXB3IB7AA22YUweb
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RQQ4E3JBXVR3VK5FIZVJ3QS2TAOOXXTQweb

Related

Sources

SourceRecordLicence
CVE ListCVE-2022-36109 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-rc4r-wh2q-q6c4 changed 2026-02-04CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0985 changed 2026-03-03CC-BY-4.0
NVDCVE-2022-36109 changed 2026-06-17Public domain