CVE-2024-5154: Github.com/cri o/cri o Malicious Container Creates Symlink "mtab" Vulnerability
HIGHCVE-2024-5154 is a HIGH (CVSS 8.1) malicious container creates symlink "mtab" vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Github.com/cri o/cri o libraries in the Go ecosystem. The issue involves malicious container creates symlink "mtab" on the host external. Remediation is available by upgrading affected packages to version 1.28.7, 1.29.5, 1.30.1.
CVE-2024-5154 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2024-5154
To remediate this vulnerability, upgrade all affected Github.com/cri o/cri o dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cri-o/cri-o to 1.28.7
Upgrade github.com/cri-o/cri-o to 1.29.5
Upgrade github.com/cri-o/cri-o to 1.30.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cri-o/cri-o
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-5154, inspect your project dependencies for Github.com/cri o/cri o:
inspect dependencies for github.com/cri-o/cri-o
Analyze the terminal output to locate any version of Github.com/cri o/cri o in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.28.7), 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Github.com/cri o/cri o, 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
CVE-2024-5154 Affected Github.com/cri o/cri o Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.28.6
< 1.28.7
|
1.28.7
|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.29.4
< 1.29.5
|
1.29.5
|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.30.0
< 1.30.1
|
1.30.1
|
References
Frequently Asked Questions
What is CVE-2024-5154?
Which Github.com/cri o/cri o versions are affected?
What version fixes CVE-2024-5154?
Is github.com/cri-o/cri-o affected?
What is the CVSS score of CVE-2024-5154?
What CWE is associated with CVE-2024-5154?
How can I check Go dependencies for CVE-2024-5154?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j9hf-98c3-wrm8",
"modified" : "2025-06-27T22:08:30Z",
"published" : "2024-06-04T18:12:31Z",
"aliases" : [ "CVE-2024-5154" ],
"summary" : "malicious container creates symlink \"mtab\" on the host External",
"details" : "### Impact\nA malicious container can affect the host by taking advantage of code cri-o added to show the container mounts on the host.\n\nA workload built from this Dockerfile:\n```\nFROM docker.io/library/busybox as source\nRUN mkdir /extra && cd /extra && ln -s ../../../../../../../../root etc\n\nFROM scratch\n\nCOPY --from=source /bin /bin\nCOPY --from=source /lib /lib\nCOPY --from=source /extra .\n\n```\n\nand this container config:\n\n```\n{\n \"metadata\": {\n \"name\": \"busybox\"\n },\n \"image\":{\n \"image\": \"localhost/test\"\n },\n \"command\": [\n \"/bin/true\"\n ],\n \"linux\": {\n }\n}\n\n\n```\nand this sandbox config \n```\n{\n \"metadata\": {\n \"name\": \"test-sandbox\",\n \"namespace\": \"default\",\n \"attempt\": 1,\n \"uid\": \"edishd83djaideaduwk28bcsb\"\n },\n \"linux\": {\n \"security_context\": {\n \"namespace_options\": {\n \"network\": 2\n }\n }\n }\n}\n\n```\n\nwill create a file on host `/host/mtab`\n\n### Patches\n1.30.1, 1.29.5, 1.28.7\n\n### Workarounds\nUnfortunately not\n\n### References\n_Are there any links users can visit to find out more?_",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.28.6"
}, {
"fixed" : "1.28.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.29.4"
}, {
"fixed" : "1.29.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.30.0"
}, {
"fixed" : "1.30.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cri-o/cri-o/security/advisories/GHSA-j9hf-98c3-wrm8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5154"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:10818"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:3676"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:3700"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:4008"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:4159"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:4486"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2024-5154"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2280190"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cri-o/cri-o"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2919"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-668" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-04T18:12:31Z",
"nvd_published_at" : "2024-06-12T09:15:19Z"
}
}