Jun 4, 2026·7 min read·26 visits
Unauthenticated attackers can supply malicious parameters during WebSocket handshakes to trigger stored DOM-based XSS, leading to session hijacking and remote execution of administrative actions in WWBN AVideo.
An unauthenticated stored DOM-based Cross-Site Scripting (DOM XSS) vulnerability in the YPTSocket plugin of WWBN AVideo (formerly YouPHPTube) allows remote attackers to execute arbitrary JavaScript within the session context of administrative users. Unsanitized metadata parameters supplied during the WebSocket handshake are persisted in an SQLite database and broadcast to connected users. The frontend application processes these parameters through an unsafe jQuery append sink, leading to silent, high-impact administrative context compromise.
The WWBN AVideo video-sharing platform supports real-time features through its YPTSocket plugin. This plugin utilizes ReactPHP and the Ratchet WebSocket library to establish communication tunnels between browsers and the backend server. These real-time sockets coordinate live-stream viewers, synchronized video playback, and server-to-client notifications. The socket architecture maintains connection lists and tracks metadata for every online user.
To manage connected clients, the YPTSocket service processes incoming connection parameters and registers each connection session. Unauthenticated users can request connection tokens and join the WebSocket daemon. Because the connection registration endpoint does not validate metadata values passed during the handshake, an unauthenticated client can supply arbitrary strings as their location, active page, or page title parameters.
This lack of validation exposes an attack surface where input values are trusted implicitly and written to the application's transient state storage. Because the application broadcasts this metadata to administrative dashboards without sanitization, it establishes a stored DOM-based Cross-Site Scripting (XSS) pathway. This allows unauthenticated external actors to target privileged application users who are viewing dynamic administration control panels.
The core flaw exists within the ingestion logic of the WebSocket server and the corresponding handling routine in the client-side JavaScript engine. When a WebSocket connection handshake occurs, the YPTSocket server parses parameters directly from the connection query string. Specifically, inside plugin/YPTSocket/MessageSQLiteV2.php, the method onOpen extracts the raw HTTP query string via the connection URI and deserializes the parameters into variables.
The server fails to sanitize the input values from webSocketSelfURI and page_title before adding them to the connection state dictionary. The parameter page_title is processed through the standard PHP function utf8_encode(), which standardizes encoding characters to UTF-8 but performs zero neutralization or character validation. Similarly, the webSocketSelfURI value is loaded directly into the client dictionary without filtering or scheme checking. This state dictionary is immediately written to an in-memory SQLite database, which is used to cache user connection records.
The database persistence step renders this vulnerability a stored DOM-based flaw. The ReactPHP event loop periodically reads these entries from SQLite and broadcasts them to all other connected clients. On the frontend, plugin/YPTSocket/script.js processes this broadcast payload dynamically. The client application takes the unescaped strings and dynamically constructs an HTML anchor element inside template literals, inserting them directly into the active browser DOM. Because the frontend relies on the unsafe jQuery .append() function, the browser parses the unescaped payload as active HTML and executes any script contexts embedded within it.
Prior to the patch, the connection metadata processing in plugin/YPTSocket/MessageSQLiteV2.php did not sanitize input parameters before database insertion. The vulnerable assignment logic for the client connection metadata is structured as follows:
// Vulnerable server-side registration logic
if (!empty($wsocketGetVars['webSocketSelfURI'])) {
$client['selfURI'] = $wsocketGetVars['webSocketSelfURI'];
} else {
$client['selfURI'] = $json->selfURI;
}
$client['isCommandLine'] = @$wsocketGetVars['isCommandLine'];
$client['page_title'] = @utf8_encode(@$wsocketGetVars['page_title']);The corresponding client-side display logic in plugin/YPTSocket/script.js processes these parameters in the user interface card builder. The values are concatenated into a string template literal and outputted into the DOM using an unsafe sink:
// Vulnerable client-side DOM manipulation sink
if (userData.page_title) {
textParts.push(userData.page_title);
}
const finalText = textParts.join(' ');
const html = `
<a href="${selfURI}" target="_blank"
class="${className} btn btn-primary btn-sm btn-block mb-1"
data-resource-id="${resourceId}"
data-toggle="tooltip"
title="${tooltip}"
>
<i class="far fa-compass"></i> ${finalText}
</a>`;
$(`#${socketUserDivID} .socketUserPages`).append(html);The use of jQuery's .append() with finalText and selfURI enables immediate injection. If page_title contains HTML markup (e.g., an image tag with an onerror script handler), jQuery parses it as an executable DOM tree element. If selfURI contains quote marks, an attacker can break out of the href attribute context to inject event handlers (e.g., onload, onmouseover) or execute the target script immediately using the javascript: pseudo-protocol scheme.
An attacker can exploit this vulnerability without any prior authentication on the AVideo application. The first prerequisite is obtaining a valid WebSocket token, which the application issues to any visitor, including guest sessions. This token is acquired by querying the public endpoint /plugin/YPTSocket/getWebSocket.json.php.
Once the token is retrieved, the attacker initiates a standard WebSocket connection to the application socket server, appending the injection payload within the connection parameters of the WebSocket handshake query string. The attacker can deliver two distinct vectors within a single connection: an HTML element breakout via the page_title parameter, or a URI-based protocol payload via the webSocketSelfURI parameter.
Once the handshake is completed, the YPTSocket server stores the active connection state containing the unescaped payloads. The server then transmits a NEW_CONNECTION message to all online clients. When any administrative user opens or interacts with an administrative panel that displays active client cards, the client-side JavaScript engine receives the serialized payload and runs .append(). This forces the administrative user's browser to execute the injection code silently, allowing actions like credential harvesting, session hijacking, or automated server modifications.
This vulnerability carries a CVSS score of 8.8 (High Severity), as it allows unauthenticated execution of remote scripting commands inside targeted administrative sessions. The impact of successful exploitation is complete compromise of the affected user's session context. If the targeted user has administrative permissions, the attacker can hijack active browser sessions, steal administrative session tokens, and bypass Multi-Factor Authentication (MFA) via dynamic browser proxying.
Because AVideo is configured to allow administrators to configure system settings, install plugins, and execute command-line shell updates, session hijacking at this tier translates directly to Remote Code Execution (RCE) on the underlying server host. This can be achieved by utilizing the hijacked administrative session to upload a malicious PHP web shell or modify core system execution settings.
Furthermore, this vulnerability acts as a highly reliable attack path because of the stored nature of the payload. The attacker does not need to phish the administrator or trick them into clicking a specific link. The attacker merely connects to the public-facing socket, and the platform delivers the payload to the administrator's dashboard. This completely circumvents traditional client-side mail filters and network-level firewalls that inspect incoming HTTP request bodies.
To remediate this vulnerability, developers must restrict parameters during server-side database insertion and ensure the client-side presentation layer does not evaluate strings as code. The patch applied to plugin/YPTSocket/MessageSQLiteV2.php implements verification logic to validate the structure of the input variables.
The server-side fix filters incoming URI values and encodes text sequences securely. It processes page_title parameters with htmlspecialchars configured with the ENT_QUOTES | ENT_HTML5 flags to sanitize tag delimiters. Additionally, the updated registration handler validates the structure of webSocketSelfURI to ensure it represents a valid URL using FILTER_VALIDATE_URL and matches an allowed HTTPS scheme.
// Patched server-side registration logic
if (!empty($wsocketGetVars['webSocketSelfURI'])) {
$rawURI = $wsocketGetVars['webSocketSelfURI'];
if (filter_var($rawURI, FILTER_VALIDATE_URL) && preg_match('/^https?:\/\//i', $rawURI)) {
$client['selfURI'] = $rawURI;
} else {
$client['selfURI'] = $json->selfURI;
}
} else {
$client['selfURI'] = $json->selfURI;
}
$client['page_title'] = htmlspecialchars((string)@$wsocketGetVars['page_title'], ENT_QUOTES | ENT_HTML5, 'UTF-8');While this server-side sanitization prevents the storage of raw HTML payloads, long-term security relies on updating the frontend script. Developers should refactor client-side code to replace jQuery's unsafe .append() sink with safe, native DOM APIs such as element.textContent or jQuery's safer .text() method to prevent raw strings from being executed as active HTML markup.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
AVideo WWBN | <= 11.6 | Commit 8be71e53ccbe9b84b30870db386fb4d2b11e1c16 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network |
| CVSS v3.1 Score | 8.8 |
| Exploit Status | Proof of Concept |
| Impact | Administrative Session Hijacking / Stored XSS |
| CISA KEV Status | Not Listed |
The software does not neutralize or incorrectly neutralizes user-controlled input before it is placed in output that is used to active web pages.
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.
CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.
An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.
CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.
CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.
A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.