CVE-2024-40635 containerd has an integer overflow in User ID handling

Medium 4.6 Published Updated

An integer overflow in containerd allows containers to run as root instead of a specified non-root user, enabling privilege escalation.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-40635?

CVE-2024-40635 is a medium-severity vulnerability in Debian Debian Linux, published on 17 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-190

Which versions are affected by CVE-2024-40635?

8 open source packages ship an affected version, including github.com/containerd/containerd and github.com/containerd/containerd/v2. It affects 2 products.

PackageAffectedFixed in
github.com/containerd/containerd GoAll versions1.6.38, 1.7.27
github.com/containerd/containerd GoAll versions1.6.38
github.com/containerd/containerd GoAll versions1.6.38
github.com/containerd/containerd GoFrom 1.7.0-beta.01.7.27
github.com/containerd/containerd GoFrom 1.7.0-beta.01.7.27
github.com/containerd/containerd/v2 GoAll versions2.0.4
2 more packages
github.com/containerd/containerd/v2 GoAll versions2.0.4
github.com/containerd/containerd/v2 GoAll versions2.0.4
Linux distribution packages (12)
containerd SUSE:Linux Enterprise Micro 5.1All versions1.7.27-150000.123.1
containerd SUSE:Linux Enterprise Micro 5.2All versions1.7.27-150000.123.1
containerd SUSE:Linux Enterprise Micro 5.3All versions1.7.27-150000.123.1
containerd SUSE:Linux Enterprise Micro 5.4All versions1.7.27-150000.123.1
containerd SUSE:Linux Enterprise Micro 5.5All versions1.7.27-150000.123.1
containerd SUSE:Linux Enterprise Module for Containers 15 SP6All versions1.7.27-150000.123.1
containerd SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions1.7.27-16.100.1
containerd SUSE:Linux Micro 6.0All versions1.7.27-1.1
containerd SUSE:Linux Micro 6.1All versions1.7.27-slfo.1.1_1.1
containerd openSUSE:Leap 15.6All versions1.7.27-150000.123.1
cmctl openSUSE:TumbleweedAll versions2.2.0-1.1
containerd openSUSE:TumbleweedAll versions1.7.27-1.1

Products include Debian Debian Linux, Linuxfoundation Containerd.

How do I fix CVE-2024-40635?

Upgrade github.com/containerd/containerd to a fixed version for your release line: 1.6.38 or 1.7.27.

Is CVE-2024-40635 being exploited?

There is no known exploitation of CVE-2024-40635 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-58844, AZL-58845, AZL-58867, AZL-60893, AZL-60897, BELL-CVE-2024-40635 and 98 more.

Is CVE-2024-40635 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free