Researchers from a security firm say they found two ways for a Telegram widget to leap out of its sandbox on Android and run code outside the app. They demonstrated the trick on a test server and claim one path is purely a widget bug the defenses missed, while the other links a widget bug to a kernel flaw. The researchers aren’t publishing full details yet, so we’re left with a dramatic demo and a lot of curiosity.
What the researchers showed
In plain terms: interactive widgets that bots send into chats run JavaScript on your phone inside a tiny engine. Telegram recently moved that engine into its own process and added a seccomp filter to try to stop naughty system calls. The engine itself is the lightweight QuickJS, and its sandbox rules stop things like network access — until they don’t.
The researchers describe two separate escape routes:
- A widget-only bug that the new filter doesn’t catch, letting the widget run code beyond its intended limits.
- A combo attack that uses a widget bug the filter does see but then chains it to a kernel vulnerability to break free entirely.
The demo showed a widget opening the calculator app on a device running the targeted Android build. The write-up and video didn’t say whether the exploit could read messages or other phone data, or whether the user needed to interact first. They also confirmed that a single memory flaw — for example a use-after-free or out-of-bounds write in the engine — can let script code read and write the hosting process memory, effectively neutering the sandbox.
Two other important details: every widget runs in the same engine process, so a hijacked widget could share memory with widgets from other bots; and the filter appears to leave some calls unblocked (for example ioctl), and in published source it’s running in an “audit” mode that mostly logs events instead of outright blocking them.
Separately, another security vendor reported seeing suspected real-world abuse where visiting certain Telegram channels triggered a PowerShell script that downloaded and ran a remote-access/data-stealing payload. That report didn’t publish the exact bug or how many people were hit, but it’s a reminder attackers move fast when a hole appears.
So what should you do?
If you like a quiet life on your phone, follow these simple, sensible, slightly paranoid steps:
- Don’t interact with widgets from unknown bots — don’t press, don’t tap, don’t wink back.
- Only add or use bots you trust. If a bot hasn’t earned it, deny it the spotlight.
- Keep Telegram and Android updated. Patches matter — yes, even the boring ones.
- Consider avoiding widgets until developers confirm fixes and the company flips that filter from “audit” to “block.”
- Run reputable mobile security tools and watch for odd behavior like unexpected downloads or new apps appearing.
Short version: widgets are handy but can be risky if their engine gets a memory bug. Until the researchers publish details and maintainers ship firm fixes, treat third-party widgets like mysterious snacks — don’t eat them unless you know what’s inside.