The short version
- The bypass. NebuSec says it got code past the seccomp filter Telegram added to its Android app in two ways: a widget bug the filter does not cover, and a covered widget bug chained with a kernel bug.
- Telegram's position. Telegram made the changes after an account called V12 claimed any message could run code. Pavel Durov, its chief executive, says a user had to start a third-party service first and that the server side was fully patched.
- What is not known. The researchers name no CVE and no fixed version, and do not say what the code can reach beyond opening the calculator or whether the user must tap the widget.
- Suspected exploitation. Kaspersky reports suspected exploitation of a Telegram widget flaw that silently ran PowerShell and installed WebRAT, also called Salat Stealer, without linking it to either demonstration.
Timeline
| Date | Event |
|---|---|
| 9-15 Nov | An account called V12 posts a video on X claiming any Telegram message could execute remote code. |
| 9-15 Nov | Telegram moves the QuickJS widget engine into its own process and adds a seccomp filter, both visible in the published source for Telegram for Android 13.2.2 (7303). |
| 13-15 Nov | Pavel Durov writes that no one could be hacked just by receiving a message and that a server-side patch was complete. |
| 13-15 Nov | Kaspersky reports suspected exploitation of a Telegram widget flaw that installed WebRAT when users visited some Telegram channels. |
| 16-17 Nov | NebuSec publishes its analysis describing two ways past the filter and demonstrates one of them on a test server. |
| 17 Nov | The published 13.2.2 (7303) source is found to set the filter to audit mode, which still blocks attempts to start new programs or processes but only records the other listed system calls and lets them run. |
How the bypass works
Telegram moved QuickJS, the small JavaScript engine that runs widgets, into its own process on Android and added a seccomp filter, a mechanism that can block or record the system calls a process makes. The filter covers a few dozen calls, including ptrace, bpf and mount, and lets the rest through; ioctl is left unfiltered. NebuSec says one bypass uses a widget bug the filter does not cover, the other chains a covered widget bug with a kernel bug.
Widgets are meant to run in a sandbox with rules such as no network access, but those rules live in the engine's own code, the researchers say. One use-after-free or out-of-bounds write in QuickJS lets a script read and write the process's memory and the rules stop protecting anything. One process runs every widget, so a hijacked widget shares memory with the widgets of every other bot. In the published 13.2.2 (7303) source the filter runs in audit mode, which still blocks attempts to start new programs or processes but only records the other listed calls and lets them run; the code does not show whether installed builds use the same setting.
Telegram's account
"No one could be hacked just by receiving a message," Pavel Durov wrote in a channel post before the researchers' demonstration. He said a user first had to start a third-party service, and that even that was fully patched on the server side. The company had earlier said the problem in V12's first demonstration was fixed and the fix reached all users. Widget access is now limited: a contributor to the telegram-bot-api project wrote that general bots are not allowed to use widgets even in private chats, and no later message in that thread says which bots are still allowed or that the limit has been lifted.
Kaspersky's warning
Kaspersky said it detected suspected exploitation of a flaw in Telegram widgets when people visited some Telegram channels. A PowerShell script ran without the user noticing and downloaded and launched WebRAT, also called Salat Stealer, which lets attackers control the system and steal data from crypto wallets and Telegram accounts. The vendor's warning does not identify the flaw or the Telegram version, gives no victim count and does not link the activity to either demonstration. It advises not running widgets until a fix is released.
What is not known yet
- Whether the builds users install run the seccomp filter in audit mode or in blocking mode.
- Whether the bugs were reported to Telegram's developers and whether CVE identifiers will follow.
- What the code can reach beyond opening the calculator, such as messages or other data on the phone.
- Whether a user has to start the bot or tap the widget for the bypass to work.
- Who carried out the activity Kaspersky observed, how many devices were affected and which Telegram versions were involved.
What to do
If you use Telegram on Android
- Do not run or tap widgets sent by bots until a fix is released; Kaspersky advises avoiding widgets entirely for now.
- Do not start third-party bot services to get widget access; Durov said that was a precondition in the cases described.
- Watch for a Telegram for Android build newer than 13.2.2 (7303) and install it; the researchers list no fixed version.
If you secure endpoints
- Look for PowerShell that runs without visible user action and then launches an unfamiliar binary.
- Hunt for WebRAT, also called Salat Stealer, which steals crypto wallet and Telegram account data.
For everyone else
- Treat scriptable content delivered inside messaging apps as code execution and restrict it by policy until the vendor ships a fix; the widget sandbox depends on the JavaScript engine's own code, so one memory bug removes it.
Update log
- First published.
Sources
New incident reports by email
One email a week with the reports published since the last one.
We email you about this topic only; unsubscribe any time. See our Privacy Policy.