CVE-2024-25621: Github.com/containerd/containerd Containerd Affected By A Local Vulnerability

HIGH
Advisory Identifier: GHSA-pwhc-rpq9-4c8w
CVSS 7.3
CWE-279
Published
Advisory Summary

CVE-2024-25621 is a HIGH (CVSS 7.3) containerd affected by a local vulnerability (CWE-279: Incorrect Execution-Assigned Permissions) affecting Github.com/containerd/containerd libraries in the Go ecosystem. The issue involves containerd affected by a local privilege escalation via wide permissions on cri directory. Remediation is available by upgrading affected packages to version 1.7.29, 2.0.7, 2.1.5, 2.2.0.

CVE-2024-25621 at a Glance

CVE Identifier CVE-2024-25621
GHSA Identifier GHSA-pwhc-rpq9-4c8w
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-279: Incorrect Execution-Assigned Permissions
Affected Product Github.com/containerd/containerd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-25621

To remediate this vulnerability, upgrade all affected Github.com/containerd/containerd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/containerd/containerd fixed: 1.7.29
Upgrade github.com/containerd/containerd to 1.7.29
github.com/containerd/containerd/v2 fixed: 2.0.7
Upgrade github.com/containerd/containerd/v2 to 2.0.7
github.com/containerd/containerd/v2 fixed: 2.1.5
Upgrade github.com/containerd/containerd/v2 to 2.1.5
github.com/containerd/containerd/v2 fixed: 2.2.0
Upgrade github.com/containerd/containerd/v2 to 2.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/containerd/containerd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-25621, inspect your project dependencies for Github.com/containerd/containerd:

inspect dependencies for github.com/containerd/containerd

Analyze the terminal output to locate any version of Github.com/containerd/containerd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.29), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-279: Incorrect Execution-Assigned Permissions, where while it is executing, the product sets the permissions of an object in a way that violates the intended permissions that have been specified by the user. In Github.com/containerd/containerd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/containerd/containerd/blob/main/docs/rootless.md). ### Credits The containerd project would like to thank David Leadbeater for responsibly disclosing this issue in accordance with the [containerd security policy](https://github.com/containerd/project/blob/main/SECURITY.md). ### For more information If you have any questions or comments about this advisory: * Open an issue in [containerd](https://github.com/containerd/containerd/issues/new/choose) * Email us at [security@containerd.io](mailto:security@containerd.io) To report a security issue in containerd: * [Report a new vulnerability](https://github.com/containerd/containerd/security/advisories/new)

CVE-2024-25621 Affected Github.com/containerd/containerd Versions

4 component(s)
Fixed Versions:
1.7.292.0.72.1.52.2.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/containerd/containerd
Go
< 1.7.29
1.7.29
github.com/containerd/containerd/v2
Go
< 2.0.7
2.0.7
github.com/containerd/containerd/v2
Go
≥ 2.1.0-beta.0
< 2.1.5
2.1.5
github.com/containerd/containerd/v2
Go
≥ 2.2.0-beta.0
< 2.2.0
2.2.0

References

Frequently Asked Questions

What is CVE-2024-25621?
CVE-2024-25621 is a security vulnerability in Github.com/containerd/containerd involving containerd affected by a local privilege escalation via wide permissions on CRI directory under CWE-279: Incorrect Execution-Assigned Permissions.
Which Github.com/containerd/containerd versions are affected?
Affected versions include releases prior to 1.7.29, 2.0.7, 2.1.5, 2.2.0 across affected packages: github.com/containerd/containerd, github.com/containerd/containerd/v2.
What version fixes CVE-2024-25621?
Upgrading to 1.7.29, 2.0.7, 2.1.5, 2.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/containerd/containerd affected?
Yes, github.com/containerd/containerd is affected in releases prior to 1.7.29. Upgrade your dependency to 1.7.29 or later.
Is github.com/containerd/containerd/v2 affected?
Yes, github.com/containerd/containerd/v2 is affected in releases prior to 2.0.7, 2.1.5, 2.2.0. Upgrade your dependency to 2.0.7, 2.1.5, 2.2.0 or later.
What is the CVSS score of CVE-2024-25621?
CVE-2024-25621 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-25621?
CVE-2024-25621 is classified under CWE-279: Incorrect Execution-Assigned Permissions (While it is executing, the product sets the permissions of an object in a way that violates the intended permissions that have been specified by the user.).
How can I check Go dependencies for CVE-2024-25621?
Run the dependency tree command: 'inspect dependencies for github.com/containerd/containerd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pwhc-rpq9-4c8w",
  "modified" : "2025-11-06T23:12:26Z",
  "published" : "2025-11-06T15:12:08Z",
  "aliases" : [ "CVE-2024-25621" ],
  "summary" : "containerd affected by a local privilege escalation via wide permissions on CRI directory",
  "details" : "### Impact\n\nAn overly broad default permission vulnerability was found in containerd.\n\n- `/var/lib/containerd` was created with the permission bits 0o711, while it should be created with 0o700\n  - Allowed local users on the host to potentially access the metadata store and the content store\n- `/run/containerd/io.containerd.grpc.v1.cri` was created with 0o755, while it should be created with 0o700\n  - 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.\n- `/run/containerd/io.containerd.sandbox.controller.v1.shim` was created with 0o711, while it should be created with 0o700\n\nThe directory paths may differ depending on the daemon configuration.\nWhen the `temp` directory path is specified in the daemon configuration, that directory was also created with 0o711, while it should be created with 0o700.\n\n### Patches\n\nThis bug has been fixed in the following containerd versions:\n\n* 2.2.0\n* 2.1.5\n* 2.0.7\n* 1.7.29\n\nUsers should update to these versions to resolve the issue.\nThese updates automatically change the permissions of the existing directories.\n\n> [!NOTE]\n>\n> `/run/containerd` and `/run/containerd/io.containerd.runtime.v2.task` are still created with 0o711.\n> This is an expected behavior for supporting userns-remapped containers.\n\n### Workarounds\n\nThe system administrator on the host can manually chmod the directories to not \nhave group or world accessible permisisons:\n\n```\nchmod 700 /var/lib/containerd\nchmod 700 /run/containerd/io.containerd.grpc.v1.cri\nchmod 700 /run/containerd/io.containerd.sandbox.controller.v1.shim\n```\n\nAn alternative mitigation would be to run containerd in [rootless mode](https://github.com/containerd/containerd/blob/main/docs/rootless.md).\n\n### Credits\n\nThe containerd project would like to thank David Leadbeater for responsibly disclosing this issue in accordance with the [containerd security policy](https://github.com/containerd/project/blob/main/SECURITY.md).\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [containerd](https://github.com/containerd/containerd/issues/new/choose)\n* Email us at [security@containerd.io](mailto:security@containerd.io)\n\nTo report a security issue in containerd:\n\n* [Report a new vulnerability](https://github.com/containerd/containerd/security/advisories/new)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containerd/containerd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.29"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containerd/containerd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containerd/containerd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0-beta.0"
      }, {
        "fixed" : "2.1.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containerd/containerd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0-beta.0"
      }, {
        "fixed" : "2.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/security/advisories/GHSA-pwhc-rpq9-4c8w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-25621"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/commit/7c59e8e9e970d38061a77b586b23655c352bfec5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/containerd/containerd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/blob/main/docs/rootless.md"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-279" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-06T15:12:08Z",
    "nvd_published_at" : "2025-11-06T19:15:40Z"
  }
}