The restore process in termux-sync fails to validate the `source` value within the `manifest.json` file, using the parent directory of this untrusted value as the extraction destination. Additionally, the `extract archive()` function utilizes `tarfile.extract` on archive members without enforcing destination boundaries or path jails. This allows a victim restoring a tampered backup from local, shared, GitHub, or Google Drive storage to have arbitrary files written to any location accessible to the Termux user. This includes the ability to overwrite shell startup files or executable scripts, which can lead to local code execution. The restore path also accepts unsafe `backup name` values for temporary paths, which may contain directory separators or parent directory references.