Privilege Context Switching Error Affecting github.com/containers/buildah/internal/volumes package, versions <1.24.7 >=1.26.0 <1.26.7 >=1.27.0 <1.27.4 >=1.29.0 <1.29.3 >=1.30.0 <1.31.5 >=1.32.0 <1.32.3 >=1.33.0 <1.33.7 >=1.34.0 <1.34.2 >=1.35.0 <1.35.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.05% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMCONTAINERSBUILDAHINTERNALVOLUMES-6457430
  • published 19 Mar 2024
  • disclosed 18 Mar 2024
  • credit Rory McNamara

How to fix?

Upgrade github.com/containers/buildah/internal/volumes to version 1.24.7, 1.26.7, 1.27.4, 1.29.3, 1.31.5, 1.32.3, 1.33.7, 1.34.2, 1.35.1 or higher.

Overview

Affected versions of this package are vulnerable to Privilege Context Switching Error due to a flaw in the handling of Containerfile configurations. Specifically, a malicious Containerfile can use a dummy image with a symbolic link to the root filesystem as a mount source. This allows the mount operation to mount the host root filesystem inside the RUN step, granting the commands within RUN read-write access to the host filesystem. Consequently, this leads to unauthorized modifications or full control over the host system from within the container during the build process.

Workaround

This vulnerability can be mitigated by enabling SELinux, which restricts the container to limited read-only access.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.6 high
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Changed
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

SUSE

8.6 high
Expand this section

Red Hat

8.6 high