CVE-2026-86046: 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 extractarchive 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 backupname values for temporary paths, and archive members are not constrained to the intended destination. This issue is fixed in version 1.2.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
termux-syncto a version that resolves this vulnerability.Fixed in 1.2.4
Event History
Frequently Asked Questions
Who is exposed to this issue?
Users of termux-sync versions earlier than 1.2.4 are exposed when they restore a malicious or tampered backup. The backup may come from local or shared storage, GitHub, or Google Drive.
What does exploitation require?
An attacker needs to cause the victim to restore a crafted backup; no attacker privileges are required. Exploitation requires user interaction because the victim must initiate the restore.
What can an attacker do through a malicious restore?
The crafted manifest source path and archive contents can cause files to be written anywhere the Termux user has permission to write. This can include shell startup files or executable scripts, potentially leading to code execution when those files are later used.
What should be done if updating is not immediately possible?
Do not restore backups that are untrusted or may have been tampered with, including backups obtained from shared storage or remote repositories. Only restore backups whose origin and integrity you can verify until version 1.2.4 can be installed.
How can I determine whether my installation is affected?
Installations running a version earlier than 1.2.4 are affected. Version 1.2.4 contains the fix.