Summary
WWBN AVideo's YPTWallet Stripe payment confirmation page reflects unfiltered user-controlled input from the plugin request parameter directly into a JavaScript context, enabling arbitrary script injection.
If a victim visits a crafted URL, an attacker's JavaScript can run in the context of the AVideo application, immediately exposing the current user's username and password hash from the same script block.
Affected context
The vulnerability occurs in the WWBN AVideo YPTWallet Stripe payment confirmation page in versions up to and including 26.0.
The page embeds the $_REQUEST['plugin'] parameter directly into a JavaScript block without any encoding, and the parameter is not covered by the framework's input filtering rules in security.php.
The same script block also outputs User::getUserName() and User::getUserPass(), so any successful XSS on this page can access those values in the page context.
Exploit preconditions
- Attack surface: Web-facing YPTWallet Stripe payment confirmation endpoint in WWBN AVideo.
- Required access: Ability to get a logged-in user (or any target user) to visit a crafted URL containing a malicious
pluginparameter value (e.g., via phishing, links, or embedded iframes). - Trigger point: The payment confirmation page renders and inserts the raw
pluginrequest parameter into an inline<script>block without encoding or sanitization. - Why exploitation is possible: The parameter is not part of the framework's input filter list defined in
security.php, so it passes through unmodified and is interpreted as JavaScript, while sensitive values (username and password hash) are available in the same script context for exfiltration.
Why this happens
This issue stems from directly concatenating untrusted request data into a JavaScript context without escaping or validation.
The plugin parameter is read from $_REQUEST and injected into an inline <script> block, bypassing the framework's central input filtering because it is not included in the relevant filter lists.
This pattern matches CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), where untrusted data is rendered as active content in the browser.
The design also unnecessarily exposes User::getUserName() and User::getUserPass() into client-side JavaScript, increasing the impact of any XSS by providing immediate access to credential material.
Potential impact
- Execution of arbitrary JavaScript in the victim's browser within the AVideo application origin.
- Theft of the current user's username and password hash directly from the page's JavaScript block.
- Session hijacking, including use of cookies, local storage, or other browser-stored tokens accessible to JavaScript.
- Unauthorized actions performed on behalf of the victim (e.g., wallet actions, profile changes, or administrative operations, depending on permissions).
- Pivoting into broader account compromise if password hashes can be cracked or reused across services.
General mitigation guidance
Effective mitigation for this class of issue focuses on context-aware output encoding, input validation, and minimizing exposure of secrets to the client:
- Apply strict, context-appropriate escaping for any variable inserted into JavaScript blocks (e.g., JSON encoding or JS string escaping), HTML, or attributes, so untrusted input cannot break out of its intended context.
- Ensure all externally influenced parameters (including
$_REQUESTvalues likeplugin) are covered by centralized input validation or filtering mechanisms and constrained to expected formats (e.g., whitelisting known plugin identifiers). - Avoid exposing sensitive information such as usernames and password hashes to client-side JavaScript unless absolutely necessary; keep credential material on the server-side.
- Use a secure-by-default templating approach that automatically encodes output and requires explicit opt-outs for raw HTML/JS injections.
- Consider applying a Content Security Policy (CSP) that reduces the impact of XSS by limiting script execution sources and disallowing inline scripts where feasible.
How teams detect issues like this
Organizations can detect similar vulnerabilities through a combination of static and dynamic techniques:
- Static analysis: Configure rules to flag direct use of
$_GET,$_POST, or$_REQUESTvariables embedded into HTML or<script>blocks without passing through an escaping or validation function. - Code review: During manual review, look for inline JavaScript that concatenates PHP variables, especially those derived from request parameters not processed by centralized security utilities (like
security.phpfilters). - Template and framework audits: Review views/templates for any places where raw output is allowed, and verify encoding functions are context-aware (JS, HTML, attributes).
- Dynamic testing: Use web security scanners or manual penetration testing to probe query parameters (including less-obvious ones such as
plugin) with XSS payloads to detect unescaped reflection. - Policy enforcement in CI/CD: Integrate automated code scanning tools in build pipelines to enforce policies such as "no unescaped request data in scripts" and "no password hashes rendered to the client."

