{"id":"CVE-2024-40635","aliases":["CVE-2024-40635","GHSA-265r-hfxg-fhmg","GO-2025-3528"],"related":["CGA-2ffc-vqv2-m9xj"],"kind":"vulnerability","state":"published","title":"containerd has an integer overflow in User ID handling","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nA 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.\n\n### Patches\nThis bug has been fixed in the following containerd versions: \n\n* 2.0.4 (Fixed in https://github.com/containerd/containerd/commit/1a43cb6a1035441f9aca8f5666a9b3ef9e70ab20)\n* 1.7.27 (Fixed in https://github.com/containerd/containerd/commit/05044ec0a9a75232cad458027ca83437aae3f4da)\n* 1.6.38 (Fixed in https://github.com/containerd/containerd/commit/cf158e884cfe4812a6c371b59e4ea9bc4c46e51a)\n\nUsers should update to these versions to resolve the issue.\n\n### Workarounds\nEnsure that only trusted images are used and that only trusted users have permissions to import images.\n\n### Credits\nThe containerd project would like to thank [Benjamin Koltermann](https://github.com/p4ck3t0) and [emxll](https://github.com/emxll) for responsibly disclosing this issue in accordance with the [containerd security policy](https://github.com/containerd/project/blob/main/SECURITY.md).\n\n### References\n* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-40635\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [containerd](https://github.com/containerd/containerd/issues/new/choose)\n* Email us at [security@containerd.io](mailto:security@containerd.io)\n\nTo report a security issue in containerd:\n* [Report a new vulnerability](https://github.com/containerd/containerd/security/advisories/new)\n* Email us at [security@containerd.io](mailto:security@containerd.io)","format":"markdown","source":"ghsa"},{"lang":"en","text":"containerd has an integer overflow in User ID handling in github.com/containerd/containerd","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-03-17T21:24:42.000Z","modified":"2026-09-10T03:50:06.145Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":"< 1.6.38","status":"affected"},{"version":">= 1.7.0-beta.0, < 1.7.27","status":"affected"},{"version":">= 2.0.0-beta.0, < 2.0.4","status":"affected"}],"vendor":"containerd","product":"containerd","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.4"}],"ecosystem":"Go","package":"github.com/containerd/containerd/v2","purl":"pkg:golang/github.com/containerd/containerd/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.7.0-beta.0","status":"affected","fixed":"1.7.27"}],"ecosystem":"Go","package":"github.com/containerd/containerd","purl":"pkg:golang/github.com/containerd/containerd","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.6.38"}],"ecosystem":"Go","package":"github.com/containerd/containerd","purl":"pkg:golang/github.com/containerd/containerd","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.6.38"},{"type":"semver","introduced":"1.7.0-beta.0","status":"affected","fixed":"1.7.27"}],"ecosystem":"Go","package":"github.com/containerd/containerd","purl":"pkg:golang/github.com/containerd/containerd","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.4"}],"ecosystem":"Go","package":"github.com/containerd/containerd/v2","purl":"pkg:golang/github.com/containerd/containerd/v2","source":"go"},{"ranges":[{"status":"affected","fixed":"1.6.38"},{"status":"affected","introduced":"1.7.0","fixed":"1.7.27"},{"status":"affected","introduced":"2.0.0","fixed":"2.0.4"}],"vendor":"linuxfoundation","product":"containerd","cpe":"cpe:2.3:a:linuxfoundation:containerd:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/containerd/containerd/security/advisories/GHSA-265r-hfxg-fhmg","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/containerd/containerd/commit/05044ec0a9a75232cad458027ca83437aae3f4da","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/containerd/containerd/commit/1a43cb6a1035441f9aca8f5666a9b3ef9e70ab20","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/containerd/containerd/commit/cf158e884cfe4812a6c371b59e4ea9bc4c46e51a","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00005.html","tags":["mailing-list","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40635","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/containerd/containerd","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-03-18T14:17:05.162Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-40635","url":"https://www.cve.org/CVERecord?id=CVE-2024-40635","licence":"CVE Terms of Use","modified":"2025-05-04T22:02:39.748Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-265r-hfxg-fhmg","url":"https://github.com/advisories/GHSA-265r-hfxg-fhmg","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:06.145Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3528","url":"https://pkg.go.dev/vuln/GO-2025-3528","licence":"CC-BY-4.0","modified":"2026-02-04T03:50:47.304Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-40635","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40635","licence":"Public domain","modified":"2026-06-17T07:46:12.817Z"}],"updatedAt":"2026-11-25T22:58:52.302Z","epss":{"score":0.00304,"percentile":0.24966,"date":"2026-12-01T12:00:22.000Z"}}