# Telegram Widgets Sandbox Escape: Claimed RCE Chains Bypassing Telegram for Android 13.2.2 Widget Hardening (QuickJS-ng Use-After-Return) and Suspected WebRAT/Salat Stealer Delivery

> Telegram's new HTML widgets (Bot API 10.4, 9 Nov 2026) run bot-supplied JavaScript in QuickJS-ng on the user's device. A QuickJS-ng use-after-return bug allowed sandbox escape and was fixed in Android 13.2.2, but NebuSec claims two further RCE chains that bypass the new process isolation and seccomp filter on 13.2.2 (7303), with details withheld. Separately, Kaspersky reports suspected exploitation of a widgets flaw that silently ran a PowerShell script delivering WebRAT (Salat Stealer); no link between the two has been shown.

- **Published:** 2026-11-20T05:34:22Z
- **Last reviewed:** 2026-11-20T05:34:22Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6544
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6544.png
- **ID:** TL-2026-6544
- **Severity:** HIGH
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 14 (3 shown free below)

## Description

Telegram opened HTML widgets to bots on 9 November 2026 (Bot API 10.4). A widget is a single HTML document with inline CSS/JS that Telegram renders and executes on-device in a QuickJS engine (not a WebView). Telegram's documentation states the sandbox has no network access (fetch/XMLHttpRequest/WebSocket throw NetworkDisabledError), no navigation, an 8 MB memory cap, 2,000 node limit and CPU-time budgets, and that the only way out is a small request to the owning bot. NebuSec argues these rules live inside the engine's own code, so any memory-corruption bug in QuickJS (use-after-free or out-of-bounds write) lets a script read and write process memory and the rules then protect nothing.

The first bug: Telegram uses its own fork of QuickJS-ng. The parser accepted `for (await using ...)` loop headers inside ordinary non-async functions; the engine then left such a function on the async path without keeping references to its locals alive, so nested closures kept accessing freed stack memory after return (a use-after-return). The vulnerable code entered QuickJS-ng main together with explicit resource-management support. Andreas Rosdal's whole-engine audit published on 9 Nov 2026 (27 findings, this one #3 and rated high) described it. Per Telegram's widget-sandbox changelog it was reported against Telegram for Android 13.2.1 and affected every platform where the fork is built. The parser now raises a syntax error for the construct (10 Nov 2026) and Telegram for Android 13.2.2 shipped the same day. On 11 Nov, researcher account V12 posted a video claiming any Telegram message could now become RCE (calculator launch); a second V12 demonstration reportedly targeted Telegram Desktop. Telegram stated the first problem was fixed for all users; Pavel Durov said no one could be hacked just by receiving a message and that a user first had to start a third-party service, which was patched server-side.

On 12 Nov Telegram moved the QuickJS engine into its own Android process and added a seccomp filter (per published 13.2.2 (7303) source: twidget-seccomp.cpp, WidgetEngineService.java). NebuSec (video 14 Nov, write-up 16 Nov) claims two ways to run code outside that filter on 13.2.2 (7303): (1) a widget vulnerability the filter does not cover, and (2) a widget vulnerability the filter does cover, chained with a kernel vulnerability. The filter is a denylist of roughly 30 syscalls (e.g. ptrace, bpf, mount) and allows everything else, including every ioctl. One process serves all widgets, so a hijacked widget shares memory with other bots' widgets. The Hacker News additionally observed that in the published source the filter is in audit mode (it still blocks exec/process creation but only logs the other listed calls); whether shipped builds use the same setting is not shown. NebuSec holds back details, names no CVE and does not state whether Telegram was notified or whether fixes exist. The attacker model is anyone who can register a bot.

Separately, Kaspersky reported (Telegram channel post, evening of about 13 Nov) suspected exploitation of a Telegram widgets flaw: when users opened certain Telegram channels, a PowerShell script ran silently, downloaded and launched WebRAT (also called Salat Stealer, a Rust trojan with remote control and crypto-wallet and Telegram account theft). Kaspersky says the exploitation is presumed, has published no technical details, victim counts or IOCs, does not identify the flaw or Telegram version, and does not link it to the NebuSec or V12 demonstrations. Open questions remain: Telegram documentation says widgets work only in private bot chats, which does not explain a channel-based infection route. From about 15:50 UTC on 13 Nov, Telegram's servers began rejecting sendWidget from general bots (INPUT_MEDIA_WIDGET_NOT_ALLOWED); a Telegram-side contributor confirmed general bots are not currently allowed to use widgets even in private chats, and Anti-Malware reports HTML widgets were disabled server-side after V12's second demonstration. Kaspersky advises not running widgets until a fix is released.

Intelligence gaps: no CVE, CVSS, fixed version for the NebuSec chains, or IOCs tied to the widget campaign have been published. Indicators in this record that relate to WebRAT infrastructure come from Kaspersky's December 2025 GitHub-distribution campaign report and are NOT confirmed to be part of the widget activity.

## MITRE ATT&CK

- T1203 Exploitation for Client Execution
- T1059.007 Command and Scripting Interpreter: JavaScript
- T1059.001 Command and Scripting Interpreter: PowerShell
- T1219 Remote Access Tools
- T1005 Data from Local System

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**Telegram Client Spawning Script Interpreter or LOLBin (Widget Exploitation)** (`TL-2026-6544-SPL-001`)

Telegram.exe spawning powershell.exe, cmd.exe, mshta.exe or other interpreters/LOLBins. Matches the claimed Telegram widgets (QuickJS-ng use-after-return, for-await-using) sandbox-escape RCE demonstrations and Kaspersky's report of a silent PowerShell script delivering WebRAT (Salat Stealer) when users opened Telegram channels. Telegram does not normally launch these children, so any hit warrants triage. TL-2026-6544.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1189, T1203, T1059.007, T1059.001
- **Data sources:** sysmon, windows_security, microsoft_defender_for_endpoint
- **Severity:** high
- **Confidence:** high

### Splunk SPL

```spl
index=endpoint sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 (ParentImage="*Telegram.exe") (Image="*powershell.exe" OR Image="*pwsh.exe" OR Image="*cmd.exe" OR Image="*wscript.exe" OR Image="*cscript.exe" OR Image="*mshta.exe" OR Image="*rundll32.exe" OR Image="*regsvr32.exe" OR Image="*certutil.exe" OR Image="*bitsadmin.exe") | eval is_powershell=if(match(lower(Image),"(powershell|pwsh)[.]exe$"),1,0) | stats count min(_time) as first_seen max(_time) as last_seen values(Image) as child_images values(CommandLine) as child_cmdlines max(is_powershell) as powershell_child by host User ParentImage ParentCommandLine | convert ctime(first_seen) ctime(last_seen) | sort - powershell_child - count | table first_seen last_seen host User ParentImage child_images child_cmdlines powershell_child count
```

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "Telegram.exe"
| where FileName in~ ("powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "bitsadmin.exe")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, SHA256
| order by Timestamp desc
```

### Sigma

```yaml
title: Telegram Client Spawning Script Interpreter or LOLBin - Widget Exploitation
id: 6f3a1c52-8d4e-4b7a-9c21-5e0d7a4b1f01
status: experimental
description: Detects the Telegram desktop client (Telegram.exe) spawning a script interpreter or living-off-the-land binary. Telegram does not normally launch these; the pattern matches the claimed widget (QuickJS-ng) sandbox-escape RCE demonstrations and the Kaspersky report of a silent PowerShell script that delivered WebRAT (Salat Stealer) after users opened Telegram channels (TL-2026-6544).
references:
    - https://thehackernews.com/2026/11/researchers-claim-two-rce-exploits-that.html
    - https://nebusec.ai/research/telegram-widget-hardening/
    - https://core.telegram.org/bots/widgets
author: Threadlinqs Team
date: 2026-11-20
tags:
    - attack.initial-access
    - attack.t1189
    - attack.execution
    - attack.t1203
    - attack.t1059.001
    - attack.t1059.007
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith: '\Telegram.exe'
    selection_child:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\cmd.exe'
            - '\wscript.exe'
            - '\cscript.exe'
            - '\mshta.exe'
            - '\rundll32.exe'
            - '\regsvr32.exe'
            - '\certutil.exe'
            - '\bitsadmin.exe'
    condition: selection_parent and selection_child
falsepositives:
    - Telegram Desktop launching cmd.exe or rundll32.exe for file-open or shell integration on some builds
    - Admin or developer automation that wraps Telegram Desktop
level: high
```

**Known false positives:**

- Telegram Desktop launching cmd.exe or rundll32.exe for shell integration on some builds
- Developer or admin automation wrapping Telegram Desktop

**Tuning notes:** Baseline Telegram.exe child processes over 30 days and allowlist exact benign command lines. Keep powershell.exe, pwsh.exe, mshta.exe and wscript.exe children unallowlisted. Telegram Desktop installs outside the standard per-user install path should be treated as higher risk.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Telegram Client Spawning Script Interpreter or LOLBin (Widget Exploitation) (locked: unlock with TL Creds)
- WebRAT / Salat Stealer Loader Behaviour - PowerShell Download, Defender Tampering, tdata Collection (locked: unlock with TL Creds)
- WebRAT / Salat Stealer C2 and Payload Host Contact (locked: unlock with TL Creds)
- Telegram Client Spawning Script Interpreter or LOLBin (Widget Exploitation) (locked: unlock with TL Creds)
- WebRAT / Salat Stealer Loader Behaviour - PowerShell Download, Defender Tampering, tdata Collection (locked: unlock with TL Creds)
- WebRAT / Salat Stealer C2 and Payload Host Contact (locked: unlock with TL Creds)
- WebRAT / Salat Stealer Loader Behaviour - PowerShell Download, Defender Tampering, tdata Collection (locked: unlock with TL Creds)
- WebRAT / Salat Stealer C2 and Payload Host Contact (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 14)

Defanged, TLP:CLEAR.

- Domain: `shopsleta[.]ru`
- File hash: `61b1fc6ab327e6d3ff5fd3e82b430315`
- Domain: `ezc5510min[.]temp[.]swtest[.]ru`

Full set of 14 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Researchers Claim Two RCE Exploits That Bypass Telegram's New Android Defenses](https://thehackernews.com/2026/11/researchers-claim-two-rce-exploits-that.html)
- [NebuSec: Lessons from Telegram's RCE: The Proper Way to Secure a JavaScript Runtime](https://nebusec.ai/research/telegram-widget-hardening/)
- [Anti-Malware.ru: Telegram widgets could have been used to infect computers with a trojan](https://www.anti-malware.ru/news/2026-11-16-111332/52052)
- [Anti-Malware.ru: Update Telegram for Android - version 13.2.2 closed a dangerous vulnerability](https://www.anti-malware.ru/news/2026-11-13-111332/52049)
- [kod.ru: Telegram QuickJS vulnerability in widgets](https://kod.ru/telegram-quickjs-uyazvimost-vidzhety)
- [kod.ru: Telegram widgets used to deliver WebRAT trojan (Kaspersky)](https://kod.ru/telegram-widgets-trojan-webrat)
- [Kaspersky (Russia) Telegram channel post on suspected widget exploitation delivering WebRAT](https://t.me/s/kasperskylab_ru/7881)
- [Telegram Bot API: Widgets documentation](https://core.telegram.org/bots/widgets)
- [tdlib/telegram-bot-api issue #947: sendWidget fails with INPUT_MEDIA_WIDGET_NOT_ALLOWED](https://github.com/tdlib/telegram-bot-api/issues/947)
- [Telegram-Android twidget-seccomp.cpp (seccomp filter source)](https://github.com/TelegramMessenger/Telegram-Android/blob/master/TMessagesProj/jni/twidget/twidget-seccomp.cpp)
- [Telegram-Android WidgetEngineService.java (published source)](https://github.com/TelegramMessenger/Telegram-Android/blob/master/TMessagesProj/src/main/java/org/telegram/utils/twidget/WidgetEngineService.java)
- [Kaspersky Securelist: From cheats to exploits: Webrat spreading via GitHub (prior WebRAT campaign, background only)](https://securelist.com/webrat-distributed-via-github/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-6544
