Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious usr_etc backup with bin/sh member
-
DeliveryPlace backup in shared or compromised storage
-
ExploitVictim runs restore and confirms overwrite
-
ExecutionMember escapes jail into $PREFIX/bin
-
ImpactReplaced executable runs as Termux user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the victim obtain and restore an attacker-controlled termux-sync backup (local file, a backup shared for device migration, or a public/compromised GitHub or Google Drive storage backend) and then affirmatively confirm the overwrite prompt during 'termux-sync restore' (__init__.py:1599). The specific triggering artifact is a backup whose manifest declares a usr_etc or usr_lib archive containing a member (e.g. bin/sh) that resolves inside the wider $PREFIX jail - the restore preview shows only backup name, date, package and archive counts (__init__.py:1587-1596) and does NOT list member paths, so an inspecting victim cannot see the planted bin/sh. Limiting factors that reduce real-world risk: it is local only (no network vector), it needs mandatory user interaction and consent, it depends entirely on the attacker controlling the restored backup content (nothing on the victim device is needed beyond running the restore), and no privilege escalation occurs - $PREFIX is writable by the Termux user by design. Full remediation requires updating to 1.3.8; the advisory presents the fix as the remedy rather than a configuration mitigation. |
| Impact | This is a genuine but moderate-priority issue, not an inflated high-CVSS score. The provided CVSS:3.1 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N = 5.5 MEDIUM) is internally consistent with the mechanism: exploitation is local (restore is a device-side operation), low-complexity, needs no attacker privileges on the victim device, but requires user interaction - the victim must choose to restore an attacker-supplied backup and answer 'y' at the overwrite prompt (__init__.py:1599). The reporter deliberately scored C:N/A:N and I:H rather than pushing a 7.8 code-execution framing, reasoning that a user confirming a restore has already accepted file overwrites; the novel harm is writes OUTSIDE the advertised restore surface (a usr_etc/usr_lib archive reaching $PREFIX/bin). No EPSS score was supplied and the CVE is not present in CISA KEV in the input, so there is no signal of active or widespread exploitation - consistent with 'no public exploit identified as confirmed weaponized code.' A detailed, working proof-of-concept is described in the GHSA advisory (the author overwrote $PREFIX/bin/sh on the published 1.3.6 wheel and ran the replacement), but it is presented as a local, non-destructive reproduction harness, not published as a verified drop-in exploit. The Decision label is 'this_month,' aligning with the medium severity: patch within the normal cycle rather than as an emergency. No SSVC decision tree, no automatable/technical-impact SSVC fields, and no EPSS were provided - STATED EXPLICITLY as missing. The practical risk is bounded by the social-engineering requirement (the victim must obtain and restore a malicious backup from a shared/compromised storage backend) rather than any network-reachable condition. |
| Exploit ScenarioDerived | An attacker places a malicious termux-sync backup in a location the victim will restore from - a shared backup for a device migration, or a public/compromised GitHub or Google Drive storage backend as contemplated by the project's own SECURITY.md. The backup's usr_etc archive (advertised as holding only $PREFIX/etc) secretly contains a member like bin/sh at mode 0755; because the extraction jail is the parent of the backup root, that member lands in $PREFIX/bin and survives tarfile's data filter. A detailed working PoC is described in the advisory but not published as runnable exploit code; when the victim restores and the replaced $PREFIX/bin/sh (or any overwritten executable) is next invoked, the attacker's code runs as the Termux user. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
Restore-time path traversal in termux-sync (all versions through 1.3.7, fixed in 1.3.8) lets an attacker who controls a backup archive write files anywhere under the Termux installation prefix, including replacing executables such as $PREFIX/bin/sh, yielding code execution as the Termux user the next time a replaced binary is invoked. Each archive is extracted into the parent of its backup root and member paths are only validated against that wider directory, so a manifest that declares just a 'usr_etc' archive can legitimately-looking place files in $PREFIX/bin; the restore preview does not list member paths, so a victim who reviews the prompt cannot see the planted binary. Exploitation requires local delivery of a malicious backup and explicit confirmation of the overwrite prompt, no privilege escalation occurs because $PREFIX is writable by the Termux user by design, and the reporter published a local non-destructive proof-of-concept reproduction in the GitHub advisory - it is not classified here as confirmed working exploit code, and there is no KEV listing. The independent assessment rates this a genuine but moderate-priority issue (CVSS 5.5) and the priority label is this_month, with full remediation requiring the 1.3.8 update.
RemediationAI
Vendor-released patch: 1.3.8 - upgrade the pip package to termux-sync 1.3.8, which is published as release tag v1.3.8 and implements the fix in commits 3dd44a266cc9fba816c684164067616c7c0ef61d and 40a016331662c2c161f6045657b374fd00c05811 (per-item extraction roots plus a required member prefix of etc, lib or home, and manifest package-name validation with 'pkg install -y -- <pkg>'). The advisory presents the update as the remedy rather than a configuration workaround, and the independent assessment likewise concludes full remediation requires 1.3.8; the vulnerable behaviour lives in the restore extraction path, so no setting makes an unpatched client validate members against their own backup root. Until the update is applied, the only lever available is what gets restored: do not restore backups from untrusted or weakly controlled sources (including public or compromised GitHub/Google Drive storage backends and backups received for device migration), because the restore preview only displays backup name, date, package count and archive count and does not list member paths, so a planted bin/sh in a usr_etc or usr_lib archive cannot be spotted at the confirmation prompt - it requires inspecting the archive contents out of band before answering 'y'. Note that any mitigation short of patching leaves the overwrite of $PREFIX/bin/sh possible and offers no privilege boundary to fall back on, since $PREFIX is writable by the Termux user by design and the flaw yields no escalation beyond that account. Advisory: https://github.com/djunekz/termux-sync/security/advisories/GHSA-x9x8-xcv7-5x5g.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
termux-sync is a Python (pip) tool that backs up and restores a Termux environment, using tarfile archives plus a manifest describing four backup components: the package list, $HOME, $PREFIX/etc and $PREFIX/lib ($PREFIX is the Termux installation prefix and $HOME lives under it, mapping to CPE cpe:2.3:a:djunekz:termux-sync). The root cause is CWE-22 (path traversal) expressed as a containment-jail mistake rather than a filter bypass: cmd_restore builds each destination as Path(item_root).resolve().parent, so a 'usr_etc' archive whose declared surface is $PREFIX/etc is extracted with $PREFIX as the jail, and a 'usr_lib' archive likewise; the existing _safe_extract_member guard resolves both sides, rejects '../' and absolute members, checks link targets, refuses device/FIFO entries and runs tarfile.extract with filter="data" (available on the reporter's Python 3.12.16), all of which work. What survives is the choice of destination: a member named bin/sh is inside $PREFIX and therefore passes. The writer never produces such members because create_archive always adds one tree under arcname=source_path.name, and nothing validated a member's first path component against the arcname that key would really produce; additionally, 'usr_lib' is in BACKUP_ITEMS but cmd_backup never generates a usr_lib archive, so a manifest containing that key is always forged yet was accepted. The fix (commit 3dd44a26) adds _check_member_root, requiring every member's first component to equal the expected top-level folder name (etc, lib, home), and also validates manifest package names against a regex and passes them to pkg install after '--' so a leading '-' cannot be read as an option. The trigger requires a crafted archive delivered as a backup plus the victim's confirmation; no network vector is involved.
Know when Termux Sync gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Restore is a local, low-complexity operation needing no attacker privilege but mandatory victim confirmation (UI:R); impact is integrity-only file/executable overwrite within $PREFIX, so I:H and C:N/A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
termux-sync is an open source tool for backing up and restoring a Termux environment across devices. Prior to 1.3.8, termux-sync checks restored archive members against the parent of each backed-up directory instead of the directory itself. An attacker who controls a backup that a user restores can write files to other locations under the Termux installation prefix, including replacing executables. This can result in arbitrary code execution with the privileges of the Termux user when a replaced executable is run. This issue is fixed in version 1.3.8.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-141822
GHSA-x9x8-xcv7-5x5g
NVD
CVE.org
EPSS
Exploit-DB