# CVE-2026-15789: Moby BuildKit path traversal in local source upload

Source: https://junglewise.ai/threats/cve-2026-15789-moby-buildkit-path-traversal-in-local-source-upload  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-21. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-15789 · Severity: info · CVSS 6.9 · Published 2026-07-21

Moby BuildKit is a toolkit used to convert source code into container images, such as those used by Docker. A security flaw allows a user with permission to start builds to bypass directory restrictions and place files outside of the intended storage area on the host system. This could lead to unauthorized file modification or system instability if an attacker uses a custom-made client to interact with the BuildKit service.

Technologies: [Moby Project BuildKit](https://junglewise.ai/threats/technologies/buildkit). Vendors: [Moby Project](https://junglewise.ai/threats/vendors/moby-project).

## Quick answers

**Is CVE-2026-15789 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-15789 being exploited in the wild.

**How severe is CVE-2026-15789?** Informational severity, with a CVSS score of 6.9, published 21 July 2026.

**Which products and versions are affected?** Moby Project BuildKit < 0.31.2.

**Is there a fix for CVE-2026-15789?** A patch was published on 2026-07-21: Fix released in version 0.31.2 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-15789 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-15789?** Check whether you run Moby Project BuildKit at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A path traversal vulnerability (CWE-22) exists in the BuildKit daemon's handling of local source upload requests. By crafting a malicious upload request using a custom client, an attacker can bypass destination directory validation to write files outside of the BuildKit-controlled state directory. Exploitation requires the attacker to have valid permissions to access the BuildKit control API. The vulnerability is addressed in BuildKit version 0.31.2. Users are advised to upgrade or restrict API access to trusted clients like Docker Buildx or buildctl.

## Affected products

- Moby BuildKit < 0.31.2

## Timeline

- 2026-07-16: advisory: GitHub Security Advisory published by Moby project
- 2026-07-21: disclosed: CVE-2026-15789 published to NVD
- 2026-07-21: patched: Fix released in version 0.31.2

## References

- [https://github.com/moby/buildkit/security/advisories/GHSA-g2h8-426c-7976](https://github.com/moby/buildkit/security/advisories/GHSA-g2h8-426c-7976)

## Related threats

- [BuildKit daemon panic when CDI disabled flag is used](https://junglewise.ai/threats/cve-2026-93316-if-buildkit-daemon-is-started-with-cdi-disabled-it-can-lead-to)
- [Moby BuildKit command injection in Git source checkout](https://junglewise.ai/threats/cve-2026-15793-moby-buildkit-command-injection-in-git-source-checkout)
- [Moby BuildKit path traversal in low-level build API](https://junglewise.ai/threats/cve-2026-15791-moby-buildkit-path-traversal-in-low-level-build-api)
- [Moby BuildKit arbitrary file read via NTFS junctions in WCOW cache mount](https://junglewise.ai/threats/cve-2026-15788-moby-buildkit-arbitrary-file-read-via-ntfs-junctions-in-wcow)
