CVE-2024-23652: BuildKit possible host system access from mount stub cleaner

Published Jan 31, 2024
·
Updated

Impact 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.

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 RUN --mount feature.

References

Other sources

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.

NVD

Affected Software

2 affected componentsFixes available
go/github.com/moby/buildkit<0.12.5
0.12.5
Mobyproject Buildkit<0.12.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/moby/buildkit to a version that resolves this vulnerability.

    Fixed in 0.12.5
  2. Upgrade

    Upgrade BuildKit to a version that resolves this vulnerability.

    Fixed in v0.12.5
  3. Compensating control

    Avoid using BuildKit frontend from an untrusted source.

  4. Compensating control

    Avoid building an untrusted Dockerfile containing the RUN --mount feature.

Event History

Jan 31, 2024
CVE Published
via MITRE·09:57 PM
Data Sourced
via MITRE·09:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·10:43 PM
May 1, 2025
Data Sourced
via Ubuntu·05:41 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·05:42 PM
DescriptionAffected Software
Data Sourced
via Launchpad·05:42 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2024-23652?

CVE-2024-23652 has a high severity due to its potential to remove files from the host system.

2

How do I fix CVE-2024-23652?

To fix CVE-2024-23652, upgrade to BuildKit version 0.12.5 or higher.

3

What is the impact of CVE-2024-23652?

The impact of CVE-2024-23652 allows a malicious BuildKit frontend to remove files from the host system.

4

Which versions are affected by CVE-2024-23652?

CVE-2024-23652 affects all versions of BuildKit prior to 0.12.5.

5

Is there a workaround for CVE-2024-23652?

There are no official workarounds provided for CVE-2024-23652, and upgrading is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203