Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2024-25621

containerd affected by a local privilege escalation via wide permissions on CRI directory
Back to all
CVE

CVE-2024-25621

containerd affected by a local privilege escalation via wide permissions on CRI directory

Impact

An overly broad default permission vulnerability was found in containerd.

  • /var/lib/containerd was created with the permission bits 0o711, while it should be created with 0o700
  • Allowed local users on the host to potentially access the metadata store and the content store
  • /run/containerd/io.containerd.grpc.v1.cri was created with 0o755, while it should be created with 0o700
  • Allowed local users on the host to potentially access the contents of Kubernetes local volumes. The contents of volumes might include setuid binaries, which could allow a local user on the host to elevate privileges on the host.
  • /run/containerd/io.containerd.sandbox.controller.v1.shim was created with 0o711, while it should be created with 0o700

The directory paths may differ depending on the daemon configuration.

When the temp directory path is specified in the daemon configuration, that directory was also created with 0o711, while it should be created with 0o700.

Patches

This bug has been fixed in the following containerd versions:

  • 2.2.0
  • 2.1.5
  • 2.0.7
  • 1.7.29

Users should update to these versions to resolve the issue.

These updates automatically change the permissions of the existing directories.

[!NOTE]

/run/containerd and /run/containerd/io.containerd.runtime.v2.task are still created with 0o711.

This is an expected behavior for supporting userns-remapped containers.

Workarounds

The system administrator on the host can manually chmod the directories to not 

have group or world accessible permisisons:

chmod 700 /var/lib/containerd
chmod 700 /run/containerd/io.containerd.grpc.v1.cri
chmod 700 /run/containerd/io.containerd.sandbox.controller.v1.shim

An alternative mitigation would be to run containerd in rootless mode.

Credits

The containerd project would like to thank David Leadbeater for responsibly disclosing this issue in accordance with the containerd security policy.

For more information

If you have any questions or comments about this advisory:

To report a security issue in containerd:

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.3
-
3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
C
H
U
7.3
-
3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/containerd/containerd/security/advisories/GHSA-pwhc-rpq9-4c8w, https://nvd.nist.gov/vuln/detail/CVE-2024-25621, https://github.com/containerd/containerd/commit/7c59e8e9e970d38061a77b586b23655c352bfec5, https://github.com/containerd/containerd, https://github.com/containerd/containerd/blob/main/docs/rootless.md

Severity

7.3

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.3
EPSS Probability
0.00005%
EPSS Percentile
0.0018%
Introduced Version
0,v2.0.0-20251104145751-b1a4f783a339,v2.0.0-20251029053705-42336c7de622,v2.0.0-20240424062720-a12acedfad8e,v2.2.0-beta.0,v2.1.0-beta.0,v2.0.0-rc.2,v2.0.0-20240129045718-9795677fe923,v2.0.0-beta.2,v2.0.0-20240117175804-dbc74db6a105,v2.0.0-20240117175248-ce41d1c90ac2,v2.0.0-20231130150653-e1b49586633c,v2.0.0-beta.1,v2.0.0-20231030035221-5fdf55e493d6,v2.0.0-beta.0,v0.0.0-20211101143634-2d5d3541e626,v1.6.0-beta.2,v0.0.0-20181128012804-40d898a820a5,v1.3.0-beta.0,v0.0.0-20180717142129-da1b5470cd26,v0.0.0-20180522211558-8e97da095839,v1.2.0-beta.0,v0.0.0-20170622200819-a6e77432dfed,v1.0.0-alpha0
Fix Available
1.7.29,2.0.7,v2.0.0-20251105215010-7c59e8e9e970,v2.0.0-20251104070430-910171e90ec3,v2.0.0-20251029053040-232786c906a1,v2.2.0,v2.1.5,v2.0.7,v0.0.0-20251105215010-442cb34bda9a,v1.7.29

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading