CVE-2024-40635: CWE-190: Integer Overflow or Wraparound in containerd containerd
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland, Belgium
CVE-2024-40635: CWE-190: Integer Overflow or Wraparound in containerd 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
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.