CVE-2024-40635
JSON

4.6medium

containerd has an integer overflow in User ID handling

Severity
4.6medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.30% (higher than 24% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-265r-hfxg-fhmgGO-2025-3528

Description

containerd is an open-source container runtime. A bug was found in containerd prior to versions 1.6.38, 1.7.27, and 2.0.4 where containers launched with a User set as a `UID:GID` larger than the maximum 32-bit signed integer can cause an overflow condition where the container ultimately runs as root (UID 0). This could cause unexpected behavior for environments that require containers to run as a non-root user. This bug has been fixed in containerd 1.6.38, 1.7.27, and 2.04. As a workaround, ensure that only trusted images are used and that only trusted users have permissions to import images.

Affected

Product or packageVersionsReported by
containerd containerd< 1.6.38, >= 1.7.0-beta.0, < 1.7.27, >= 2.0.0-beta.0, < 2.0.4CVE List
github.com/containerd/containerd/v2 (Go)before 2.0.4GitHub Advisory Database, Go Vulnerability Database
github.com/containerd/containerd (Go)from 1.7.0-beta.0 before 1.7.27, before 1.6.38GitHub Advisory Database, Go Vulnerability Database
linuxfoundation containerdbefore 1.6.38, from 1.7.0 before 1.7.27, from 2.0.0 before 2.0.4NVD
debian debian_linux11.0NVD

All scores

GitHub_M4.6medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
GitHub4.6medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
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-190

SSVC (CISA-ADP): exploitation none, 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.38, 1.7.27, and 2.0.4 where containers launched with a User set as a `UID:GID` larger than the maximum 32-bit signed integer can cause an overflow condition where the container ultimately runs as root (UID 0). This could cause unexpected behavior for environments that require containers to run as a non-root user. This bug has been fixed in containerd 1.6.38, 1.7.27, and 2.04. As a workaround, ensure that only trusted images are used and that only trusted users have permissions to import images.

GitHub Advisory Database
Impact

A bug was found in containerd where containers launched with a User set as a UID:GID larger than the maximum 32-bit signed integer can cause an overflow condition where the container ultimately runs as root (UID 0). This could cause unexpected behavior for environments that require containers to run as a non-root user.

Patches

This bug has been fixed in the following containerd versions:

Users should update to these versions to resolve the issue.

Workarounds

Ensure that only trusted images are used and that only trusted users have permissions to import images.

Credits

The containerd project would like to thank Benjamin Koltermann and emxll for responsibly disclosing this issue in accordance with the containerd security policy.

References
For more information

If you have any questions or comments about this advisory:

To report a security issue in containerd:

Go Vulnerability Database

containerd has an integer overflow in User ID handling in github.com/containerd/containerd

NVD (es)

Containerd es un entorno de ejecución de contenedores de código abierto. Se detectó un error en containerd anterior a las versiones 1.6.38, 1.7.27 y 2.0.4. Al iniciar contenedores con un usuario definido como `UID:GID` mayor que el entero con signo de 32 bits máximo, se podía producir un desbordamiento, lo que provocaba que el contenedor se ejecutara como root (UID 0). Esto podía causar un comportamiento inesperado en entornos que requieren que los contenedores se ejecuten como un usuario no root. Este error se ha corregido en containerd 1.6.38, 1.7.27 y 2.04. Como workaround, asegúrese de que solo se utilicen imágenes de confianza y de que solo los usuarios de confianza tengan permisos para importar imágenes.

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2024-40635 changed 2025-05-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-265r-hfxg-fhmg changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3528 changed 2026-02-04CC-BY-4.0
NVDCVE-2024-40635 changed 2026-06-17Public domain