CVE-2024-40635
NoneCVSS
—
EPSS
0.3%
Published
Mar 17, 2025
CISA due date
—
Cloudanix analysis
A flaw in container software can cause programs that should run without special privileges to instead run with full administrative rights, potentially weakening security protections in container environments.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- Container Runtime
- Class
- Privilege Escalation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflow in UID:GID parsing allows containers configured with UID:GID values exceeding 32-bit signed max to execute as UID 0 instead of the intended high-UID non-root user.
Why it matters to the business
Environments that rely on containers running as non-root users for isolation or compliance may inadvertently grant full root privileges inside containers, increasing risk of container escapes or unauthorized host access; low exploitability and no known ransomware use reduce immediate urgency but still require prompt patching.
How an attack unfolds
An attacker supplies or tricks the system into using a container image whose configuration specifies a UID:GID larger than INT32_MAX; containerd's parsing overflows and treats the value as zero, launching the container as root. No named threat actors are associated with this flaw.
How to fix it
Upgrade containerd to version 1.6.38, 1.7.27, or 2.0.4 (commit cf158e884cfe4812a6c371b59e4ea9bc4c46e51a or later). As a temporary mitigation, restrict image imports to trusted sources and limit image import permissions to trusted users only.
How to confirm the fix worked
Confirm containerd version is at or above the fixed releases; test by launching a container with a high UID:GID and verifying the process does not run as root inside the container.
Typical attack path
- Obtain or craft a container image whose OCI config.json sets user to a UID:GID > 2147483647
- Ensure the image is imported or pulled by a user with image import permissions
- Launch the container via containerd without additional UID namespace restrictions
- Container process starts with effective UID 0 due to overflow
- Attacker leverages root privileges inside the container for further actions
How to detect it
Review container runtime logs and image import events for launches involving high numeric UID values; inspect container config.json files for user fields exceeding 32-bit signed integer range; correlate with process listings showing unexpected root execution inside containers.
What your security team should do
- Prioritize upgrade of all containerd instances to the fixed versions within standard change windows
- Audit existing container configurations for any high-UID settings and correct them
- Enforce image signing and trusted registry policies to limit untrusted image use
- Monitor EPSS trend; reassess if score rises significantly
The record
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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/containerd/containerd | 0 | 1.6.38 |
| Go | github.com/containerd/containerd | 1.7.0-beta.0 | 1.7.27 |
| Go | github.com/containerd/containerd/v2 | 0 | 2.0.4 |
| Chainguard | auditbeat-7 | 0 | 7.17.28-r7 |
| Chainguard | auditbeat-7-oci-entrypoint | 0 | 7.17.28-r7 |
| Chainguard | auditbeat-fips-7 | 0 | 7.17.28-r5 |
| Chainguard | beats-7 | 0 | 7.17.28-r7 |
| Chainguard | beats-fips-7 | 0 | 7.17.28-r5 |
| Chainguard | buildctl | 0 | 0.20.1-r3 |
| Chainguard | buildctl-fips | 0 | 0.20.1-r3 |
| Chainguard | buildkitd | 0 | 0.20.1-r3 |
| Chainguard | buildkitd-fips | 0 | 0.20.1-r3 |
| Chainguard | cert-manager-1.12 | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-1.12-acmesolver | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-1.12-cainjector | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-1.12-controller | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-1.12-webhook | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-acmesolver-1.12 | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-acmesolver-1.12-bitnami-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-acmesolver-1.12-iamguarded-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-acmesolver-fips-1.12 | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-cainjector-1.12 | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-cainjector-1.12-bitnami-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-cainjector-1.12-iamguarded-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-cainjector-fips-1.12 | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-cmctl | 0 | 2.1.1-r9 |
| Chainguard | cert-manager-cmctl-fips | 0 | 2.1.1-r9 |
| Chainguard | cert-manager-controller-1.12 | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-controller-1.12-bitnami-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-controller-1.12-iamguarded-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-controller-fips-1.12 | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-fips-1.12 | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-fips-1.12-acmesolver | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-fips-1.12-cainjector | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-fips-1.12-cmctl | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-fips-1.12-controller | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-fips-1.12-webhook | 0 | 1.12.16-r5 |
| Chainguard | cert-manager-webhook-1.12 | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-webhook-1.12-bitnami-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-webhook-1.12-iamguarded-compat | 0 | 1.12.16-r6 |
| Chainguard | cert-manager-webhook-fips-1.12 | 0 | 1.12.16-r5 |
| Chainguard | chainctl | 0 | 0.2.59-r0 |
| Chainguard | chartmuseum | 0 | 0.16.2-r15 |
| Chainguard | cilium-cli | 0 | 0.18.2-r2 |
| Chainguard | cloudbeat-fips | 0 | 8.17.3-r4 |
| Chainguard | cluster-api-helm-controller | 0 | 0.3.2-r2 |
| Chainguard | cluster-api-helm-controller-compat | 0 | 0.3.2-r2 |
| Chainguard | cluster-api-helm-controller-fips | 0 | 0.3.2-r2 |
| Chainguard | cluster-api-helm-controller-fips-compat | 0 | 0.3.2-r2 |
| Chainguard | cmctl-1.12 | 0 | 1.12.16-r6 |
| Chainguard | cmctl-1.12-fips | 0 | 1.12.16-r5 |
| Chainguard | cmctl-fips-1.12 | 0 | 1.12.16-r5 |
| Chainguard | consul-k8s-1.1 | 0 | 1.1.18-r9 |
| Chainguard | consul-k8s-1.1-cli | 0 | 1.1.18-r9 |
| Chainguard | consul-k8s-1.3 | 0 | 1.3.9-r10 |
| Chainguard | consul-k8s-1.3-cli | 0 | 1.3.9-r10 |
| Chainguard | consul-k8s-1.4 | 0 | 1.4.8-r9 |
| Chainguard | consul-k8s-1.4-cli | 0 | 1.4.8-r9 |
| Chainguard | consul-k8s-1.5 | 0 | 1.5.5-r7 |
| Chainguard | consul-k8s-1.5-cli | 0 | 1.5.5-r7 |
| Chainguard | consul-k8s-1.6 | 0 | 1.6.2-r9 |
| Chainguard | consul-k8s-1.6-cli | 0 | 1.6.2-r9 |
| Chainguard | consul-k8s-fips-1.1 | 0 | 1.1.18-r8 |
| Chainguard | consul-k8s-fips-1.1-cli | 0 | 1.1.18-r8 |
| Chainguard | consul-k8s-fips-1.3 | 0 | 1.3.9-r9 |
| Chainguard | consul-k8s-fips-1.3-cli | 0 | 1.3.9-r9 |
| Chainguard | consul-k8s-fips-1.4 | 0 | 1.4.8-r10 |
| Chainguard | consul-k8s-fips-1.4-cli | 0 | 1.4.8-r10 |
| Chainguard | consul-k8s-fips-1.5 | 0 | 1.5.5-r9 |
| Chainguard | consul-k8s-fips-1.5-cli | 0 | 1.5.5-r9 |
| Chainguard | consul-k8s-fips-1.6 | 0 | 1.6.2-r8 |
| Chainguard | consul-k8s-fips-1.6-cli | 0 | 1.6.2-r8 |
| Chainguard | ctop | 0 | 0.7.7-r23 |
| Chainguard | dagger | 0 | 0.16.3-r1 |
| Chainguard | datadog-agent | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-core-integrations | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-core-integrations-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-fakeintake | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-fakeintake-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-jmx | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-jmx-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-oci-compat | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-oci-compat-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-s6-overlay | 0 | 7.64.1-r0 |
| Chainguard | datadog-agent-s6-overlay-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-cluster-agent | 0 | 7.64.1-r0 |
| Chainguard | datadog-cluster-agent-fips | 0 | 7.64.1-r0 |
| Chainguard | datadog-cluster-agent-oci-compat | 0 | 7.64.1-r0 |
| Chainguard | datadog-cluster-agent-oci-compat-fips | 0 | 7.64.1-r0 |
| Chainguard | docker | 0 | 28.0.2-r0 |
| Chainguard | docker-cli-buildx | 0 | 0.21.3-r1 |
| Chainguard | docker-cli-buildx-fips | 0 | 0.22.0-r0 |
| Chainguard | docker-compose | 0 | 2.34.0-r1 |
| Chainguard | docker-compose-fips | 0 | 2.34.0-r2 |
| Chainguard | docker-config-mirror-gcr | 0 | 28.0.2-r0 |
| Chainguard | docker-config-mirror-gcr-fips | 0 | 28.0.1-r3 |
| Chainguard | docker-credential-cgr | 0 | 0.2.59-r0 |
| Chainguard | docker-dind | 0 | 28.0.2-r0 |
| Chainguard | docker-dind-compat | 0 | 28.0.2-r0 |
| Chainguard | docker-dind-compat-fips | 0 | 28.0.1-r3 |
| Chainguard | docker-dind-fips | 0 | 28.0.1-r3 |
| Chainguard | docker-fips | 0 | 28.0.1-r3 |
| Chainguard | docker-init | 0 | 28.0.2-r0 |
| Chainguard | docker-init-fips | 0 | 28.0.1-r3 |
| Chainguard | docker-modprobe-compat | 0 | 28.0.2-r0 |
| Chainguard | docker-oci-entrypoint | 0 | 28.0.2-r0 |
| Chainguard | docker-oci-entrypoint-fips | 0 | 28.0.1-r3 |
| Chainguard | docker-rootless | 0 | 28.0.2-r0 |
| Chainguard | docker-rootless-fips | 0 | 28.0.1-r3 |
| Chainguard | dockerd | 0 | 28.0.2-r0 |
| Chainguard | dockerd-fips | 0 | 28.0.1-r3 |
| Chainguard | dockerd-oci-entrypoint | 0 | 28.0.2-r0 |
| Chainguard | dockerd-oci-entrypoint-fips | 0 | 28.0.1-r3 |
| Chainguard | dockerd-service | 0 | 28.0.2-r0 |
| Chainguard | dockerd-service-fips | 0 | 28.0.1-r3 |
| Chainguard | dogstatsd | 0 | 7.64.1-r0 |
| Chainguard | eksctl | 0 | 0.205.0-r4 |
| Chainguard | envoy-gateway | 0 | 1.3.1-r2 |
| Chainguard | envoy-gateway-compat | 0 | 1.3.1-r2 |
| Chainguard | envoy-gateway-egctl | 0 | 1.3.1-r2 |
| Chainguard | envoy-gateway-fips | 0 | 1.3.1-r2 |
| Chainguard | envoy-gateway-fips-egctl | 0 | 1.3.1-r2 |
| Chainguard | filebeat-7 | 0 | 7.17.28-r7 |
| Chainguard | filebeat-7-oci-entrypoint | 0 | 7.17.28-r7 |
| Chainguard | filebeat-fips-7 | 0 | 7.17.28-r5 |
| Chainguard | flux-helm-controller | 0 | 1.2.0-r4 |
| Chainguard | flux-helm-controller-bitnami-compat | 0 | 1.2.0-r4 |
| Chainguard | flux-helm-controller-fips | 0 | 1.2.0-r4 |
| Chainguard | flux-helm-controller-fips-iamguarded-compat | 0 | 1.2.0-r4 |
| Chainguard | flux-helm-controller-iamguarded-compat | 0 | 1.2.0-r4 |
| Chainguard | flux-source-controller | 0 | 1.5.0-r7 |
| Chainguard | flux-source-controller-bitnami-compat | 0 | 1.5.0-r7 |
| Chainguard | flux-source-controller-fips | 0 | 1.5.0-r6 |
| Chainguard | flux-source-controller-fips-iamguarded-compat | 0 | 1.5.0-r6 |
| Chainguard | flux-source-controller-iamguarded-compat | 0 | 1.5.0-r7 |
| Chainguard | fluxcd-source-controller-bitnami-compat | 0 | 1.5.0-r7 |
| Chainguard | fuse-overlayfs-snapshotter | 0 | 2.1.2-r0 |
| Chainguard | gatekeeper-3.16 | 0 | 3.16.3-r18 |
| Chainguard | gatekeeper-3.16-compat | 0 | 3.16.3-r18 |
| Chainguard | gatekeeper-3.16-crds | 0 | 3.16.3-r18 |
| Chainguard | gatekeeper-3.16-crds-compat | 0 | 3.16.3-r18 |
| Chainguard | gatekeeper-3.16-gator | 0 | 3.16.3-r18 |
| Chainguard | gatekeeper-3.17 | 0 | 3.17.2-r7 |
| Chainguard | gatekeeper-3.17-compat | 0 | 3.17.2-r7 |
| Chainguard | gatekeeper-3.17-crds | 0 | 3.17.2-r7 |
| Chainguard | gatekeeper-3.17-crds-compat | 0 | 3.17.2-r7 |
| Chainguard | gatekeeper-3.17-gator | 0 | 3.17.2-r7 |
| Chainguard | gatekeeper-3.18 | 0 | 3.18.2-r9 |
| Chainguard | gatekeeper-3.18-compat | 0 | 3.18.2-r9 |
| Chainguard | gatekeeper-3.18-crds | 0 | 3.18.2-r9 |
| Chainguard | gatekeeper-3.18-crds-compat | 0 | 3.18.2-r9 |
| Chainguard | gatekeeper-3.18-gator | 0 | 3.18.2-r9 |
| Chainguard | gitlab-rails-ee-17.7 | 0 | 17.7.7-r2 |
| Chainguard | gitlab-rails-ee-17.8 | 0 | 17.8.5-r2 |
| Chainguard | gitlab-rails-ee-17.9 | 0 | 17.9.2-r2 |
| Chainguard | gitlab-rails-ee-assets-17.7 | 0 | 17.7.7-r2 |
| Chainguard | gitlab-rails-ee-assets-17.8 | 0 | 17.8.5-r2 |
| Chainguard | gitlab-rails-ee-assets-17.9 | 0 | 17.9.2-r2 |
| Chainguard | gitlab-rails-ee-assets-fips-17.7 | 0 | 17.7.7-r2 |
| Chainguard | gitlab-rails-ee-assets-fips-17.8 | 0 | 17.8.5-r2 |
| Chainguard | gitlab-rails-ee-assets-fips-17.9 | 0 | 17.9.2-r2 |
| Chainguard | gitlab-rails-ee-doc-17.7 | 0 | 17.7.7-r2 |
| Chainguard | gitlab-rails-ee-doc-17.8 | 0 | 17.8.5-r2 |
| Chainguard | gitlab-rails-ee-doc-17.9 | 0 | 17.9.2-r2 |
| Chainguard | gitlab-rails-ee-doc-fips-17.7 | 0 | 17.7.7-r2 |
| Chainguard | gitlab-rails-ee-doc-fips-17.8 | 0 | 17.8.5-r2 |
| Chainguard | gitlab-rails-ee-doc-fips-17.9 | 0 | 17.9.2-r2 |
| Chainguard | gitlab-rails-ee-fips-17.7 | 0 | 17.7.7-r2 |
| Chainguard | gitlab-rails-ee-fips-17.8 | 0 | 17.8.5-r2 |
| Chainguard | gitlab-rails-ee-fips-17.9 | 0 | 17.9.2-r2 |
| Chainguard | grype | 0 | 0.90.0-r1 |
| Chainguard | grype-db | 0 | 0.29.0-r3 |
| Chainguard | grype-db-manager | 0 | 0.29.0-r3 |
| Chainguard | grype-fips | 0 | 0.90.0-r1 |
| Chainguard | heartbeat-7 | 0 | 7.17.28-r7 |
| Chainguard | heartbeat-7-oci-entrypoint | 0 | 7.17.28-r7 |
| Chainguard | heartbeat-fips-7 | 0 | 7.17.28-r5 |
| Chainguard | heartbeat-fips-7-oci-entrypoint | 0 | 7.17.28-r5 |
| Chainguard | helm | 0 | 3.17.2-r1 |
| Chainguard | helm-3 | 0 | 3.19.2-r1 |
| Chainguard | helm-4 | 0 | 4.0.1-r1 |
| Chainguard | helm-fips | 0 | 3.17.2-r1 |
| Chainguard | helm-fips-3 | 0 | 3.19.2-r0 |
| Chainguard | helm-fips-4 | 0 | 4.0.1-r1 |
| Chainguard | helm-operator | 0 | 1.39.1-r6 |
| Chainguard | helm-operator-compat | 0 | 1.39.1-r6 |
| Chainguard | helm-operator-fips | 0 | 1.39.1-r6 |
| Chainguard | helm-operator-fips-compat | 0 | 1.39.1-r6 |
| Chainguard | helm-push | 0 | 0.10.4-r24 |
| Chainguard | helm-push | 0 | 0.10.4-r27 |
| Chainguard | k3s | 0 | 1.34.1.1-r2 |
| Chainguard | k3s-multicall | 0 | 1.34.1.1-r2 |
| Chainguard | k3s-multicall-1.31 | 0 | 1.31.6.1-r5 |
| Chainguard | k3s-static | 0 | 1.34.1.1-r2 |
| Chainguard | k8sgpt | 0 | 0.4.1-r1 |
| Chainguard | k8ssandra-client | 0 | 0.6.1-r1 |
| Chainguard | k8ssandra-client-compat | 0 | 0.6.1-r1 |
| Chainguard | k8ssandra-client-fips | 0 | 0.6.1-r1 |
| Chainguard | kaniko | 0 | 1.23.2-r14 |
Related vulnerabilities
- CVE-2025-64329 containerd CRI server: Host memory exhaustion through Attach goroutine leak Also affects github.com/containerd/containerd
- CVE-2024-25621 containerd affected by a local privilege escalation via wide permissions on CRI directory Also affects github.com/containerd/containerd
- CVE-2025-47291 containerd CRI plugin: Incorrect cgroup hierarchy assignment for containers running in… Also affects github.com/containerd/containerd/v2
- CVE-2025-68121 During session resumption in crypto/tls, if the underlying Config has its ClientCAs or… Also affects auditbeat-7
- CVE-2025-61732 A discrepancy between how Go and C/C++ comments were parsed allowed for code smuggling… Also affects auditbeat-7
- CVE-2025-61727 An excluded subdomain constraint in a certificate chain does not restrict the usage of… Also affects auditbeat-7
- CVE-2025-61729 Within HostnameError.Error(), when constructing an error string, there is no limit to the… Also affects auditbeat-7
- CVE-2025-10543 Eclipse Paho Go MQTT may incorrectly encode strings if length exceeds 65535 bytes Also affects auditbeat-7