CVE-2026-40907
PHP vulnerability analysis and mitigation

Overview

CVE-2026-40907 is an Insecure Direct Object Reference (IDOR) vulnerability in WWBN AVideo, an open source video platform, affecting versions 29.0 and prior. The flaw resides in the endpoint plugin/Live/view/Live_restreams/list.json.php and allows any authenticated user with streaming permission to retrieve other users' live restream configurations, including RTMP stream keys and OAuth tokens for YouTube Live, Facebook Live, and Twitch. It was published on April 21, 2026, and carries a CVSS v3.1 base score of 6.5 (Medium) (GitHub Advisory).

Technical details

The vulnerability is classified as CWE-639 (Authorization Bypass Through User-Controlled Key). The authorization logic in list.json.php only enforces user-scoping when the users_id GET parameter is absent — if a non-admin user explicitly supplies ?users_id=<victim_id>, the override that forces the parameter to the authenticated user's own ID is never reached, and the attacker-controlled value passes directly to Live_restreams::getAllFromUser(). This function executes an unsanitized SQL query (SELECT * FROM live_restreams WHERE users_id = $users_id), returning all columns including stream_key, stream_url, and a parameters JSON blob containing access_token, refresh_token, and expires_at. Other endpoints in the same directory (e.g., delete.json.php) correctly implement an ownership check, making this an isolated logic flaw (GitHub Advisory).

Impact

Successful exploitation allows an authenticated attacker to harvest third-party platform stream keys and OAuth tokens (access and refresh tokens) for all users who have configured live restreaming. Stolen RTMP stream keys enable unauthorized broadcasting of arbitrary content to victims' YouTube, Facebook, or Twitch channels. Stolen refresh tokens can be used to obtain new access tokens, providing persistent access to victims' third-party accounts. Because user IDs are sequential integers, an attacker can trivially enumerate all platform users' credentials in a single automated sweep (GitHub Advisory).

Exploitability

A proof-of-concept exploit is publicly documented in the GitHub Security Advisory, consisting of a simple curl command with a manipulated users_id parameter. Exploitation requires only a valid authenticated session with streaming permission — no admin privileges or special conditions are needed. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is approximately 0.028% (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify an AVideo instance running version 29.0 or earlier. Confirm the Live plugin is enabled and that the target endpoint plugin/Live/view/Live_restreams/list.json.php is accessible.
  2. Obtain a valid session: Register or log in as any user account that has been granted streaming permission. Capture the PHPSESSID session cookie.
  3. Enumerate user IDs: Since user IDs are sequential integers, iterate through values (e.g., users_id=1, users_id=2, etc.) to identify accounts with configured restreams.
  4. Send the IDOR request: Issue a crafted HTTP GET request supplying a victim's user ID:
    curl -s -b 'PHPSESSID=<attacker_session>' \
      'https://target.com/plugin/Live/view/Live_restreams/list.json.php?users_id=1'
  5. Harvest credentials: Parse the JSON response to extract stream_key, stream_url, and the parameters field containing access_token and refresh_token for third-party platforms.
  6. Abuse stolen credentials: Use the RTMP stream key to broadcast unauthorized content to the victim's channel, or use the refresh token to obtain new OAuth access tokens for persistent account access (GitHub Advisory).

Indicators of compromise

  • Network: Repeated HTTP GET requests to /plugin/Live/view/Live_restreams/list.json.php with varying users_id parameter values from a single source IP, particularly sequential integer enumeration (e.g., ?users_id=1, ?users_id=2, ...).
  • Logs: Web server access logs showing a single authenticated session querying the list.json.php endpoint for multiple different users_id values in rapid succession; 200 OK responses returning JSON payloads with stream_key and parameters fields.
  • Application Behavior: Unexpected live streams appearing on victims' YouTube, Facebook, or Twitch channels not initiated by the account owner; OAuth token refresh activity from unfamiliar IP addresses on third-party platforms (GitHub Advisory).

Mitigation and workarounds

The fix is available in commit d5992fff2811df4adad1d9fc7d0a5837b882aed7, which unconditionally forces non-admin users to their own user ID regardless of whether the users_id parameter is supplied, removing the flawed empty() check. Administrators should apply this patch immediately or upgrade to any AVideo release that includes it. As an interim workaround, restrict access to the plugin/Live/view/Live_restreams/list.json.php endpoint at the web server level (e.g., via .htaccess or reverse proxy rules) until the patch can be applied. Users who may have been affected should revoke and rotate their third-party platform stream keys and OAuth tokens (GitHub Advisory, Patch Commit).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59989CRITICAL9.2
  • PHP logoPHP
  • phalcon/cphalcon
NoYesAug 21, 2026
CVE-2026-63135HIGH8.2
  • PHP logoPHP
  • yourls/yourls
NoYesAug 21, 2026
GHSA-p2ch-c2c3-4xm5MEDIUM6.1
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026
GHSA-8hgv-xc77-jmcrMEDIUM5.1
  • PHP logoPHP
  • getgrav/grav
NoYesAug 21, 2026
GHSA-hq84-x37p-j6q5MEDIUM4.5
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management