/

CVE-2026-73031

Severity:

HIGH RISK

(8.7)

Stored XSS (CWE-79) in telegram-search MessageList

CVE-2026-73031

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting and Client-Side Code Execution

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored cross-site scripting vulnerability in telegram-search allows attacker-controlled message content to be rendered as executable HTML and JavaScript in other users' browsers. The issue becomes risky when crafted messages are posted to a shared Telegram group and victims browse or search the affected messages.

Affected context

The vulnerability occurs in the MessageList.vue component when the highlightKeyword function renders message content through v-html. Deployments are exposed when messages from shared Telegram groups can contain attacker-controlled markup and the application displays that content without contextual escaping or trusted sanitization.

Exploit preconditions

  • Attack surface: Message rendering in the telegram-search web interface
  • Required access: Ability to send or cause a crafted message to appear in a shared Telegram group
  • Trigger point: A victim browses or searches messages containing the stored content
  • Why exploitation is possible: Raw message content is passed to v-html without sufficient HTML escaping or sanitization, allowing browser-interpreted markup to persist and execute in victim sessions

Why this happens

The underlying bug is the rendering of untrusted message data as HTML without applying context-appropriate output encoding or sanitization. The highlightKeyword function passes raw content to Vue's v-html directive, which intentionally interprets the value as HTML rather than displaying it as text. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, because attacker-controlled data can become executable browser content.

Potential impact

  • Arbitrary JavaScript may execute in affected users' browsers
  • User actions or session-related information could be exposed, subject to browser and application controls
  • Application data may be modified or accessed through the victim's available privileges
  • Malicious content could persist in shared search and message views
  • Other users may be targeted without interacting with the original sender

General mitigation guidance

Mitigation generally focuses on treating message content as untrusted data throughout the rendering pipeline.

Common defensive patterns include:

  • Prefer text interpolation and DOM-safe rendering instead of raw HTML insertion
  • Apply context-aware output encoding before displaying message content
  • If limited formatting is required, use a narrowly allowlisted sanitizer configured for the intended HTML context
  • Keep highlighting behavior separate from trusted markup and generate highlights through safe DOM or framework APIs
  • Apply restrictive Content Security Policy controls as defense in depth
  • Limit exposed client-side privileges and protect sensitive actions with appropriate authorization and revalidation

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules and code searches for v-html, innerHTML, DOM insertion APIs, and equivalent raw-rendering mechanisms
  • Code review checks for user-controlled data flowing into HTML-rendering sinks
  • Tests using markup-like input to verify that displayed messages remain inert
  • Policy enforcement requiring approved sanitization libraries and configurations for any intentional HTML rendering
  • Browser security monitoring for unexpected script execution, navigation, or sensitive client-side requests

Automated code review and dependency analysis tools may help flag risky rendering patterns, but should be supplemented with data-flow review and runtime testing.

Sources

SourceLink
github.comgithub.com/GramSearch/telegram-search
github.comgithub.com/GramSearch/telegram-search/issues/653
github.comgithub.com/GramSearch/telegram-search/pull/654
github.comgithub.com/groupultra/telegram-search/commit/54f6adced844ce9990228d75e31348bfed934e05
vulncheck.comvulncheck.com/advisories/telegram-search-stored-xss-via-v-html-in-messagelist-vue

Frequently asked

questions

Yes. An attacker may be able to post crafted content to a shared Telegram group, after which the content can execute when other users view or search the affected messages.

Not necessarily. The described stored, cross-user behavior may trigger when a victim browses or searches a view containing the malicious message, depending on application flow and browser protections.

Render message content as text by default. If formatting is required, use strict contextual encoding or a narrowly configured sanitizer before any intentional HTML rendering.

Treat messages and other user-generated content as untrusted, prohibit uncontrolled raw HTML sinks, enforce review policies for client-side rendering, and test stored content across every display and search path.

Find out what's already
exploitable in your codebase.