Skip to main content

PHP CVE-2026-50183

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-04 https://github.com/WWBN/AVideo GHSA-66q5-cj5g-wrfx
4.7
CVSS 3.1 · Vendor: https://github.com/WWBN/AVideo
Share

Severity by source

Vendor (https://github.com/WWBN/AVideo) PRIMARY
4.7 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Primary rating from Vendor (https://github.com/WWBN/AVideo) · only source for this CVE.

CVSS VectorVendor: https://github.com/WWBN/AVideo

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 04, 2026 - 19:25 vuln.today
Analysis Generated
Jun 04, 2026 - 19:25 vuln.today

DescriptionCVE.org

Stored XSS via Hostile YouTube Video Title in AVideo YouTubeAPI Gallery Section

Summary

A stored Cross-Site Scripting vulnerability (CWE-79; chained CWE-829, Inclusion of Functionality from Untrusted Control Sphere) in the AVideo YouTubeAPI plugin renders the snippet.title field returned by the YouTube Data API into the homepage gallery markup with no HTML encoding. The title is set by the YouTube video uploader (anyone in the world) and is treated by AVideo as trusted content. A YouTube uploader who controls a video matching the operator's configured query injects HTML into the AVideo homepage by setting their video's title to a JavaScript-bearing string; the payload then executes in the browser of every visitor who loads any page that renders the gallery.

Details

plugin/YouTubeAPI/YouTubeAPI.php::listVideos() fetches search results from the YouTube Data API and stores the snippet.title field unchanged inside a YPTvideoObject:

php
// plugin/YouTubeAPI/YouTubeAPI.php (listVideos excerpt)
$searchResponse = $youtube->search->listSearch(
    'snippet,contentDetails,statistics', $options
);
foreach ($searchResponse['items'] as $searchResult) {
    $vid = new YPTvideoObject(
        $searchResult["id"]["videoId"],
        $searchResult['snippet']["title"],          // uploader-controlled
        $searchResult['snippet']["description"],
        $searchResult['snippet']["thumbnails"]["high"]["url"],
        $searchResult['snippet']["channelTitle"],
        "https://www.youtube.com/embed/{$searchResult['id']['videoId']}"
    );
    $object->videos[] = $vid;
}

plugin/YouTubeAPI/gallerySection.php then renders the title into three HTML contexts inside each gallery card. Four reflection sites total, three of them completely unprotected:

php
// plugin/YouTubeAPI/gallerySection.php (foreach body)
$youtubeTitle = $video->title;
...
<a class="evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">          <!-- (i) attribute -->
    <img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo str_replace('"', '', $youtubeTitle); ?>" ... />  <!-- (ii) attribute, partial -->
</a>
<a class="h6 evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">       <!-- (iii) attribute -->
    <h2><?php echo $youtubeTitle; ?></h2>                                                              <!-- (iv) element body -->
</a>

Sites (i), (iii), and (iv) call no encoder. Site (ii) applies str_replace('"', '', $youtubeTitle) which strips quotes from one attribute and leaves the other three reflections untouched. The strongest sink is (iv) at line 60: a title containing <script>alert(2222)</script> produces <h2><script>alert(2222)</script></h2> in the rendered DOM, which the browser parses as a live script element and executes synchronously. The single half-mitigation at line 57 is the maintainer's evidence of awareness of the attribute-injection risk; the same developer left the other three sinks unprotected.

AVideo additionally caches the YouTube response for cacheTimeout seconds (default 3600), so even after the title is changed on YouTube or the video is removed, the AVideo gallery continues to serve the malicious title until the cache expires or is manually flushed.

Affected product: AVideo (WWBN), YouTubeAPI plugin Tested version: master branch, commit 122b184 (snapshot dated 2026-05-22)

PoC

The AVideo operator must have the YouTubeAPI plugin enabled (the default after configuring a YouTube Data API key) with showGallerySection=true (the default). The attacker controls a YouTube video (uploaded under any free YouTube account) whose title is set to:

<script>alert(2222)</script>

The attacker arranges for the AVideo operator's configured YouTube search query (the keyword plugin setting, typically a channel name or topical phrase) to match the hostile video. The matching condition is the same as a normal YouTube search: a unique phrase in the video's description, a channel name the operator follows, or any query the operator has configured.

After AVideo's cacheTimeout window elapses (default 3600 seconds) and a fresh listVideos() call fetches the malicious title, any visitor opening the AVideo homepage triggers an alert(2222) modal dialog as the gallery card renders.

For deterministic test reproduction, deploy a mock YouTube Data API service that impersonates www.googleapis.com and youtube.googleapis.com on the AVideo Docker network and returns the malicious title directly. The PoC then reduces to:

https://avideo.example/

Configure the YouTubeAPI plugin in the admin panel (/plugins) with any non-empty developer_key and any keyword value, then load the homepage. The browser fires alert(2222) as the gallery section finishes rendering.

Impact

This is a Stored XSS vulnerability (CWE-79) in a publicly-rendered HTML context, with the data source under attacker control (CWE-829). Every visitor who loads any AVideo page rendering the YouTubeAPI gallery section is impacted: the injected JavaScript runs in the visitor's session under the AVideo origin, reads non-HttpOnly cookies, and issues authenticated requests as the visitor. When the visitor 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 the bug into full administrative takeover. The payload persists for the duration of cacheTimeout (default 3600 seconds) after the malicious title is set on YouTube and survives YouTube removing the hostile video for the same window.

AnalysisAI

Stored XSS in AVideo's YouTubeAPI plugin allows any YouTube video uploader whose video matches the AVideo operator's configured search keyword to inject arbitrary JavaScript into every visitor's browser via the homepage gallery section. The snippet.title field returned by the YouTube Data API is rendered verbatim across four HTML output sites in plugin/YouTubeAPI/gallerySection.php, three of which apply no encoding whatsoever; the fourth applies only a partial str_replace that strips double-quotes and leaves the other three sinks untouched. Publicly available exploit code is documented in GHSA-66q5-cj5g-wrfx; the payload persists for up to 3600 seconds (the default cache TTL) after the hostile video is removed from YouTube, and when the victim is an authenticated AVideo administrator the injected script can escalate to full administrative takeover via cookie-based requests lacking CSRF protection.

More in PHP

View all
CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

CVE-2024-46506 CRITICAL POC
10.0 May 13

NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro

CVE-2024-8353 CRITICAL POC
9.8 Sep 28

The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all

Share

CVE-2026-50183 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy