BuildKit possible host system access from mount stub cleaner
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. A malicious BuildKit frontend or Dockerfile using RUN --mount could trick the feature that removes empty files created for the mountpoints into removing a file outside the container, from the host system. The issue has been fixed in v0.12.5. Workarounds include avoiding using BuildKit frontends from an untrusted source or building an untrusted Dockerfile containing RUN --mount feature.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-23652
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 20:00 UTC · Revision 1
Source evidence
BuildKit possible host system access from mount stub cleaner
core-osv · Original sourcePublished 31 Jan 2024, 21:57 UTC
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. A malicious BuildKit frontend or Dockerfile using RUN --mount could trick the feature that removes empty files created for the mountpoints into removing a file outside the container, from the host system. The issue has been fixed in v0.12.5. Workarounds include avoiding using BuildKit frontends from an untrusted source or building an untrusted Dockerfile containing RUN --mount feature.
osv:CVE-2024-23652
Complete source record
{
"id": "738218fb062602b77a16c878e686736f63a7ca362eef1494390b61ebb049b0d8",
"url": "https://osv.dev/vulnerability/CVE-2024-23652",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "BuildKit possible host system access from mount stub cleaner",
"summary": "BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. A malicious BuildKit frontend or Dockerfile using RUN --mount could trick the feature that removes empty files created for the mountpoints into removing a file outside the container, from the host system. The issue has been fixed in v0.12.5. Workarounds include avoiding using BuildKit frontends from an untrusted source or building an untrusted Dockerfile containing RUN --mount feature.",
"evidence": "osv:CVE-2024-23652",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2024-23652",
"aliases": [
"CVE-2024-23652",
"GHSA-4v98-7qmw-rqr8",
"GO-2024-2494"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/moby/buildkit",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "bac3f2b673f3f9d33e79046008e7a38e856b3dc6"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.12.5"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "bac3f2b673f3f9d33e79046008e7a38e856b3dc6"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v0.12.5"
},
{
"cpe": "cpe:2.3:a:mobyproject:buildkit:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.12.5"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v0.12.4",
"v0.12.3",
"v0.12.2",
"v0.12.1",
"v0.12.0",
"dockerfile/1.6.0-labs",
"dockerfile/1.6.0",
"v0.12.0-rc2",
"dockerfile/1.6.0-rc2-labs",
"dockerfile/1.6.0-rc2",
"v0.12.0-rc1",
"dockerfile/1.6.0-rc1-labs",
"dockerfile/1.6.0-rc1",
"v0.11.0-rc3",
"v0.11.0-rc2",
"dockerfile/1.5.0-rc2-labs",
"dockerfile/1.5.0-rc2",
"v0.11.0-rc1",
"dockerfile/1.5.0-rc1-labs",
"dockerfile/1.5.0-rc1",
"v0.10.0",
"dockerfile/1.4.0-labs",
"dockerfile/1.4.0",
"v0.10.0-rc2",
"dockerfile/1.4.0-rc2",
"dockerfile/1.4.0-labs-rc2",
"v0.10.0-rc1",
"dockerfile/1.4.0-rc1",
"dockerfile/1.4.0-labs-rc1",
"v0.9.0-rc2",
"v0.9.0",
"dockerfile/1.3.0-labs",
"dockerfile/1.3.0",
"v0.9.0-rc1",
"dockerfile/1.3.0-rc1-labs",
"dockerfile/1.3.0-rc1",
"v0.8.1",
"dockerfile/1.2.1-labs",
"dockerfile/1.2.1",
"dockerfile/1.2.0-labs",
"dockerfile/1.2.0",
"v0.8.0",
"v0.8.0-rc3",
"v0.8.0-rc2",
"v0.8.0-rc1",
"dockerfile/1.2.0-rc1-labs",
"dockerfile/1.2.0-rc1",
"v0.7.0",
"dockerfile/1.1.6-experimental",
"dockerfile/1.1.6",
"v0.7.0-rc1",
"dockerfile/1.1.6-rc1-experimental",
"dockerfile/1.1.6-rc1",
"v0.6.1",
"dockerfile/1.1.3-experimental",
"dockerfile/1.1.3",
"v0.6.0",
"dockerfile/1.1.2-experimental",
"dockerfile/1.1.2",
"dockerfile/1.1.1-experimental",
"dockerfile/1.1.1",
"v0.5.1",
"v0.5.0",
"dockerfile/1.1.0-experimental",
"dockerfile/1.1.0",
"v0.4.0",
"dockerfile/1.0.2-experimental",
"v0.3.3",
"dockerfile/1.0.1-experimental",
"dockerfile/1.0.1",
"dockerfile/1.0.0-experimental",
"dockerfile/1.0.0",
"v0.3.2",
"dockerfile/0.9.0-experimental",
"dockerfile/0.9.0",
"v0.3.1",
"v0.3.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-23652.json"
}
}
],
"modified": "2026-10-28T02:30:23.077828666Z",
"provider": "osv",
"references": [
"https://github.com/moby/buildkit/releases/tag/v0.12.5",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/23xxx/CVE-2024-23652.json",
"https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8",
"https://nvd.nist.gov/vuln/detail/CVE-2024-23652",
"https://github.com/moby/buildkit/pull/4603"
],
"provider_metadata": {
"cwe_ids": [
"CWE-22"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/23xxx/CVE-2024-23652.json"
}
},
"related_cves": [
{
"value": "CVE-2024-23652",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 489527,
"published_at": "2024-01-31T21:57:42.774+00:00"
}