CVE-2026-86046
termux- sync: Arbitrary file write during restore via attacker- controlled manifest source path (PyPI)
- Severity
- 7.1HighLocal attack, no privileges, needs user interactionCVSS 3.1, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.27% in 30 daysPercentile19thEPSS, scored
- Listed fix
1.2.4for termux-sync From GitHub Advisories and OSV
Overview
termux-sync is an open source tool for backing up and restoring a Termux environment across devices. Prior to 1.2.4, termux-sync restore uses the parent directory of the untrusted manifest.json files.*.source value as an extraction destination, and extract_archive calls tarfile.extract on archive members without enforcing a destination boundary. A victim who restores a malicious or tampered backup from local, shared, GitHub, or Google Drive storage can have files written anywhere the Termux user can write, including shell startup files or executable scripts that can lead to code execution when later used. The restore path also accepts unsafe backup_name values for temporary paths, and archive members are not constrained to the intended destination. This issue is fixed in version 1.2.4.
CVSS 3.1 vector
Exploitability
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
Impact
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:HExploit chance over time
Affected
Packages 1
| Package | Affected | Fixed |
|---|---|---|
termux-syncPyPI | through 1.2.3 | 1.2.4 |
| before 1.2.4, plus listed versions 1.1.01.1.11.1.21.2.01.2.11.2.21.2.3 | 1.2.4 |
Products 1
Sources
CVE List Score usedCVSS 3.17.1
termux-sync: Arbitrary file write during restore via attacker-controlled manifest source path
termux-sync is an open source tool for backing up and restoring a Termux environment across devices. Prior to 1.2.4, termux-sync restore uses the parent directory of the untrusted manifest.json files.*.source value as an extraction destination, and extract_archive calls tarfile.extract on archive members without enforcing a destination boundary. A victim who restores a malicious or tampered backup from local, shared, GitHub, or Google Drive storage can have files written anywhere the Termux user can write, including shell startup files or executable scripts that can lead to code execution when later used. The restore path also accepts unsafe backup_name values for temporary paths, and archive members are not constrained to the intended destination. This issue is fixed in version 1.2.4.
- Record
CVE-2026-86046- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-16
EUVDEUVD-2026-126531CVSS 3.17.1
termux-sync is an open source tool for backing up and restoring a Termux environment across devices. Prior to 1.2.4, termux-sync restore uses the parent directory of the untrusted manifest.json files.*.source value as an extraction destination, and extract_archive calls tarfile.extract on archive members without enforcing a destination boundary. A victim who restores a malicious or tampered backup from local, shared, GitHub, or Google Drive storage can have files written anywhere the Termux user can write, including shell startup files or executable scripts that can lead to code execution when later used. The restore path also accepts unsafe backup_name values for temporary paths, and archive members are not constrained to the intended destination. This issue is fixed in version 1.2.4.
- Record
EUVD-2026-126531- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Updated
- 2026-11-17
GitHub AdvisoriesGHSA-259w-wmqg-fp76CVSS 3.17.1
termux-sync: Arbitrary file write during restore via attacker-controlled manifest source path
termux-sync restore trusts fields inside an untrusted backup manifest and uses them as the extraction destination without validation.
During restore, each archive entry is handled as:
src_dir = Path(info.get("source", ...)).parent extract_archive(archive, src_dir, ...)
extract_archive opens the archive and runs tarfile.extract for every member with no path jail and no filter:
with tarfile.open(archive_path, "r:*") as tf: for member in tf.getmembers(): tf.extract(member, dest_path, set_attrs=True)
There 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.
Impact: A 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.
Reproduction (benign markers only):
- Build a backup directory with home.tar.gz (members: proof filename + optional config names) and manifest.json.
- Set files.home.source to any path whose parent is the desired write directory (e.g. $HOME/dummy_for_parent so parent is $HOME).
- Run the same extract path the tool uses: src_dir = Path(source).parent; tarfile.extract each member into src_dir.
- Observe attacker-controlled files created under $HOME and under other chosen roots (config / shell-rc style overwrite).
Expected: restore only writes under fixed, validated roots; reject unsafe source values and members that resolve outside dest. Actual: write destination is fully controlled by manifest.source; proof files and overwrites appear outside any intended jail.
Fix direction:
- Do not trust manifest "source" for extract roots; use fixed app-defined destinations
- Sanitize backup_name (basename; reject ".." and separators)
- Extract with tarfile filter="data" (or equivalent boundary checks) and refuse escape
- Treat backups as untrusted input
Actual result (local marker-only reproduction):
PROOF path: /data/data/com.termux/files/home/PWNED_BY_TERMUX_SYNC_RESTORE.txt PROOF exists? True PROOF content: PWNED This file was written by a malicious termux-sync backup restore path. Root cause: manifest files.*.source controls extract destination.
*** VULN CONFIRMED: arbitrary write to $HOME ***
important.conf => secret=ATTACKER_CONTROLLED *** VULN CONFIRMED: overwrite under attacker-chosen root ***
.bashrc_sim shows injected: export ATTACKER=1 *** VULN CONFIRMED: startup-file style overwrite ***
Extract roots used: home -> parent($HOME/dummy_for_parent) = $HOME config -> parent(.../victim_sim/nested_dummy) = .../victim_sim
Reported and credited to Niranj R Mahaswar ( GitHub: @NiranjMahaswar )
- Record
GHSA-259w-wmqg-fp76- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-16
NVDCVSS 3.17.1
termux-sync is an open source tool for backing up and restoring a Termux environment across devices. Prior to 1.2.4, termux-sync restore uses the parent directory of the untrusted manifest.json files.*.source value as an extraction destination, and extract_archive calls tarfile.extract on archive members without enforcing a destination boundary. A victim who restores a malicious or tampered backup from local, shared, GitHub, or Google Drive storage can have files written anywhere the Termux user can write, including shell startup files or executable scripts that can lead to code execution when later used. The restore path also accepts unsafe backup_name values for temporary paths, and archive members are not constrained to the intended destination. This issue is fixed in version 1.2.4.
- Record
CVE-2026-86046- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-16
OSVCVSS 3.17.1
termux-sync: Arbitrary file write during restore via attacker-controlled manifest source path
termux-sync is an open source tool for backing up and restoring a Termux environment across devices. Prior to 1.2.4, termux-sync restore uses the parent directory of the untrusted manifest.json files.*.source value as an extraction destination, and extract_archive calls tarfile.extract on archive members without enforcing a destination boundary. A victim who restores a malicious or tampered backup from local, shared, GitHub, or Google Drive storage can have files written anywhere the Termux user can write, including shell startup files or executable scripts that can lead to code execution when later used. The restore path also accepts unsafe backup_name values for temporary paths, and archive members are not constrained to the intended destination. This issue is fixed in version 1.2.4.
- Record
CVE-2026-86046- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-17
OSVGHSA-259w-wmqg-fp76CVSS 3.17.1
termux-sync: Arbitrary file write during restore via attacker-controlled manifest source path
termux-sync restore trusts fields inside an untrusted backup manifest and uses them as the extraction destination without validation.
During restore, each archive entry is handled as:
src_dir = Path(info.get("source", ...)).parent extract_archive(archive, src_dir, ...)
extract_archive opens the archive and runs tarfile.extract for every member with no path jail and no filter:
with tarfile.open(archive_path, "r:*") as tf: for member in tf.getmembers(): tf.extract(member, dest_path, set_attrs=True)
There 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.
Impact: A 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.
Reproduction (benign markers only):
- Build a backup directory with home.tar.gz (members: proof filename + optional config names) and manifest.json.
- Set files.home.source to any path whose parent is the desired write directory (e.g. $HOME/dummy_for_parent so parent is $HOME).
- Run the same extract path the tool uses: src_dir = Path(source).parent; tarfile.extract each member into src_dir.
- Observe attacker-controlled files created under $HOME and under other chosen roots (config / shell-rc style overwrite).
Expected: restore only writes under fixed, validated roots; reject unsafe source values and members that resolve outside dest. Actual: write destination is fully controlled by manifest.source; proof files and overwrites appear outside any intended jail.
Fix direction:
- Do not trust manifest "source" for extract roots; use fixed app-defined destinations
- Sanitize backup_name (basename; reject ".." and separators)
- Extract with tarfile filter="data" (or equivalent boundary checks) and refuse escape
- Treat backups as untrusted input
Actual result (local marker-only reproduction):
PROOF path: /data/data/com.termux/files/home/PWNED_BY_TERMUX_SYNC_RESTORE.txt PROOF exists? True PROOF content: PWNED This file was written by a malicious termux-sync backup restore path. Root cause: manifest files.*.source controls extract destination.
*** VULN CONFIRMED: arbitrary write to $HOME ***
important.conf => secret=ATTACKER_CONTROLLED *** VULN CONFIRMED: overwrite under attacker-chosen root ***
.bashrc_sim shows injected: export ATTACKER=1 *** VULN CONFIRMED: startup-file style overwrite ***
Extract roots used: home -> parent($HOME/dummy_for_parent) = $HOME config -> parent(.../victim_sim/nested_dummy) = .../victim_sim
Reported and credited to Niranj R Mahaswar ( GitHub: @NiranjMahaswar )
- Record
GHSA-259w-wmqg-fp76- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-16
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| References | OSV | |
| Published date | EUVD | |
| Published date | EUVD | |
| Affected packages, other IDs, key facts, references | GitHub Advisories, NVD, OSV | |
| Weaknesses, references, severity, title | CVE List | |
| First indexed | EUVD |
Upstream dates may differ.
References
github.com/djunekz/termux-sync/security/advisories/GHSA-259w-wmqg-fp76
github.com/djunekz/termux-sync/commit/9c8637b280ee3e126885def5ff5b326c289ee7cf
github.com/djunekz/termux-sync/releases/tag/v1.2.4
nvd.nist.gov/vuln/detail/CVE-2026-86046
github.com/advisories/GHSA-259w-wmqg-fp76
github.com/CVEProject/cvelistV5/tree/main/cves/2026/86xxx/CVE-2026-86046.json
github.com/djunekz/termux-sync