CVE-2024-23652CWE-22

BuildKit possible host system access from mount stub cleaner

Critical · published January 31, 2024

CVSS v3.1
10.0
EPSS
2%
Percentile
84.3
In the wild
Unconfirmed
What it is

🚨 A crafty Dockerfile could send your host files out the door! This sneaky CVE-2024-23652 vulnerability in BuildKit lets malicious frontends manipulate files outside the container — yikes! 🔥 Think of BuildKit as a bakery — it can whip up delicious treats (build artifacts) from raw ingredients (source code). But if a rogue baker substitutes a recipe that accidentally uses ingredients from the pantry (your host system), you could end up with a burnt batch! An attacker could exploit this vulnerability to delete or manipulate critical files on your host system, leading to potential data loss and severe system disruptions. Imagine waking up to find your secret recipe (or, you know, important data) turned into crumbs! This is why this vulnerability is marked critical; it could severely impact your operations.

Put simply

Think of BuildKit as a bakery — it can whip up delicious treats (build artifacts) from raw ingredients (source code). But if a rogue baker substitutes a recipe that accidentally uses ingredients from the pantry (your host system), you could end up with a burnt batch! CVE-2024-23652 allows a malicious BuildKit frontend or Dockerfile using the RUN --mount feature to trick the system into removing files from the host, rather than just from the container. This dangerous oversight makes it possible for the BuildKit to manipulate files outside its intended scope.

What to do

An attacker could exploit this vulnerability to delete or manipulate critical files on your host system, leading to potential data loss and severe system disruptions. Imagine waking up to find your secret recipe (or, you know, important data) turned into crumbs! This is why this vulnerability is marked critical; it could severely impact your operations. To mitigate this vulnerability, upgrade to BuildKit version 0.12.5 immediately. Additionally, avoid using BuildKit frontends from untrusted sources and be cautious with any Dockerfiles that utilize the RUN --mount feature from untrusted origins. You've got this! Follow these steps to secure your system and regain your peace of mind. 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.02464 · 84.3th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2024-01-31T21:57Z
EPSS history
Timeline
  • 31 JAN 21:57Z
    BuildKit possible host system access from mount stub cleaner
    cvelistv5