CVE-2026-64777
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-64777 is a path traversal vulnerability (CWE-22) in Apple's container tool for Swift that allows a malicious builder peer to request in-context files by name from the host and receive the contents of files that resolve outside the intended build context. It affects all versions of apple/container up to and including 1.1.0, and was published on August 20, 2026. The vulnerability was addressed in container version 1.2.0. It carries a CVSS v3.1 base score of 4.3 (Medium) (GitHub Advisory).

Technical details

The root cause is improper path validation (CWE-22) in the BuildFSSync.read() and BuildFSSync.info() functions within Sources/ContainerBuild/BuildFSSync.swift, present since the file's initial commit on 2025-06-03. The host-side code enforces containment only on the lexical path of a requested filename — checking whether the name is textually inside the context directory — rather than verifying where the path ultimately resolves after symlink resolution. A malicious builder peer (e.g., a compromised or custom build.image) can exploit this by requesting a file whose name is lexically valid but which is a symlink pointing outside the build context, causing the host to return the contents of the symlink's target. Exploitation requires two preconditions: a builder peer willing to make direct file requests (not the default stock builder behavior), and a build context containing a symlink that resolves outside the context root (GitHub Advisory).

Impact

A successful exploit allows an authenticated builder peer to read arbitrary files from the host filesystem that lie outside the intended build context, resulting in a confidentiality breach. The disclosure occurs in-memory during the build process and does not leave a durable artifact on the host filesystem, making post-hoc detection difficult. There is no integrity or availability impact; the vulnerability is limited to unauthorized file read access (GitHub Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time (GitHub Advisory). The EPSS score is approximately 0.0023 (0.23%), indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is not automatable and requires low privileges (authenticated builder peer access), limiting the practical attack surface.

Exploitation steps

  1. Gain builder peer access: Compromise or substitute the builder peer image by setting a custom build.image in the target's ~/.config/container/config.toml, or by executing a supply-chain attack on the default builder image.
  2. Prepare a malicious build context: Ensure the build context (or convince the victim to use one) that contains a symlink whose target resolves to a sensitive file outside the context root (e.g., a symlink secret -> /etc/passwd).
  3. Initiate a build: Trigger a container build operation on the host using the malicious builder peer and the prepared build context.
  4. Request the out-of-context file: From the malicious builder peer, issue a direct gRPC file request via BuildFSSync.read() or BuildFSSync.info() using the lexically valid in-context symlink name.
  5. Receive file contents: The host resolves the symlink and returns the contents of the target file (e.g., /etc/passwd) to the builder peer, bypassing the intended build context boundary (GitHub Advisory).

Indicators of compromise

  • Configuration: Presence of a non-default build.image entry in ~/.config/container/config.toml or container system properties that points to an untrusted or unexpected image.
  • File System: Symlinks within the build context directory that resolve to paths outside the context root, detectable with:
    find <context_dir> -type l | while read -r l; do
      case "$(readlink -f "$l")" in
        "$(readlink -f <context_dir>)"/*) ;;
        *) echo "escapes context: $l -> $(readlink -f "$l")";;
      esac
    done
  • Process/Network: Unexpected or anomalous gRPC BuildFSSync file read requests from the builder peer process targeting filenames that correspond to symlinks in the build context (GitHub Advisory).

Mitigation and workarounds

Upgrade apple/container to version 1.2.0 or later, which fixes the path traversal in BuildFSSync.read() and BuildFSSync.info() (GitHub Advisory). If immediate upgrade is not possible, only use the default, unmodified builder image and do not set a custom build.image in the container configuration unless the publisher is fully trusted. Additionally, before building any cloned or downloaded context, scan it for out-of-context symlinks using find -type l -exec sh -c 'case "$(readlink -f "$1")" in "$2"/*) ;; *) echo "$1 -> $(readlink -f "$1")";; esac' _ {} \; and remove any symlinks whose targets fall outside the context root.

Community reactions

The advisory was published by Apple's security team (credited to reporters liyander, DebasishTripathy13, SergeyMalych-Novee, SergeyMalych, blackcon, and 0xdkay) and assigned a Moderate severity rating (GitHub Advisory). No significant broader media coverage or notable public researcher commentary beyond the official advisory has been identified at this time.

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-13097HIGH8.7
  • NixOS logoNixOS
  • samba-ndr-libs
NoYesAug 20, 2026
CVE-2026-73198HIGH7.5
  • NixOS logoNixOS
  • freeipa-server-dns
NoYesAug 20, 2026
CVE-2026-73197HIGH7.5
  • NixOS logoNixOS
  • libwbclient-debuginfo
NoYesAug 20, 2026
CVE-2026-73196MEDIUM6.5
  • NixOS logoNixOS
  • freeipa-client-encrypted-dns
NoYesAug 20, 2026
CVE-2026-64777MEDIUM4.3
  • NixOS logoNixOS
  • container
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management