# GHSA-MWC9-VC42-CGJJ: Bubblewrap runner plants absolute symlinks from build layers, letting a package hardlink reach host files

- Database: GitHub
- Severity: low (stated by ghsa, no CVSS score)
- Published: 2026-12-04
- Modified: 2026-12-04

## Tracked as

- [CVE-2026-145143](https://cve.now/CVE-2026-145143.md): Chainguard melange host file access via symlink in bubblewrap runner

## Affected versions

- chainguard.dev/melange (Go): fixed in 0.66.1

## Description

## Summary

When melange builds with the bubblewrap runner (the default on Linux), `LoadImage` extracts the build environment's layers onto the host. The symlink handling checked a cleaned path but created the link with the raw target, so an absolute symlink target was planted unchanged. A package hardlink whose target runs through that symlink then linked a host file into the guest root. The guest root is mounted read-write inside the sandbox, so build steps could read or modify that host file.

## Preconditions

A crafted package, signed by a key the build trusts, in the build environment (for example, from a compromised repository, or from a config that adds its own repositories and keyring). The target file must be on the same filesystem as `$TMPDIR` and linkable by melange's user. The Docker and QEMU runners are not affected. Library callers that pass untrusted layers to the exported `LoadImage` are affected directly.

## Patches

Fixed in v0.66.1 (#2773), which extracts layers through `os.Root` and fails the build on any entry that escapes the guest root.

## Workarounds

Use the QEMU or Docker runner.

## References

- https://github.com/chainguard-dev/melange/security/advisories/GHSA-mwc9-vc42-cgjj

Page: https://cve.now/GHSA-MWC9-VC42-CGJJ

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
