CVE-2026-86046: termux-sync Remote Code Execution Vulnerability
HIGHCVE-2026-86046 is a HIGH (CVSS 7.1) remote code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting termux-sync libraries in the PyPI ecosystem. The issue involves arbitrary file write during restore via attacker-controlled manifest source path. Remediation is available by upgrading affected packages to version 1.2.4.
CVE-2026-86046 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H).
How to Fix CVE-2026-86046
To remediate this vulnerability, upgrade all affected termux-sync dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install termux-sync>=1.2.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show termux-sync
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-86046, inspect your installed packages using pip:
pip show termux-sync
Analyze the terminal output to locate any version of termux-sync in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.4), your application is affected.
Note: The pip show termux-sync command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In termux-sync, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-86046 Affected termux-sync Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
termux-sync
|
PyPI |
< 1.2.4
|
1.2.4
|
References
Frequently Asked Questions
What is CVE-2026-86046?
Which termux-sync versions are affected?
What version fixes CVE-2026-86046?
Is termux-sync affected?
What is the CVSS score of CVE-2026-86046?
What CWE is associated with CVE-2026-86046?
How can I check PyPI dependencies for CVE-2026-86046?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-259w-wmqg-fp76",
"modified" : "2026-11-16T22:09:24Z",
"published" : "2026-11-16T22:09:24Z",
"aliases" : [ "CVE-2026-86046" ],
"summary" : "termux-sync: Arbitrary file write during restore via attacker-controlled manifest source path",
"details" : "termux-sync restore trusts fields inside an untrusted backup manifest and uses them as the extraction destination without validation.\n\nDuring restore, each archive entry is handled as:\n\n src_dir = Path(info.get(\"source\", ...)).parent\n extract_archive(archive, src_dir, ...)\n\nextract_archive opens the archive and runs tarfile.extract for every member with no path jail and no filter:\n\n with tarfile.open(archive_path, \"r:*\") as tf:\n for member in tf.getmembers():\n tf.extract(member, dest_path, set_attrs=True)\n\nThere is no check that manifest \"source\" stays under an expected restore root, that tar members stay inside dest_path, or that backup_name used in temporary paths cannot contain \"..\" or separators.\n\nImpact:\nA victim who restores a malicious backup (local, shared, or from a compromised GitHub/Google Drive storage backend) can have arbitrary files written anywhere the Termux user can write. Overwriting shell startup files or executable scripts leads to local code execution on later use.\n\nReproduction (benign markers only):\n\n1. Build a backup directory with home.tar.gz (members: proof filename + optional config names) and manifest.json.\n2. Set files.home.source to any path whose parent is the desired write directory (e.g. $HOME/dummy_for_parent so parent is $HOME).\n3. Run the same extract path the tool uses: src_dir = Path(source).parent; tarfile.extract each member into src_dir.\n4. Observe attacker-controlled files created under $HOME and under other chosen roots (config / shell-rc style overwrite).\n\nExpected: restore only writes under fixed, validated roots; reject unsafe source values and members that resolve outside dest.\nActual: write destination is fully controlled by manifest.source; proof files and overwrites appear outside any intended jail.\n\nFix direction:\n- Do not trust manifest \"source\" for extract roots; use fixed app-defined destinations\n- Sanitize backup_name (basename; reject \"..\" and separators)\n- Extract with tarfile filter=\"data\" (or equivalent boundary checks) and refuse escape\n- Treat backups as untrusted input\n\nActual result (local marker-only reproduction):\n\nPROOF path: /data/data/com.termux/files/home/PWNED_BY_TERMUX_SYNC_RESTORE.txt\nPROOF exists? True\nPROOF content:\nPWNED\nThis file was written by a malicious termux-sync backup restore path.\nRoot cause: manifest files.*.source controls extract destination.\n\n*** VULN CONFIRMED: arbitrary write to $HOME ***\n\nimportant.conf => secret=ATTACKER_CONTROLLED\n*** VULN CONFIRMED: overwrite under attacker-chosen root ***\n\n.bashrc_sim shows injected:\nexport ATTACKER=1\n*** VULN CONFIRMED: startup-file style overwrite ***\n\nExtract roots used:\n home -> parent($HOME/dummy_for_parent) = $HOME\n config -> parent(.../victim_sim/nested_dummy) = .../victim_sim\n\nReported and credited to Niranj R Mahaswar ( GitHub: @NiranjMahaswar )",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "termux-sync"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/djunekz/termux-sync/security/advisories/GHSA-259w-wmqg-fp76"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-86046"
}, {
"type" : "WEB",
"url" : "https://github.com/djunekz/termux-sync/commit/9c8637b280ee3e126885def5ff5b326c289ee7cf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/djunekz/termux-sync"
}, {
"type" : "WEB",
"url" : "https://github.com/djunekz/termux-sync/releases/tag/v1.2.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-16T22:09:24Z",
"nvd_published_at" : "2026-11-16T17:17:35Z"
}
}