CVE-2026-54574 Overview
CVE-2026-54574 is a symlink traversal vulnerability in proot-distro, a utility for managing proot containers commonly used within Termux on Android. Versions prior to 5.1.5 fail to validate archive-controlled symlink targets during extraction of plain tarball root filesystems and Docker image layers. A malicious archive can plant an absolute host-path symlink, then write files through that symlink onto the host filesystem outside the intended container root. The issue affects both _extract_plain_tar() in proot_distro/commands/install.py and _apply_layer() in proot_distro/helpers/docker.py. The maintainers addressed the flaw in version 5.1.5.
Critical Impact
A crafted rootfs tarball or Docker layer processed by proot-distro install can write attacker-controlled files anywhere the executing user can write, enabling host filesystem tampering and potential code execution.
Affected Products
- proot-distro versions prior to 5.1.5
- proot_distro/commands/install.py (_extract_plain_tar())
- proot_distro/helpers/docker.py (_apply_layer())
Discovery Timeline
- 2026-07-29 - CVE-2026-54574 published to NVD
- 2026-07-29 - Last updated in NVD database
Technical Details for CVE-2026-54574
Vulnerability Analysis
The flaw is a classic UNIX symlink attack against archive extraction [CWE-61]. When proot-distro extracts a tarball or Docker layer, it iterates over archive members and writes each entry to disk relative to the target root filesystem directory. The extraction routines trust the member.linkname field for symbolic link entries without validating that the target resolves within the intended extraction root.
An attacker who supplies a malicious rootfs archive can include a symlink entry whose linkname is an absolute host path, for example /etc or /home/user/.ssh. A subsequent archive member written through that symlink path is redirected outside the container rootfs and onto the host filesystem. Because proot-distro install runs with the invoking user's privileges, the write scope matches that user's filesystem permissions.
Root Cause
Both _extract_plain_tar() and _apply_layer() lack canonical path resolution for symlink parents before writing member contents. The patch introduces a _safe_resolve helper in proot_distro/helpers/tar_extract.py that clamps symlinked parent directories to prevent rootfs escape during extraction.
Attack Vector
Exploitation requires the victim to install a distribution or apply a Docker layer sourced from an attacker-controlled or tampered archive. The attack is local and requires user interaction, but no prior privileges on the target system. The scope changes because writes escape the intended container rootfs into the host filesystem namespace.
# Patch excerpt: proot_distro/commands/restore.py
from proot_distro.paths import (
container_dir, container_manifest, container_rootfs,
)
from proot_distro.helpers.tar_extract import _safe_resolve
# Magic-byte signatures used to identify compressed streams.
# Patch excerpt: proot_distro/helpers/build_engine/copy_step.py
from proot_distro.helpers.docker import (
AuthStrippingRedirectHandler, layer_cache_path, pull_image,
)
from proot_distro.helpers.layer_diff import write_files_layer
from proot_distro.helpers.tar_extract import _safe_resolve
def do_copy(engine, instr):
Source: GitHub commit a96d7a9
Detection Methods for CVE-2026-54574
Indicators of Compromise
- Unexpected symlinks inside proot-distro container rootfs directories whose linkname points to absolute host paths such as /etc, /home, or /data/data/com.termux.
- New or modified files outside the container rootfs directory with timestamps matching a recent proot-distro install or Docker layer apply operation.
- Rootfs tarballs or Docker image layers sourced from unofficial mirrors or non-HTTPS URLs.
Detection Strategies
- Inspect archive contents with tar -tvf archive.tar before extraction and flag any entries where linkname begins with / or contains .. segments.
- Compare host filesystem state before and after proot-distro install operations to identify writes outside the expected $PREFIX/var/lib/proot-distro/ tree.
- Audit installed proot-distro versions and confirm they are 5.1.5 or later.
Monitoring Recommendations
- Log proot-distro install, restore, and Docker layer operations along with the source URL of each archive.
- Monitor file creation events in sensitive user directories such as ~/.ssh, ~/.bashrc, and shell profile paths for writes originating from proot-distro processes.
How to Mitigate CVE-2026-54574
Immediate Actions Required
- Upgrade proot-distro to version 5.1.5 or later on all affected systems.
- Avoid installing distributions or Docker images from untrusted or unverified sources until the upgrade is complete.
- Review existing container rootfs directories for suspicious absolute-path symlinks that predate the upgrade.
Patch Information
The fix is available in proot-distro v5.1.5. The patch introduces _safe_resolve in proot_distro/helpers/tar_extract.py and integrates it into the extraction paths in install.py, restore.py, docker.py, and the build engine copy_step.py. See the GitHub Security Advisory GHSA-9xq3-3fqg-4vg7 and the v5.1.5 release notes for full details.
Workarounds
- Only extract rootfs archives obtained from the official proot-distro distribution list over HTTPS with verified checksums.
- Manually inspect any third-party tarball or Docker layer for absolute-path or parent-traversal linkname entries before use.
- Run proot-distro as an unprivileged user with minimal access to sensitive host paths.
# Upgrade proot-distro within Termux
pkg update && pkg upgrade proot-distro
# Verify installed version is 5.1.5 or later
proot-distro --version
# Audit an untrusted archive for dangerous symlinks before install
tar -tvf suspicious-rootfs.tar.gz | awk '$1 ~ /^l/ { print }'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

