Skip to main content

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CVE-2024-23652

Severity High
Score 9.1/10

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. This issue affects github.com/moby/buildkit versions prior to 0.12.5 and 0.13.x prior to 0.13.0-beta3. Workarounds include avoiding using BuildKit frontends from an untrusted source or building an untrusted Dockerfile containing "RUN --mount" feature.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • NONE
  • HIGH

CWE-22 - Path Traversal

Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.

Advisory Timeline

  • Published