CVE-2026-50182: WWBN AVideo Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-hgjh-6wj8-gcgf
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2026-50182 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting WWBN AVideo libraries in the Packagist ecosystem. The issue involves unauthenticated reflected xss via $_get['search'] in avideo youtubeapi gallery pagination. Remediation is available in the latest vendor maintenance releases.

CVE-2026-50182 at a Glance

CVE Identifier CVE-2026-50182
GHSA Identifier GHSA-hgjh-6wj8-gcgf
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product WWBN AVideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-50182

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-50182, 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-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 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

# Unauthenticated Reflected XSS via `$_GET['search']` in AVideo YouTubeAPI Gallery Pagination ## Summary A reflected Cross-Site Scripting vulnerability (CWE-79) in the AVideo YouTubeAPI plugin allows any unauthenticated attacker to execute arbitrary JavaScript in a victim's browser session when the victim follows a crafted URL. The `$_GET['search']` query parameter is concatenated directly into the `href` attribute of two pagination links in `plugin/YouTubeAPI/gallerySection.php` (lines 67 and 74) with no `htmlspecialchars`, no `urlencode`, and no allow-list check. An injected `<script>` element is then extracted by the AVideo Layout plugin and concatenated into a single trailing inline script block at the bottom of the page, where the browser executes it. ## Details `plugin/YouTubeAPI/gallerySection.php` renders the YouTubeAPI plugin's gallery section on the AVideo homepage (and every page that includes `plugin/Gallery/view/mainArea.php`) when the API plugin is enabled with `showGallerySection=true` (the default). The pagination block at lines 67 and 74 builds the previous-page and next-page `<a>` elements by string-interpolating `$_GET['search']` directly: ```php // plugin/YouTubeAPI/gallerySection.php:67 <a href="<?php echo "{$global['webSiteRootURL']}page/".($_GET['page']-1)."?pageToken={$object->prevPageToken}&search=".(@$_GET['search']); ?>" ...> // plugin/YouTubeAPI/gallerySection.php:74 <a href="<?php echo "{$global['webSiteRootURL']}page/".($_GET['page']+1)."?pageToken={$object->nextPageToken}&search=".(@$_GET['search']); ?>" ...> ``` The `@` operator only suppresses an undefined-index warning; it does not sanitize the value. A payload like `"><script>alert(1337)</script>` closes the `href` attribute, closes the `<a>` element, and injects a fresh `<script>` tag. Two preconditions gate the sink. First, the YouTube API call must return a pagination token (always true for any non-trivial result set, since the mock or real YouTube response carries `nextPageToken` for multi-page queries). Second, `plugin/Gallery/view/mainArea.php` line 53 wraps the gallery render in `if (!empty($video)) { echo AVideoPlugin::getGallerySection(); } else { /* output captured and discarded */ }`. When `$_GET['search']` is set, `Video::getVideo()` adds a MySQL fulltext `MATCH(v.title) AGAINST (<search>) IN NATURAL LANGUAGE MODE` clause; the payload tokenizes to words like `script`, `alert`, `1337`, and the gate passes whenever any video in the corpus has a title containing one of those words. Realistic deployments overwhelmingly satisfy this; the attacker can also seed the payload with a common word (`?search=video"><script>...</script>`) to guarantee a fulltext hit. The AVideo Layout plugin (`plugin/Layout/Layout.php:611`, enabled by default) runs `Layout::organizeHTML()` over the final HTML, extracts every inline `<script[^>]*>(.*)</script>` block via regex, and concatenates their inner contents into one trailing `<script>` block placed immediately before `</body>`. The injected `<script>alert(1337)</script>` is therefore moved out of the original `href` context and into a clean executable script block; the visible pagination markup retains only the leftover `&search=">` bytes. **Affected product:** AVideo (WWBN), API + YouTubeAPI + Layout plugins **Tested version:** master branch, commit 122b184 (snapshot dated 2026-05-22) ## PoC The AVideo deployment must have the YouTubeAPI plugin enabled with the default `showGallerySection=true`. The payload also needs to satisfy the fulltext `MATCH(v.title) AGAINST` gate that `Video::getVideo()` adds when `$_GET['search']` is set: at least one video in the corpus must have a title containing one of the payload's tokens. In the live confirmation a video titled `Tutorial about script error alerts` satisfied the gate via the words `script` and `alert`. Seeding the payload with the common word `video` guarantees a hit on any realistic AVideo deployment, since `video` appears in nearly every video title. Open the following URL in any browser. No authentication, no session cookie, no prior interaction with the site is required: ``` https://avideo.example/?search=video%22%3E%3Cscript%3Ealert(1337)%3C%2Fscript%3E&page=2 ``` The browser fires an `alert(1337)` modal dialog as soon as the homepage finishes rendering. The injected `<script>` is no longer inside the `href` markup at render time; it lives inside the page's single trailing inline script block, surfaced there by the Layout plugin's HTML reorganization. ## Impact This is a Reflected XSS vulnerability (CWE-79) on the AVideo public homepage. Any unauthenticated remote attacker who induces a victim to follow a crafted URL executes arbitrary JavaScript in the victim's browser session under the AVideo origin, reading non-`HttpOnly` cookies and issuing authenticated AJAX requests as the victim. When the victim is an AVideo administrator, the injected JavaScript performs any admin action (create user, promote to admin, change configuration, install plugin) that uses cookie-based authentication without an additional CSRF token, escalating a single click on a crafted link into full administrative takeover.

CVE-2026-50182 Affected WWBN 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-50182?
CVE-2026-50182 is a security vulnerability in WWBN AVideo involving Unauthenticated Reflected XSS via $_GET['search'] in AVideo YouTubeAPI Gallery Pagination under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
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-50182?
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-50182?
CVE-2026-50182 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-50182?
CVE-2026-50182 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-50182?
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-hgjh-6wj8-gcgf",
  "modified" : "2026-06-04T18:55:58Z",
  "published" : "2026-06-04T18:55:58Z",
  "aliases" : [ "CVE-2026-50182" ],
  "summary" : "WWBN AVideo: Unauthenticated Reflected XSS via $_GET['search'] in AVideo YouTubeAPI Gallery Pagination",
  "details" : "# Unauthenticated Reflected XSS via `$_GET['search']` in AVideo YouTubeAPI Gallery Pagination\n\n## Summary\n\nA reflected Cross-Site Scripting vulnerability (CWE-79) in the AVideo YouTubeAPI plugin allows any unauthenticated attacker to execute arbitrary JavaScript in a victim's browser session when the victim follows a crafted URL. The `$_GET['search']` query parameter is concatenated directly into the `href` attribute of two pagination links in `plugin/YouTubeAPI/gallerySection.php` (lines 67 and 74) with no `htmlspecialchars`, no `urlencode`, and no allow-list check. An injected `<script>` element is then extracted by the AVideo Layout plugin and concatenated into a single trailing inline script block at the bottom of the page, where the browser executes it.\n\n## Details\n\n`plugin/YouTubeAPI/gallerySection.php` renders the YouTubeAPI plugin's gallery section on the AVideo homepage (and every page that includes `plugin/Gallery/view/mainArea.php`) when the API plugin is enabled with `showGallerySection=true` (the default). The pagination block at lines 67 and 74 builds the previous-page and next-page `<a>` elements by string-interpolating `$_GET['search']` directly:\n\n```php\n// plugin/YouTubeAPI/gallerySection.php:67\n<a href=\"<?php echo \"{$global['webSiteRootURL']}page/\".($_GET['page']-1).\"?pageToken={$object->prevPageToken}&search=\".(@$_GET['search']); ?>\" ...>\n\n// plugin/YouTubeAPI/gallerySection.php:74\n<a href=\"<?php echo \"{$global['webSiteRootURL']}page/\".($_GET['page']+1).\"?pageToken={$object->nextPageToken}&search=\".(@$_GET['search']); ?>\" ...>\n```\n\nThe `@` operator only suppresses an undefined-index warning; it does not sanitize the value. A payload like `\"><script>alert(1337)</script>` closes the `href` attribute, closes the `<a>` element, and injects a fresh `<script>` tag.\n\nTwo preconditions gate the sink. First, the YouTube API call must return a pagination token (always true for any non-trivial result set, since the mock or real YouTube response carries `nextPageToken` for multi-page queries). Second, `plugin/Gallery/view/mainArea.php` line 53 wraps the gallery render in `if (!empty($video)) { echo AVideoPlugin::getGallerySection(); } else { /* output captured and discarded */ }`. When `$_GET['search']` is set, `Video::getVideo()` adds a MySQL fulltext `MATCH(v.title) AGAINST (<search>) IN NATURAL LANGUAGE MODE` clause; the payload tokenizes to words like `script`, `alert`, `1337`, and the gate passes whenever any video in the corpus has a title containing one of those words. Realistic deployments overwhelmingly satisfy this; the attacker can also seed the payload with a common word (`?search=video\"><script>...</script>`) to guarantee a fulltext hit.\n\nThe AVideo Layout plugin (`plugin/Layout/Layout.php:611`, enabled by default) runs `Layout::organizeHTML()` over the final HTML, extracts every inline `<script[^>]*>(.*)</script>` block via regex, and concatenates their inner contents into one trailing `<script>` block placed immediately before `</body>`. The injected `<script>alert(1337)</script>` is therefore moved out of the original `href` context and into a clean executable script block; the visible pagination markup retains only the leftover `&search=\">` bytes.\n\n**Affected product:** AVideo (WWBN), API + YouTubeAPI + Layout plugins\n**Tested version:** master branch, commit 122b184 (snapshot dated 2026-05-22)\n\n## PoC\n\nThe AVideo deployment must have the YouTubeAPI plugin enabled with the default `showGallerySection=true`. The payload also needs to satisfy the fulltext `MATCH(v.title) AGAINST` gate that `Video::getVideo()` adds when `$_GET['search']` is set: at least one video in the corpus must have a title containing one of the payload's tokens. In the live confirmation a video titled `Tutorial about script error alerts` satisfied the gate via the words `script` and `alert`. Seeding the payload with the common word `video` guarantees a hit on any realistic AVideo deployment, since `video` appears in nearly every video title.\n\nOpen the following URL in any browser. No authentication, no session cookie, no prior interaction with the site is required:\n\n```\nhttps://avideo.example/?search=video%22%3E%3Cscript%3Ealert(1337)%3C%2Fscript%3E&page=2\n```\n\nThe browser fires an `alert(1337)` modal dialog as soon as the homepage finishes rendering. The injected `<script>` is no longer inside the `href` markup at render time; it lives inside the page's single trailing inline script block, surfaced there by the Layout plugin's HTML reorganization.\n\n## Impact\n\nThis is a Reflected XSS vulnerability (CWE-79) on the AVideo public homepage. Any unauthenticated remote attacker who induces a victim to follow a crafted URL executes arbitrary JavaScript in the victim's browser session under the AVideo origin, reading non-`HttpOnly` cookies and issuing authenticated AJAX requests as the victim. When the victim is an AVideo administrator, the injected JavaScript performs any admin action (create user, promote to admin, change configuration, install plugin) that uses cookie-based authentication without an additional CSRF token, escalating a single click on a crafted link into full administrative takeover.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/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-hgjh-6wj8-gcgf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/commit/f50fc033b7adb36f1ffd6640e7826468bdafdec3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-04T18:55:58Z",
    "nvd_published_at" : null
  }
}