CVE-2026-34362: Wwbn/avideo AVideo's WebSocket Token Never Expires Vulnerability

MODERATE
Advisory Identifier: GHSA-2mg4-pfgx-64cf
CVSS 5.4
CWE-613
Published
Advisory Summary

CVE-2026-34362 is a MODERATE (CVSS 5.4) avideo's websocket token never expires vulnerability (CWE-613: Insufficient Session Expiration) affecting Wwbn/avideo libraries in the Packagist ecosystem. The issue involves avideo's websocket token never expires due to commented-out timeout validation in verifytokensocket(). Remediation is available in the latest vendor maintenance releases.

CVE-2026-34362 at a Glance

CVE Identifier CVE-2026-34362
GHSA Identifier GHSA-2mg4-pfgx-64cf
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Wwbn/avideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.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:U/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 Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-34362

To remediate this vulnerability, upgrade all affected Wwbn/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-34362, inspect your project dependencies for Wwbn/avideo:

inspect dependencies for wwbn/avideo

Analyze the terminal output to locate any version of Wwbn/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-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Wwbn/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 `verifyTokenSocket()` function in `plugin/YPTSocket/functions.php` has its token timeout validation commented out, causing WebSocket tokens to never expire despite being generated with a 12-hour timeout. This allows captured or legitimately obtained tokens to provide permanent WebSocket access, even after user accounts are deleted, banned, or demoted from admin. Admin tokens grant access to real-time connection data for all online users including IP addresses, browser info, and page locations. ## Details WebSocket tokens are generated via `getEncryptedInfo()` which calls `getToken(43200)` to create a token with a 12-hour expiration window. The token is encrypted and contains security-critical claims: `isAdmin`, `from_users_id`, `user_name`, IP, browser, and device ID. The regular HTTP token verification at `objects/functions.php:3437-3439` enforces the timeout: ```php // objects/functions.php:3437-3439 if (!($time >= $obj->time && $time <= $obj->timeout)) { _error_log("verifyToken token timout..."); return false; // <-- enforced } ``` But the WebSocket-specific verification at `plugin/YPTSocket/functions.php:65-82` has the enforcement commented out: ```php // plugin/YPTSocket/functions.php:77-80 if (!($time >= $obj->time && $time <= $obj->timeout)) { //_error_log("verifyToken token timout..."); //return false; // <-- NOT enforced, always falls through to return true } return true; ``` **Execution flow:** 1. Client connects to WebSocket with `?webSocketToken=TOKEN` in URL query 2. `onOpen()` (Message.php:34) calls `getDecryptedInfo($wsocketGetVars['webSocketToken'])` (line 48) 3. `getDecryptedInfo()` (functions.php:49) decrypts the token and calls `verifyTokenSocket($json->token)` (line 54) 4. `verifyTokenSocket()` validates the salt (passes) but the timeout check at line 77 evaluates the condition without acting on failure — `return false` is commented out 5. Function returns `true` — connection established with all token claims (`isAdmin`, `from_users_id`) trusted **Impact amplification via isAdmin:** When a connection has `isAdmin=true` (from token, Message.php:58), the `getTotals()` function (Message.php:419-432) includes detailed data about every connected client in periodic broadcast messages: ```php // Message.php:419-432 if ($isAdmin) { $index = md5($client['selfURI']); // Exposes: selfURI, yptDeviceId, users_id, user_name, browser, ip, location $return['users_uri'][$index][$client['yptDeviceId']][$client['users_id']] = $client; } ``` Additionally, the `webSocketToken` message type (Message.php:212-217) allows anonymous connections (`users_id=0`) to upgrade their identity by providing a captured token, meaning stolen tokens work from new connections indefinitely. The 10-minute inactivity timeout (Message.php:135-143) is not a mitigation — it only closes idle connections and resets on every message (line 243). ## PoC ```bash # Step 1: Obtain a WebSocket token as any authenticated user curl -s -b 'PHPSESSID=VALID_SESSION' \ 'https://target.com/plugin/YPTSocket/getWebSocket.json.php' | jq -r '.webSocketToken' # Save as TOKEN=<output> # Step 2: Wait for the token to expire (>12 hours) # In a real scenario, the attacker already has a previously captured token # Step 3: Connect with the expired token — succeeds because verifyTokenSocket() skips timeout wscat -c 'ws://target.com:8888/?webSocketToken=TOKEN' # Step 4: Verify the connection is established and receiving broadcasts # The server will send periodic getTotals data # Step 5: If the token was from an admin, the getTotals response includes # all connected clients' selfURI, IP, browser, device ID, user_name, and location # Step 6: Any user can also enumerate connected users without admin: # Send: {"msg":"getClientsList","webSocketToken":"TOKEN"} # Response includes all users_id, isAdmin status, and usernames ``` **Scenario: Demoted admin retains permanent admin WebSocket access** 1. Admin user obtains WebSocket token (contains `isAdmin: true`) 2. Admin is demoted to regular user via the web interface 3. Admin's WebSocket token still works indefinitely — the `isAdmin` claim in the token is never re-validated 4. Demoted user continues receiving all connected users' IPs, locations, and browsing activity ## Impact - **Permanent access after credential revocation:** Deleted, banned, or suspended users retain WebSocket access with their original identity and privilege level, undermining account lifecycle management. - **Privilege persistence after demotion:** Admin users who are demoted retain admin-level WebSocket access indefinitely. The `isAdmin` flag baked into the token is never re-checked against the database. - **Real-time surveillance via admin tokens:** Admin-level tokens expose all connected users' IP addresses, geographic locations (if User_location plugin enabled), current page URLs (selfURI), browser fingerprints, and device IDs — enabling real-time tracking of user activity. - **Extended attack window for token theft:** Any vulnerability that leaks a WebSocket token (XSS, log exposure, network interception) provides permanent rather than 12-hour access, significantly increasing the impact of token compromise. - **Identity hijacking:** The `webSocketToken` message type allows using a stolen token to assume another user's identity on new connections, enabling impersonation in chat and messaging. ## Recommended Fix Uncomment the timeout enforcement in `verifyTokenSocket()` at `plugin/YPTSocket/functions.php:77-80`: ```php function verifyTokenSocket($token) { global $global; $obj = _json_decode(decryptString($token)); if (empty($obj)) { _error_log("verifyToken invalid token"); return false; } if ($obj->salt !== $global['salt']) { _error_log("verifyToken salt fail"); return false; } $time = time(); if (!($time >= $obj->time && $time <= $obj->timeout)) { _error_log("verifyToken token timeout time = $time; obj->time = $obj->time; obj->timeout = $obj->timeout"); return false; // <-- uncomment this line } return true; } ``` Additionally, consider: 1. Adding an admin check to the `getClientsList` handler (Message.php:219) so only admins can enumerate connected users. 2. Re-validating the `isAdmin` claim against the database periodically rather than trusting the token claim for the lifetime of the connection.

CVE-2026-34362 Affected Wwbn/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-34362?
CVE-2026-34362 is a security vulnerability in Wwbn/avideo involving AVideo's WebSocket Token Never Expires Due to Commented-Out Timeout Validation in verifyTokenSocket() under CWE-613: Insufficient Session Expiration.
Which Wwbn/avideo versions are affected?
Affected versions include releases prior to current release patches across affected packages: wwbn/avideo.
What version fixes CVE-2026-34362?
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-34362?
CVE-2026-34362 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-34362?
CVE-2026-34362 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Packagist dependencies for CVE-2026-34362?
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-2mg4-pfgx-64cf",
  "modified" : "2026-03-30T17:35:21Z",
  "published" : "2026-03-30T17:35:21Z",
  "aliases" : [ "CVE-2026-34362" ],
  "summary" : "AVideo's WebSocket Token Never Expires Due to Commented-Out Timeout Validation in verifyTokenSocket()",
  "details" : "## Summary\n\nThe `verifyTokenSocket()` function in `plugin/YPTSocket/functions.php` has its token timeout validation commented out, causing WebSocket tokens to never expire despite being generated with a 12-hour timeout. This allows captured or legitimately obtained tokens to provide permanent WebSocket access, even after user accounts are deleted, banned, or demoted from admin. Admin tokens grant access to real-time connection data for all online users including IP addresses, browser info, and page locations.\n\n## Details\n\nWebSocket tokens are generated via `getEncryptedInfo()` which calls `getToken(43200)` to create a token with a 12-hour expiration window. The token is encrypted and contains security-critical claims: `isAdmin`, `from_users_id`, `user_name`, IP, browser, and device ID.\n\nThe regular HTTP token verification at `objects/functions.php:3437-3439` enforces the timeout:\n\n```php\n// objects/functions.php:3437-3439\nif (!($time >= $obj->time && $time <= $obj->timeout)) {\n    _error_log(\"verifyToken token timout...\");\n    return false;  // <-- enforced\n}\n```\n\nBut the WebSocket-specific verification at `plugin/YPTSocket/functions.php:65-82` has the enforcement commented out:\n\n```php\n// plugin/YPTSocket/functions.php:77-80\nif (!($time >= $obj->time && $time <= $obj->timeout)) {\n    //_error_log(\"verifyToken token timout...\");\n    //return false;  // <-- NOT enforced, always falls through to return true\n}\nreturn true;\n```\n\n**Execution flow:**\n\n1. Client connects to WebSocket with `?webSocketToken=TOKEN` in URL query\n2. `onOpen()` (Message.php:34) calls `getDecryptedInfo($wsocketGetVars['webSocketToken'])` (line 48)\n3. `getDecryptedInfo()` (functions.php:49) decrypts the token and calls `verifyTokenSocket($json->token)` (line 54)\n4. `verifyTokenSocket()` validates the salt (passes) but the timeout check at line 77 evaluates the condition without acting on failure — `return false` is commented out\n5. Function returns `true` — connection established with all token claims (`isAdmin`, `from_users_id`) trusted\n\n**Impact amplification via isAdmin:**\n\nWhen a connection has `isAdmin=true` (from token, Message.php:58), the `getTotals()` function (Message.php:419-432) includes detailed data about every connected client in periodic broadcast messages:\n\n```php\n// Message.php:419-432\nif ($isAdmin) {\n    $index = md5($client['selfURI']);\n    // Exposes: selfURI, yptDeviceId, users_id, user_name, browser, ip, location\n    $return['users_uri'][$index][$client['yptDeviceId']][$client['users_id']] = $client;\n}\n```\n\nAdditionally, the `webSocketToken` message type (Message.php:212-217) allows anonymous connections (`users_id=0`) to upgrade their identity by providing a captured token, meaning stolen tokens work from new connections indefinitely.\n\nThe 10-minute inactivity timeout (Message.php:135-143) is not a mitigation — it only closes idle connections and resets on every message (line 243).\n\n## PoC\n\n```bash\n# Step 1: Obtain a WebSocket token as any authenticated user\ncurl -s -b 'PHPSESSID=VALID_SESSION' \\\n  'https://target.com/plugin/YPTSocket/getWebSocket.json.php' | jq -r '.webSocketToken'\n# Save as TOKEN=<output>\n\n# Step 2: Wait for the token to expire (>12 hours)\n# In a real scenario, the attacker already has a previously captured token\n\n# Step 3: Connect with the expired token — succeeds because verifyTokenSocket() skips timeout\nwscat -c 'ws://target.com:8888/?webSocketToken=TOKEN'\n\n# Step 4: Verify the connection is established and receiving broadcasts\n# The server will send periodic getTotals data\n\n# Step 5: If the token was from an admin, the getTotals response includes\n# all connected clients' selfURI, IP, browser, device ID, user_name, and location\n\n# Step 6: Any user can also enumerate connected users without admin:\n# Send: {\"msg\":\"getClientsList\",\"webSocketToken\":\"TOKEN\"}\n# Response includes all users_id, isAdmin status, and usernames\n```\n\n**Scenario: Demoted admin retains permanent admin WebSocket access**\n1. Admin user obtains WebSocket token (contains `isAdmin: true`)\n2. Admin is demoted to regular user via the web interface\n3. Admin's WebSocket token still works indefinitely — the `isAdmin` claim in the token is never re-validated\n4. Demoted user continues receiving all connected users' IPs, locations, and browsing activity\n\n## Impact\n\n- **Permanent access after credential revocation:** Deleted, banned, or suspended users retain WebSocket access with their original identity and privilege level, undermining account lifecycle management.\n- **Privilege persistence after demotion:** Admin users who are demoted retain admin-level WebSocket access indefinitely. The `isAdmin` flag baked into the token is never re-checked against the database.\n- **Real-time surveillance via admin tokens:** Admin-level tokens expose all connected users' IP addresses, geographic locations (if User_location plugin enabled), current page URLs (selfURI), browser fingerprints, and device IDs — enabling real-time tracking of user activity.\n- **Extended attack window for token theft:** Any vulnerability that leaks a WebSocket token (XSS, log exposure, network interception) provides permanent rather than 12-hour access, significantly increasing the impact of token compromise.\n- **Identity hijacking:** The `webSocketToken` message type allows using a stolen token to assume another user's identity on new connections, enabling impersonation in chat and messaging.\n\n## Recommended Fix\n\nUncomment the timeout enforcement in `verifyTokenSocket()` at `plugin/YPTSocket/functions.php:77-80`:\n\n```php\nfunction verifyTokenSocket($token) {\n    global $global;\n    $obj = _json_decode(decryptString($token));\n    if (empty($obj)) {\n        _error_log(\"verifyToken invalid token\");\n        return false;\n    }\n    if ($obj->salt !== $global['salt']) {\n        _error_log(\"verifyToken salt fail\");\n        return false;\n    }\n    $time = time();\n    if (!($time >= $obj->time && $time <= $obj->timeout)) {\n        _error_log(\"verifyToken token timeout time = $time; obj->time = $obj->time; obj->timeout = $obj->timeout\");\n        return false;  // <-- uncomment this line\n    }\n    return true;\n}\n```\n\nAdditionally, consider:\n1. Adding an admin check to the `getClientsList` handler (Message.php:219) so only admins can enumerate connected users.\n2. Re-validating the `isAdmin` claim against the database periodically rather than trusting the token claim for the lifetime of the connection.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/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-2mg4-pfgx-64cf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34362"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/commit/5d5237121bf82c24e9e0fdd5bc1699f1157783c5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-30T17:35:21Z",
    "nvd_published_at" : "2026-03-27T17:16:30Z"
  }
}