{"id":"CVE-2026-49279","aliases":["CVE-2026-49279","GHSA-2fhx-q92v-5fhv"],"related":[],"kind":"vulnerability","state":"published","title":"WWBN AVideo: Stored XSS via autoEvalCodeOnHTML Bypass in MessageSQLite WebSocket Handler (CVE-2026-43874 Bypass)","summary":"WWBN AVideo is an open source video platform. Versions 29.0 and below contain a Stored XSS vulnerability through the autoEvalCodeOnHTML parameter in the MessageSQLite WebSocket Handler. The MessageSQLite.php handler only strips autoEvalCodeOnHTML from $json['msg'], but msgToResourceId() reads from $msg['json'] with higher priority. An attacker can place the XSS payload in the json key instead of msg, bypassing the sanitization entirely. An authenticated attacker can execute arbitrary JavaScript in any connected user's browser session via the WebSocket messaging system, stealing session cookies and authentication tokens, taking over accounts through session hijacking, and chaining with CSRF to perform admin actions on the victim's behalf, in the default SQLite WebSocket backend configuration. This issue has a patch that has yet to be officially released, see https://github.com/WWBN/AVideo/commit/3e0b3ce2bfa766183ff0ae227439394db57b1a23.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"WWBN AVideo is an open source video platform. Versions 29.0 and below contain a Stored XSS vulnerability through the autoEvalCodeOnHTML parameter in the MessageSQLite WebSocket Handler. The MessageSQLite.php handler only strips autoEvalCodeOnHTML from $json['msg'], but msgToResourceId() reads from $msg['json'] with higher priority. An attacker can place the XSS payload in the json key instead of msg, bypassing the sanitization entirely. An authenticated attacker can execute arbitrary JavaScript in any connected user's browser session via the WebSocket messaging system, stealing session cookies and authentication tokens, taking over accounts through session hijacking, and chaining with CSRF to perform admin actions on the victim's behalf, in the default SQLite WebSocket backend configuration. This issue has a patch that has yet to be officially released, see https://github.com/WWBN/AVideo/commit/3e0b3ce2bfa766183ff0ae227439394db57b1a23.","source":"cvelist"},{"lang":"en","text":"# AVideo: Stored XSS via `autoEvalCodeOnHTML` in MessageSQLite WebSocket Handler\n\n## Summary\n\nAVideo has a stored XSS vulnerability in the WebSocket messaging system. The `MessageSQLite.php` handler only strips `autoEvalCodeOnHTML` from `$json['msg']`, but `msgToResourceId()` reads from `$msg['json']` with higher priority. An attacker can place the XSS payload in the `json` key instead of `msg`, bypassing the sanitization entirely.\n\n\n## Affected Versions\n\nAVideo <= latest\n\n## Vulnerability Details\n\n### Root Cause: Shallow sanitization only covers `$json['msg']`\n\n`plugin/YPTSocket/MessageSQLite.php` lines 268-271 — the incomplete fix:\n\n```php\nif (empty($msgObj->isCommandLineInterface) && ($msgObj->sentFrom ?? '') !== 'php') {\n    if (is_array($json['msg'] ?? null)) {\n        unset($json['msg']['autoEvalCodeOnHTML']);  // Only strips from $json['msg']\n    }\n}\n```\n\n`plugin/YPTSocket/MessageSQLite.php` lines 361-367 — the bypass via `msgToResourceId()`:\n\n```php\nif (!empty($msg['json'])) {\n    $obj['msg'] = $msg['json'];       // $msg['json']['autoEvalCodeOnHTML'] is NEVER stripped\n} else if (!empty($msg['msg'])) {\n    $obj['msg'] = $msg['msg'];        // Only this path was sanitized\n} else {\n    $obj['msg'] = $msg;\n}\n```\n\nCompare with the correctly patched `Message.php` (lines 254-256):\n\n```php\n$json = removeAutoEvalCodeOnHTMLRecursive($json);  // Strips from ALL nested paths\n```\n\nAnd `MessageSQLiteV2.php` (lines 302-303):\n\n```php\n$json = removeAutoEvalCodeOnHTMLRecursive($json);  // Same recursive fix\n```\n\n`MessageSQLite.php` does not call `removeAutoEvalCodeOnHTMLRecursive()` at all.\n\n### Attack Chain\n\n- Attacker sends a WebSocket message with `autoEvalCodeOnHTML` in the `json` key instead of `msg`\n- The fix at line 268-271 only checks `$json['msg']` — the `json` key is untouched\n- `msgToResourceId()` reads `$msg['json']` first (line 361) because `!empty($msg['json'])` is true\n- The payload is delivered to the victim's WebSocket client and evaluated via `autoEvalCodeOnHTML`\n\n## Proof of Concept\n\n```javascript\n// Connect to AVideo WebSocket as authenticated user\nconst ws = new WebSocket('wss://TARGET/plugin/YPTSocket/server.php?token=USER_TOKEN');\n\nws.onopen = () => {\n  ws.send(JSON.stringify({\n    msg: \"Hello\",                               // sanitized path — decoy\n    json: {autoEvalCodeOnHTML: \"alert('XSS')\"},  // unsanitized path — payload\n    to_users_id: VICTIM_USER_ID,\n    resourceId: RESOURCE_ID\n  }));\n};\n// Victim's client evaluates alert('XSS') via autoEvalCodeOnHTML mechanism\n```\n\n## Impact\n\nAn authenticated attacker can:\n\n- Execute arbitrary JavaScript in any connected user's browser session via the WebSocket messaging system\n- Steal session cookies and authentication tokens\n- Perform account takeover via session hijacking\n- Chain with CSRF to execute admin actions on behalf of the victim\n\nThe vulnerability affects the default SQLite WebSocket backend configuration.\n\n## Suggested Remediation\n\nApply `removeAutoEvalCodeOnHTMLRecursive()` in `MessageSQLite.php`, consistent with `Message.php` and `MessageSQLiteV2.php`:\n\n```php\n// Before (vulnerable — shallow strip):\nif (is_array($json['msg'] ?? null)) {\n    unset($json['msg']['autoEvalCodeOnHTML']);\n}\n\n// After (fixed — recursive strip):\n$json = removeAutoEvalCodeOnHTMLRecursive($json);\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"WWBN AVideo es una plataforma de vídeo de código abierto. Las versiones 29.0 e inferiores contienen una vulnerabilidad de XSS Almacenado a través del parámetro autoEvalCodeOnHTML en el gestor WebSocket MessageSQLite. El gestor MessageSQLite.php solo elimina autoEvalCodeOnHTML de $json[’msg’], pero msgToResourceId() lee de $msg[’json’] con mayor prioridad. Un atacante puede colocar la carga útil de XSS en la clave json en lugar de msg, eludiendo la sanitización por completo. Un atacante autenticado puede ejecutar JavaScript arbitrario en la sesión del navegador de cualquier usuario conectado a través del sistema de mensajería WebSocket, robando cookies de sesión y tokens de autenticación, tomando el control de cuentas mediante el secuestro de sesión, y encadenando con CSRF para realizar acciones de administrador en nombre de la víctima, en la configuración predeterminada del backend WebSocket de SQLite. Este problema tiene un parche que aún no ha sido lanzado oficialmente, véase https://github.com/WWBN/AVideo/commit/3e0b3ce2bfa766183ff0ae227439394db57b1a23.","source":"nvd"}],"published":"2026-06-04T18:55:04.000Z","modified":"2026-10-24T21:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"<= 29.0","status":"affected"}],"vendor":"WWBN","product":"AVideo","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"29.0"}],"ecosystem":"Packagist","package":"wwbn/avideo","purl":"pkg:composer/wwbn/avideo","source":"ghsa"}],"references":[{"url":"https://github.com/WWBN/AVideo/security/advisories/GHSA-2fhx-q92v-5fhv","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/WWBN/AVideo/commit/3e0b3ce2bfa766183ff0ae227439394db57b1a23","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/WWBN/AVideo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-18T02:21:31.912Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49279","url":"https://www.cve.org/CVERecord?id=CVE-2026-49279","licence":"CVE Terms of Use","modified":"2026-07-18T02:22:09.068Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2fhx-q92v-5fhv","url":"https://github.com/advisories/GHSA-2fhx-q92v-5fhv","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:07.357Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49279","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49279","licence":"Public domain","modified":"2026-10-24T21:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:28.356Z","epss":{"score":0.00403,"percentile":0.36643,"date":"2026-12-01T12:00:22.000Z"}}