Skip to main content

CVE-2024-40635: CWE-190: Integer Overflow or Wraparound in containerd containerd

Medium
VulnerabilityCVE-2024-40635cvecve-2024-40635cwe-190
Published: Mon Mar 17 2025 (03/17/2025, 21:32:37 UTC)
Source: CVE
Vendor/Project: containerd
Product: containerd

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.

AI-Powered Analysis

AILast updated: 06/27/2025, 20:40:53 UTC

Technical Analysis

CVE-2024-40635 is a medium severity integer overflow vulnerability (CWE-190) affecting containerd, an open-source container runtime widely used in container orchestration environments. The flaw exists in versions prior to 1.6.38, 1.7.27, and 2.0.4. Specifically, when a container is launched with a user specified as a UID:GID pair exceeding the maximum value for a 32-bit signed integer, an integer overflow or wraparound occurs. This overflow causes the container runtime to incorrectly interpret the user ID, resulting in the container running with root privileges (UID 0) instead of the intended non-root user. This behavior undermines security policies that rely on containers running with restricted privileges, potentially allowing privilege escalation within the container environment. The vulnerability does not require user interaction but does require local privileges (PR:H) to exploit, as indicated by the CVSS vector. The scope is changed (S:C), meaning the vulnerability can affect resources beyond the initially vulnerable component. The impact on confidentiality and integrity is low to medium, as unauthorized root access inside a container could lead to unauthorized access or modification of containerized applications or data. However, availability is not impacted. No known exploits are reported in the wild yet. The issue has been fixed in containerd versions 1.6.38, 1.7.27, and 2.0.4. As a workaround, organizations should restrict image imports to trusted users and only deploy trusted container images to minimize risk.

Potential Impact

For European organizations, this vulnerability poses a risk primarily in environments that rely heavily on containerized applications managed by containerd, such as cloud service providers, enterprises using Kubernetes, and DevOps pipelines. If exploited, attackers with local access could escalate privileges within containers, potentially compromising sensitive workloads or data. This could lead to lateral movement within internal networks or unauthorized access to critical applications. The risk is heightened in multi-tenant environments or shared infrastructure where container isolation is critical. Given the widespread adoption of containerd in European cloud infrastructure and enterprises, the vulnerability could affect sectors such as finance, healthcare, and government, where container security is paramount. However, the requirement for local privileges and no known active exploits reduce the immediate risk. Still, the vulnerability could be leveraged in targeted attacks or insider threat scenarios.

Mitigation Recommendations

1. Upgrade containerd to versions 1.6.38, 1.7.27, or 2.0.4 or later to apply the official fix. 2. Implement strict access controls to limit who can import and run container images, ensuring only trusted users have these permissions. 3. Enforce image signing and verification policies to prevent untrusted or malicious images from being deployed. 4. Monitor container runtime logs and user ID mappings for anomalies that could indicate exploitation attempts. 5. Use container security tools that enforce least privilege and user namespace remapping to reduce the impact of potential privilege escalations. 6. Conduct regular security audits of container configurations and runtime environments to detect misconfigurations or outdated versions. 7. Educate DevOps and security teams about this vulnerability and the importance of running containers with non-root users and proper UID/GID assignments.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2024-07-08T16:13:15.511Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdcc9b

Added to database: 5/21/2025, 9:08:48 AM

Last enriched: 6/27/2025, 8:40:53 PM

Last updated: 8/12/2025, 5:17:47 AM

Views: 17

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats