/

CVE-2026-86188

Severity:

HIGH RISK

(7.2)

Cross-Site Scripting (CWE-79) in AVideo YPTSocket Plugin

CVE-2026-86188

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Arbitrary JavaScript Execution in a User's Browser

Severity:

HIGH RISK

(7.2)

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

AVideo with the YPTSocket plugin enabled contains a cross-site scripting vulnerability in its WebSocket callback handling. An unauthenticated attacker may send crafted socket messages that cause untrusted data to be inserted into a victim's browser DOM, potentially executing JavaScript in the AVideo origin without user interaction.

Affected context

The issue may occur in AVideo deployments where the YPTSocket plugin is enabled and WebSocket callback names can resolve to globally accessible browser functions. Risk is increased when those functions process attacker-controlled values through unsafe DOM sinks such as innerHTML, allowing injected content to execute within an authenticated user's origin.

Exploit preconditions

  • Attack surface: The YPTSocket WebSocket callback mechanism
  • Required access: No authentication may be required to send the relevant socket messages
  • Trigger point: Processing a callback name and its associated untrusted data in a victim's browser
  • User interaction: The described behavior may not require a victim to click a link or approve an action
  • Why exploitation is possible: A callback can resolve to a global function that assigns attacker-controlled content to an unsafe HTML-rendering sink

Why this happens

The vulnerability results from treating attacker-influenced WebSocket callback names and data as trusted browser-side behavior. When callback resolution permits access to global functions and those functions insert untrusted values into innerHTML without context-appropriate output encoding or sanitization, browser-executable markup can be interpreted in the application's origin. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

Potential impact

  • An attacker may execute arbitrary JavaScript in another user's browser
  • Session-related information could be exposed, depending on available browser context
  • User actions could be performed within the victim's authenticated origin
  • Sensitive page content may be read or modified
  • Malicious content could be used for phishing or further account compromise

General mitigation guidance

Mitigation generally focuses on treating WebSocket messages and callback identifiers as untrusted input.

Common defensive patterns include:

  • Restricting callback handling to an explicit allowlist of non-executable operations
  • Avoiding dynamic resolution of arbitrary global functions
  • Replacing innerHTML assignments with safe text or structured DOM APIs where HTML is not required
  • Applying context-aware output encoding and narrowly scoped sanitization when trusted HTML must be rendered
  • Validating message schemas, callback names, and data types before processing
  • Applying least privilege to application sessions and limiting sensitive operations exposed to browser callbacks
  • Using a restrictive Content Security Policy as a defense-in-depth control

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving innerHTML, dynamic callback resolution, and HTML insertion of WebSocket data
  • Code review signals such as global-function lookup, indirect invocation, or missing callback allowlists
  • Tests that send unexpected callback identifiers and markup-like data through WebSocket interfaces
  • Runtime monitoring for suspicious socket messages, unusual callback names, and unexpected DOM changes
  • Policy enforcement requiring output encoding, trusted-type controls, or approved DOM APIs for browser-facing code

Automated security scanning and code review tools may help identify these patterns, but findings should be validated against the application's data flow.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-xpx7-h2x7-59qq
vulncheck.comvulncheck.com/advisories/avideo-yptsocket-plugin-unauthenticated-cross-site-scripting

Frequently asked

questions

Yes. The described attack surface is a WebSocket callback mechanism, and the attacker may not need an authenticated account. The victim generally needs to have the affected AVideo application available in their browser context.

The vulnerability description indicates that script execution may occur without user interaction, although deployment behavior and browser protections can affect practical exploitability.

Treat callback names and message data as untrusted, restrict callbacks to an explicit allowlist, and avoid inserting untrusted values through HTML-interpreting DOM sinks.

Use schema validation, safe DOM APIs, context-aware output encoding, controlled callback dispatch, security-focused WebSocket tests, and defense-in-depth browser policies such as Content Security Policy.

Find out what's already
exploitable in your codebase.