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 package | Versions | Reported by |
|---|---|---|
| moby moby | < 20.10.18 | CVE List |
| github.com/docker/docker (Go) | before 20.10.18, before 20.10.18+incompatible | GitHub Advisory Database, Go Vulnerability Database |
| mobyproject moby | before 20.10.18 | NVD |
| fedoraproject fedora | 36, 37 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| NVD | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
Classification
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
For more information
If you have any questions or comments about this advisory:
- Open an issue
- Email us at security@docker.com
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
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-36109 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rc4r-wh2q-q6c4 changed 2026-02-04 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0985 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2022-36109 changed 2026-06-17 | Public domain |