Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-54727

CVE-2026-54727: proot-distro Information Disclosure Flaw

CVE-2026-54727 is an information disclosure vulnerability in proot-distro that allows attackers to copy files between isolated containers via crafted archives. This article covers technical details, affected versions, and mitigations.

Published:

CVE-2026-54727 Overview

CVE-2026-54727 affects proot-distro, a utility for managing proot containers on Termux and similar environments. Versions prior to 5.1.6 fail to validate hardlink entries during the restore operation. A crafted restore archive can include hardlink entries whose linkname references files in another installed container. Because proot-distro restore does not verify that the hardlink source container matches the destination container, files can be copied across container boundaries. Maintainers fixed the issue in version 5.1.6 by rejecting archives that contain more than one container. The vulnerability is classified under [CWE-668: Exposure of Resource to Wrong Sphere].

Critical Impact

A malicious restore archive can exfiltrate or overwrite files in otherwise isolated proot containers, breaking container-to-container isolation.

Affected Products

  • termux/proot-distro versions prior to 5.1.6
  • Termux environments using proot-distro restore with untrusted archives
  • Proot-managed Linux distribution containers on Android

Discovery Timeline

  • 2026-07-29 - CVE-2026-54727 published to the National Vulnerability Database (NVD)
  • 2026-07-29 - Last updated in NVD database
  • Version 5.1.6 - Fix released via commit 98aff32 in the termux/proot-distro GitHub repository

Technical Details for CVE-2026-54727

Vulnerability Analysis

The flaw resides in the archive-restore logic of proot-distro. When restoring a container from a tar archive, the utility processes hardlink entries without validating that the hardlink target belongs to the container being restored. Tar hardlink entries specify a linkname that points to an existing file. If the linkname references a path inside another installed container directory, the filesystem creates a hardlink that spans container boundaries. This allows a crafted archive to attach files from an untouched container into the restored container. The attacker gains read or write access to files that container isolation was meant to protect. Refer to the GHSA-7h3g-4w2f-fj2f advisory for the full advisory text.

Root Cause

The restore routine trusted the contents of the archive without confirming that hardlink sources originated in the same container as the destination. There was no check that the hardlink linkname remained within the target container's installation directory. This is a classic [CWE-668] exposure of a resource across security boundaries.

Attack Vector

Exploitation requires a local user to run proot-distro restore against a malicious archive supplied by the attacker. The attacker crafts a tar archive that includes hardlink entries pointing at files inside another container the victim has installed. When the victim restores the archive, the hardlinks are created and cross-container file access is established. User interaction is required to initiate the restore.

python
# Patch excerpt: proot_distro/commands/help/pages.py
#                     "file header. Supported: gzip, bzip2, xz, "
#                     "uncompressed tar. Applies to both file and "
#                     "stdin input."
#                    "\n\n"
#                    "Only one container is restored per archive. An "
#                    "archive holding more than one container is rejected."
#                 ),
#             },
#         ],
# Source: https://github.com/termux/proot-distro/commit/98aff324b7d8500ff75a8ca9ac087ee636be4716

The patch documents and enforces a new rule: proot-distro restore refuses archives that contain more than one container, blocking the hardlink cross-container primitive.

Detection Methods for CVE-2026-54727

Indicators of Compromise

  • Unexpected hardlinks in $PREFIX/var/lib/proot-distro/installed-rootfs/ where inodes are shared across container directories.
  • Restore operations initiated against archives received from untrusted sources or downloaded outside of official channels.
  • New files inside a container that were never installed by its package manager and match content from a sibling container.

Detection Strategies

  • Inspect installed container directories with find ... -links +1 to enumerate files with hardlink counts greater than one, then correlate inodes across containers.
  • Audit shell history and Termux logs for proot-distro restore invocations referencing archives outside expected backup locations.
  • Compare archive contents with tar -tvf archive.tar.gz before restoring; look for entries whose linkname fields reference another container path.

Monitoring Recommendations

  • Log all proot-distro subcommand executions and forward the logs to a central collector for review.
  • Alert on restore archives that resolve to sources outside a curated backup repository.
  • Track the installed proot-distro version across managed devices and flag hosts still running versions earlier than 5.1.6.

How to Mitigate CVE-2026-54727

Immediate Actions Required

  • Upgrade proot-distro to version 5.1.6 or later on every affected device.
  • Do not run proot-distro restore against archives from untrusted sources until the upgrade is complete.
  • Audit existing container directories for unexpected cross-container hardlinks and remove suspect files.

Patch Information

The fix is available in proot-distro release v5.1.6. The change is implemented in commit 98aff32, which rejects restore archives holding more than one container. Users installing via pkg on Termux should update the package index and upgrade the package.

Workarounds

  • Restore only archives produced by proot-distro backup from the same device or a trusted source.
  • Manually inspect archive contents with tar -tvf and verify no hardlink linkname entries reference paths outside the target container.
  • Restrict access to the Termux environment so that only authorized users can execute proot-distro restore.
bash
# Upgrade proot-distro on Termux
pkg update && pkg upgrade proot-distro

# Verify the installed version is 5.1.6 or later
proot-distro --version

# Inspect a restore archive before use
tar -tvf suspicious-backup.tar.gz | grep -E '^h|link to'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.