CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-54574

CVE-2026-54574: Symlink Escape and Arbitrary Host File Write in proot-distro

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 30, 2026·5 min read·109 visits

Executive Summary (TL;DR)

An asymmetric path validation flaw in proot-distro prior to version 5.1.5 allows arbitrary host filesystem writes when extracting a malicious container image or backup archive containing crafted symbolic links.

CVE-2026-54574 (GHSA-9xq3-3fqg-4vg7) is a critical Symlink Escape and Arbitrary Host File Write vulnerability in proot-distro, an open-source utility for managing rootless PRoot containers on Termux and general Linux environments. The vulnerability is rooted in an asymmetric validation flaw during the archive extraction process of container installations, Docker/OCI layers, and container backup restorations. While the extraction engine successfully validated file names to prevent standard directory traversal (e.g., rejecting components containing '..'), it failed to validate symbolic link targets. An attacker could craft a malicious tar archive or container image that plants an absolute host-path symlink. Subsequent file members within the same archive could then traverse through this symlink, writing arbitrary files directly onto the host filesystem under the privileges of the executing process.

Vulnerability Overview

The utility proot-distro manages rootless PRoot containers on Termux and other Linux installations. During the extraction of tar archives—such as when installing containers, parsing Docker/OCI layers, or restoring backup archives—the application unpacks files into a dedicated target root directory (the container's rootfs). To prevent directory traversal, proot-distro sanitizes incoming member filenames, stripping leading slashes and discarding paths with traversal sequences like ...

However, a critical asymmetric validation flaw exists in versions prior to 5.1.5. Although the destination filenames are verified, the targets of symbolic links (member.linkname) are not validated. This permits an archive to plant a symlink pointing to an absolute or relative directory on the host filesystem.

When subsequent files inside the archive are extracted beneath the name of the symlink, the application resolves the path through the symlink. This results in file creation or modification directly on the host system outside the boundaries of the container's rootfs.

Root Cause Analysis

The root cause of this vulnerability lies in how Python's standard tarfile module interacts with symbolic links during sequential extraction when there is no runtime containment. In affected versions, the application processes directory traversal checks purely lexically on the member name, which fails to account for stateful changes on the filesystem during the extraction process.

If an archive contains a symlink member named evil targeting a host directory such as /data/data/com.termux/files/home, the extraction routine creates this symlink at <rootfs_dir>/evil. If a subsequent archive member is named evil/.bashrc, the destination path is generated using os.path.join(rootfs_dir, 'evil/.bashrc').

To write this regular file, the application invokes os.makedirs(os.path.dirname(dest), exist_ok=True) to create any parent directories. Because evil is already a symlink pointing to the host directory, the host operating system's filesystem APIs resolve the link. Consequently, open(dest, 'wb') is executed against /data/data/com.termux/files/home/.bashrc, writing the malicious content directly to the host filesystem.

Code Analysis

The fix introduced in version 5.1.5 refactors the extraction logic in proot_distro/helpers/tar_extract.py by introducing a component-by-component path resolver named _safe_resolve(). This routine checks and clamps symlinks as they are evaluated.

def _safe_resolve(root, parts):
    resolved: list = []
    pending = list(parts)
    link_budget = 40
    while pending:
        comp = pending.pop(0)
        if comp in ("", "."):
            continue
        if comp == "..":
            if resolved:
                resolved.pop()
            continue
        current = os.path.join(root, *resolved, comp)
        try:
            st = os.lstat(current)
        except OSError:
            # Path does not exist yet; safe to append verbatim
            resolved.append(comp)
            continue
        if stat.S_ISLNK(st.st_mode):
            link_budget -= 1
            if link_budget < 0:
                return None
            try:
                target = os.readlink(current)
            except OSError:
                return None
            tparts = target.split("/")
            if target.startswith("/"):
                resolved = []  # Re-root at container rootfs
            pending[:0] = tparts
        else:
            resolved.append(comp)
    return os.path.join(root, *resolved)

The patched engine applies _safe_resolve to the parent directories of each member during extraction. If a symbolic link points to an absolute path, the resolved stack is cleared, forcing the path resolution to restart from the container's rootfs. Hard link extraction is also deferred until after all regular files are fully written to avoid race conditions.

Exploitation Methodology

Exploitation requires an attacker to supply a crafted tar archive, container image, or backup to a victim who then runs proot-distro install or proot-distro restore with the malicious input. No special privileges are required.

When the victim runs the installation command, the symlink is written to disk. The subsequent file member is then written through the symlink, placing a payload inside the host's terminal configuration. The payload executes the next time the victim opens a Termux shell session.

Impact Assessment

The vulnerability has been assigned a CVSS v3.1 score of 8.2 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N). The scope metric is set to Changed (S:C) because the exploit bypasses the container runtime boundaries to alter files on the host system.

The concrete impact is dictated by the privileges of the executing process. In Termux, which runs within a single Android user context, an attacker can modify local shell environment files, compromising the terminal session and potentially accessing stored keys or credentials. In general Linux systems, running the extraction process as root allows the attacker to compromise the entire operating system by writing to /etc/shadow or creating systemd services.

Remediation and Mitigation

To address this vulnerability, users must upgrade to proot-distro version 5.1.5 or later. The update introduces the _safe_resolve logic to trap symlinks inside the container's root directory.

If upgrading is not immediately possible, users should enforce the following temporary workarounds:

  1. Avoid installing or restoring container archives from unverified or third-party sources.

  2. Avoid running proot-distro operations as the root user.

  3. Use tar -tvf <archive> to inspect the contents of any external archive and verify that it does not contain absolute symlinks or suspicious targets prior to installation.

Fix Analysis (3)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

Affected Systems

Termux environments running proot-distro versions prior to 5.1.5Linux systems using proot-distro versions prior to 5.1.5

Affected Versions Detail

Product
Affected Versions
Fixed Version
proot-distro
Termux
< 5.1.55.1.5
AttributeDetail
CWE IDCWE-59 (Improper Link Resolution Before File Access)
Attack VectorLocal (AV:L)
CVSS Score8.2
Exploit StatusProof of Concept available
KEV StatusNot listed
Affected Productproot-distro
Fixed Version5.1.5

MITRE ATT&CK Mapping

T1485Data Destruction
Impact
T1204.002User Execution: Malicious File
Execution
CWE-59
Improper Link Resolution Before File Access ('Link Following')

The product exposes a vulnerability where it does not properly limit the resolution of symbolic links, allowing users to read or write files outside the intended boundaries.

Vulnerability Timeline

Original fix commit authored to clamp symlink parent resolution inside the rootfs.
2026-06-06
Integration of security regression tests verifying containment of absolute-symlink operations.
2026-06-07
proot-distro version 5.1.5 officially released.
2026-06-07
Vulnerability details published to the GitHub Advisory Database.
2026-07-29

References & Sources

  • [1]GitHub Security Advisory GHSA-9xq3-3fqg-4vg7
  • [2]Fix Commit: _safe_resolve Implementation
  • [3]Merge Commit: Path Resolution Fix
  • [4]Unit and Security Tests Commit
  • [5]proot-distro Version 5.1.5 Release

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•34 minutes ago•CVE-2026-46429
5.5

CVE-2026-46429: Unrestricted File Upload and Validation Bypass in GeoNode

GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 2 hours ago•CVE-2026-55649
6.3

CVE-2026-55649: Stored Cross-Site Scripting in GeoNode Document Metadata Abstract Field

CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 3 hours ago•GHSA-QX75-2P3R-PWM5
7.7

CVE-2026-55622: Cross-Project Instance Copy Authorization Bypass in Canonical LXD and LXC Incus

CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 4 hours ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
3 views•10 min read
•about 5 hours ago•GHSA-47W9-6R3F-938G
9.9

GHSA-47w9-6r3f-938g: Authorization Bypass and Host Root Command Execution in Canonical LXD and Incus

A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.

Alon Barad
Alon Barad
4 views•11 min read
•about 6 hours ago•GHSA-JPF8-86F3-WP38
9.9

CVE-2026-48752: Arbitrary Host File Read and Write via Templates Symlink in Canonical LXD and Incus

A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.

Amit Schendel
Amit Schendel
4 views•10 min read