Moby BuildKit
LLB file operation can be tricked to remove /tmp directory contents
A crafted message in the BuildKit low-level build API can be used to remove the contents of the /tmp directory. The action that can normally be used to delete files inside the build container rootfs can escape into the real host temp directory.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.5high · scored by NVD · CWE-22
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
moby BuildKit
- >= 0.10.0, < 0.31.2
Fixed in 0.31.2
Mitigation
Upgrade BuildKit to 0.31.2 or later.
Workaround
The issue only affects the low-level API and can not be reached when building Dockerfiles. Using a custom BuildKit frontend would be needed to make such a crafted request.
References
- Vendor advisory github.com/moby/buildkit/security/advisories/G…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.