Lucene search

K
githubGitHub Advisory DatabaseGHSA-M3R6-H7WV-7XXV
HistoryJan 31, 2024 - 10:43 p.m.

BuildKit vulnerable to possible race condition with accessing subpaths from cache mounts

2024-01-3122:43:32
CWE-362
GitHub Advisory Database
github.com
13
buildkit
vulnerability
subpaths
cache mounts
race condition
dockerfile
untrusted source

8.7 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

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

6.8 Medium

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

29.6%

Impact

Two malicious build steps running in parallel sharing the same cache mounts with subpaths could cause a race condition that can lead to files from the host system being accessible to the build container.

Patches

The issue has been fixed in v0.12.5

Workarounds

Avoid using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing cache mounts with --mount=type=cache,source=... options.

References

https://www.openwall.com/lists/oss-security/2019/05/28/1

Affected configurations

Vulners
Node
mobybuildkitRange<0.12.5
CPENameOperatorVersion
github.com/moby/buildkitlt0.12.5

8.7 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

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

6.8 Medium

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

29.6%