Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › News › JavaScript

News Analysis

Telegram Widget Flaw Allows Code Execution Beyond Sandboxed Environment

Researchers found ways to bypass Telegram's security measures, allowing code to run outside the app's sandbox on Android 13.2.2 (7303).

JavaScriptAndroidWebOperating systemsMobile

Key points

  • NebuSec claims to have found two remote code execution methods that can bypass security measures in Telegram's Android app.
  • A Telegram widget on Android 13.2.2 (7303) was shown to bypass the seccomp filter and launch the phone's calculator app.
  • Kaspersky reported suspected exploitation of a Telegram widget flaw when users visited certain Telegram channels.

Researchers reported that two remote code execution vulnerabilities in Telegram's Android app can bypass security measures introduced by the company. These flaws allow malicious widgets to execute code outside the app's sandboxed environment. The security measures were added in response to previous vulnerabilities. A bot named V12 posted a video claiming that any Telegram message could be used to execute remote code. Telegram implemented a seccomp filter to restrict system calls made by the QuickJS process, which is included in the source code for Android 13.2.2 (7303). NebuSec researchers identified two methods to bypass the seccomp filter: one exploits a widget-related bug, and the other combines a widget bug with a kernel vulnerability. A Telegram widget on Android 13.2.2 (7303) was shown to bypass the filter and launch the phone's calculator app. The researchers did not specify what additional system access the code could gain beyond launching the calculator. The widget documentation states that widgets operate in a sandboxed environment with limited permissions. According to the researchers, a single memory corruption bug in QuickJS can disable the sandbox's protections, allowing arbitrary memory access. The filter does not block ioctl calls, which could be exploited for further system access. The filter is implemented on top of Android's existing restrictions for the QuickJS process. According to the researchers, all widgets run in a shared memory space, so a compromised widget could access data from other bots. In audit mode, the filter blocks new program execution but only logs system calls it recognizes. The source code includes a comment indicating that the audit mode will continue until the system stops making certain calls. A GitHub contributor noted that general bots are not allowed to use widgets in private chats. No further updates have been provided on which bots are still permitted to use widgets. The write-up from the researchers gives no patched release, and the Android source code that has been made public does not go past 13.2.2 (7303). Telegram's CEO, Pavel Durov, stated that no user could be hacked simply by receiving a message. He mentioned that a user would need to start a third-party service for code execution to occur. Durov claimed that this method had been patched on the server side. Kaspersky reported suspected exploitation of a Telegram widget flaw when users visited certain Telegram channels. A PowerShell script ran unnoticed, downloading and launching WebRAT, also known as Salat Stealer.

Our article, written with AI assistance from the facts of the original report and the official vulnerability data below. Read the original for full details.

Original report

The Hacker Newsthehackernews.com

“Researchers Claim Two RCE Exploits That Bypass Telegram’s New Android Defenses”

A malicious widget can bypass the security filter that Telegram added to its Android app last week and run code outside it, according to NebuSec, a security company. Widgets are small interactive blocks that bots send inside chat messages, and their JavaScript runs on the user's phone. The researchers ran their demonstration on a Telegram test server, because only approved bots can send

More on this topic