CVE-2023-25173
JSON

5.3medium

containerd supplementary groups are not set up properly

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.55% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-hmfx-3pcx-653pGO-2023-1574

Description

containerd is an open source container runtime. A bug was found in containerd prior to versions 1.6.18 and 1.5.18 where supplementary groups are not set up properly inside a container. 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. Downstream applications that use the containerd client library may be affected as well. This bug has been fixed in containerd v1.6.18 and v.1.5.18. Users should update to these versions and recreate containers to resolve this issue. Users who rely on a downstream application that uses containerd's client library should check that application for a separate advisory and instructions. As a workaround, ensure that the `"USER $USERNAME"` Dockerfile instruction is not used. Instead, set the container entrypoint to a value similar to `ENTRYPOINT ["su", "-", "user"]` to allow `su` to properly set up supplementary groups.

Affected

Product or packageVersionsReported by
containerd containerd< 1.5.18, >= 1.6.0, < 1.6.18CVE List
github.com/containerd/containerd (Go)before 1.5.18, from 1.6.0 before 1.6.18GitHub Advisory Database, Go Vulnerability Database
linuxfoundation containerdbefore 1.5.18, from 1.6.0 before 1.6.18NVD

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.0CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-269CWE-863

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

What each source says

CVE List

containerd is an open source container runtime. A bug was found in containerd prior to versions 1.6.18 and 1.5.18 where supplementary groups are not set up properly inside a container. 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. Downstream applications that use the containerd client library may be affected as well. This bug has been fixed in containerd v1.6.18 and v.1.5.18. Users should update to these versions and recreate containers to resolve this issue. Users who rely on a downstream application that uses containerd's client library should check that application for a separate advisory and instructions. As a workaround, ensure that the `"USER $USERNAME"` Dockerfile instruction is not used. Instead, set the container entrypoint to a value similar to `ENTRYPOINT ["su", "-", "user"]` to allow `su` to properly set up supplementary groups.

GitHub Advisory Database
Impact

A bug was found in containerd where supplementary groups are not set up properly inside a container. 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.

Downstream applications that use the containerd client library may be affected as well.

Patches

This bug has been fixed in containerd v1.6.18 and v.1.5.18. Users should update to these versions and recreate containers to resolve this issue. Users who rely on a downstream application that uses containerd's client library should check that application for a separate advisory and instructions.

Workarounds

Ensure that the "USER $USERNAME" Dockerfile instruction is not used. Instead, set the container entrypoint to a value similar to ENTRYPOINT ["su", "-", "user"] to allow su to properly set up supplementary groups.

References

Note that CVE IDs apply to a particular implementation, even if an issue is common.

For more information

If you have any questions or comments about this advisory:

To report a security issue in containerd:

Go Vulnerability Database

Supplementary groups are not set up properly inside a container. 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 and potentially escalate privileges in the container. Uses of the containerd client library may also have improperly setup supplementary groups.

NVD (es)

Containerd es contenedor de código abierto en tiempo de ejecución. Se encontró un error en Containerd antes de las versiones 1.6.18 y 1.5.18 donde los grupos suplementarios no están configurados correctamente dentro de un contenedor. Si un atacante tiene acceso directo a un contenedor y manipula su acceso de grupo suplementario, es posible que pueda utilizar el acceso de grupo suplementario para eludir las restricciones del grupo primario en algunos casos, obteniendo potencialmente acceso a información confidencial o obteniendo la capacidad de ejecutar código en ese contenedor. Las aplicaciones posteriores que utilizan la librería cliente en containerd también pueden verse afectadas. Este error se ha solucionado en Containerd v1.6.18 y v.1.5.18. Los usuarios deben actualizar a estas versiones y volver a crear containers para resolver este problema. Los usuarios que dependen de una aplicación posterior que utiliza la librería cliente de Containerd deben verificar esa aplicación para obtener avisos e instrucciones por separado. Como workaround, asegúrese de que no se utilice la instrucción de Dockerfile `"USER $USERNAME"`. En su lugar, establezca el punto de entrada del contenedor en un valor similar a `ENTRYPOINT ["su", "-", "user"]` para permitir que `su` configure correctamente grupos suplementarios.

References

https://github.com/containerd/containerd/security/advisories/GHSA-hmfx-3pcx-653padvisory, mitigation, vendor-advisory, web
https://github.com/moby/moby/security/advisories/GHSA-rc4r-wh2q-q6c4not-applicable, web
https://github.com/containerd/containerd/commit/133f6bb6cd827ce35a5fb279c1ead12b9d21460afix, patch, web
https://github.com/advisories/GHSA-4wjj-jwc9-2x96advisory, not-applicable, web
https://github.com/advisories/GHSA-fjm8-m7m6-2fjpadvisory, not-applicable, web
https://github.com/advisories/GHSA-phjr-8j92-w5v7advisory, not-applicable, web
https://github.com/containerd/containerd/releases/tag/v1.5.18release-notes, web
https://github.com/containerd/containerd/releases/tag/v1.6.18release-notes, web
https://www.benthamsgaze.org/2022/08/22/vulnerability-in-linux-containers-investigation-and-mitigation/article, exploit, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTE4ITXXPIWZEQ4HYQCB6N6GZIMWXDAI/
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYZOKMMVX4SIEHPJW3SJUQGMO5YZCPHC/
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XNF4OLYZRQE75EB5TW5N42FSXHBXGWFE/

Related

Sources

SourceRecordLicence
CVE ListCVE-2023-25173 changed 2025-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-hmfx-3pcx-653p changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2023-1574 changed 2026-02-04CC-BY-4.0
NVDCVE-2023-25173 changed 2026-06-17Public domain