Improper Handling of Insufficient Privileges (Leaky Vessels) Affecting github.com/moby/buildkit/worker package, versions <0.12.5


0.0
high

Snyk CVSS

    Attack Complexity Low
    Privileges Required High
    Scope Changed
    Confidentiality High
    Integrity High

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.07% (28th percentile)
Expand this section
NVD
9.8 critical
Expand this section
Red Hat
7 high
Expand this section
SUSE
7 high

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-GITHUBCOMMOBYBUILDKITWORKER-6209365
  • published 31 Jan 2024
  • disclosed 11 Dec 2023
  • credit Rory McNamara (Snyk Security Research)

How to fix?

Upgrade github.com/moby/buildkit/worker to version 0.12.5 or higher.

Overview

Affected versions of this package are vulnerable to Improper Handling of Insufficient Privileges (Leaky Vessels) via APIs for running interactive containers based on built images. It is possible to use these APIs to ask BuildKit to run a container with elevated privileges. Normally, running such containers is only allowed if special security.insecure entitlement is enabled both by buildkitd configuration and allowed by the user initializing the build request.

Workaround

Avoid using BuildKit frontends from untrusted sources. A frontend image is usually specified as the #syntax line in the Dockerfile, or with the --frontend flag when using the buildctl build command.

This vulnerability was discovered and responsibly disclosed as part of the Leaky Vessels project.