CWE-22
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 execu
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-86046
CVSS 7.1/10 · YÜKSEK · 16.11.2026
CWE: CWE-22
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 AÇIK NEDİR?
Path Traversal / LFI
Açıklama: 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 tarf…
Etkilenen: termux-sync
⚡ SALDIRI ZİNCİRİ
Saldırı adımları:
1. ../../../../etc/passwd ile Linux dosya sistemi okunur.
2. URL encode: ..%2F..%2F..%2Fetc%2Fpasswd
3. Double encode: ..%252F..%252Fetc%252Fpasswd
4. PHP LFI → RCE: Log poisoning ile User-Agent: <?php system($_GET['cmd']); ?> gönderilir.
5. PHP wrapper: php://filter/convert.base64-encode/resource=config.php ile kaynak kodu okunur.
🔧 Araçlar: LFISuite, ffuf, Burp Suite, dotdotpwn
🗺️ MITRE ATT&CK: T1083 (File and Directory Discovery), T1552 (Unsecured Credentials)
🌍 GERÇEK DÜNYA ETKİSİ
Sistem verileri değiştirilebilir/silinebilir; hizmet tamamen devre dışı bırakılabilir.
🛡️ ÇÖZÜM VE MİTİGASYON
→ termux-sync için üretici güvenlik güncellemesini uygula.
→ realpath() ile canonicalize et, whitelist kullan.
→ WAF kuralı ekle, anormal trafik için IDS alert oluştur.
⚠️ ACİLİYET
⚠️ Planlı bakım (2 hafta) — Yüksek seviye.
────────────────────────────────────────
[Kural Tabanlı Analiz] [💡 config.json dosyasına ai_key (Claude: sk-ant-... veya Groq: gsk_...) ekleyerek gerçek AI analizi kullanabilirsiniz]
[⚠️ AI key mevcut ancak istek başarısız — kural tabanlı analiz kullanıldı]