WWBN AVideo: Stored XSS via Hostile YouTube Video Title in AVideo YouTubeAPI Gallery Section
Description
AVideo's YouTubeAPI plugin suffers from stored XSS because it fails to sanitize YouTube video titles, allowing attackers to inject malicious scripts.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
AVideo's YouTubeAPI plugin suffers from stored XSS because it fails to sanitize YouTube video titles, allowing attackers to inject malicious scripts.
Vulnerability
A stored Cross-Site Scripting (XSS) vulnerability exists in the AVideo YouTubeAPI plugin. The plugin fetches video titles from the YouTube Data API and renders them directly into the homepage gallery markup without proper HTML encoding. This allows any YouTube uploader to inject HTML and JavaScript into the video title, which is then displayed on the AVideo homepage.
Exploitation
An attacker can control a YouTube video's title by uploading a video and setting its title to a JavaScript-bearing string. When an AVideo instance's gallery is configured to display this video, and a user loads a page rendering the gallery, the malicious script embedded in the video title will execute in the user's browser.
Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of any user viewing the AVideo homepage gallery. This can lead to session hijacking, information disclosure, or further malicious actions within the user's browser session.
Mitigation
The vulnerability was fixed in commit 7292129eaee5f609beae103b5cb387d55f17b877 on GitHub [4]. The fix involves sanitizing the video title using htmlspecialchars before rendering it in HTML contexts. Users should update to a version of AVideo that includes this commit. No specific version number or release date for the patch is available in the provided references.
AI Insight generated on Jun 4, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1- Range: master branch, commit 122b184
Patches
17292129eaee5Sanitize video title and thumbnail attributes for HTML output in gallerySection.php
1 file changed · +3 −3
plugin/YouTubeAPI/gallerySection.php+3 −3 modified@@ -47,13 +47,13 @@ <?php foreach ($object->videos as $video) { $youtubeEmbedLink = "{$global['webSiteRootURL']}evideo/". encryptString(json_encode($video)); - $youtubeTitle = $video->title; - $youtubeThumbs = $video->thumbnails; + $youtubeTitle = htmlspecialchars($video->title, ENT_QUOTES | ENT_HTML5, 'UTF-8'); + $youtubeThumbs = htmlspecialchars($video->thumbnails, ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?> <div class="col-lg-<?php echo 12 / $objGallery->screenColsLarge; ?> col-md-<?php echo 12 / $objGallery->screenColsMedium; ?> col-sm-<?php echo 12 / $objGallery->screenColsSmall; ?> col-xs-<?php echo 12 / $objGallery->screenColsXSmall; ?> galleryVideo fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;"> <a class="evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>"> <div class="aspectRatio16_9"> - <img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo str_replace('"', '', $youtubeTitle); ?>" class="thumbsJPG img img-responsive" /> + <img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo $youtubeTitle; ?>" class="thumbsJPG img img-responsive" /> </div> </a> <a class="h6 evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
Vulnerability mechanics
Root cause
"The AVideo YouTubeAPI plugin fails to properly sanitize user-controlled YouTube video titles before rendering them in HTML contexts."
Attack vector
An attacker can upload a YouTube video with a malicious title containing HTML or JavaScript. If the AVideo operator's configured YouTube search query matches this video, the malicious title will be fetched and cached by AVideo. When any visitor loads the AVideo homepage, the injected script executes in their browser, potentially leading to administrative takeover if the visitor is an administrator [ref_id=1].
Affected code
The vulnerability exists in `plugin/YouTubeAPI/gallerySection.php`. Specifically, the `snippet.title` field fetched from the YouTube Data API is rendered directly into HTML attributes (`title` and `alt`) and an `<h2>` element body without proper sanitization [ref_id=1].
What the fix does
The patch applies `htmlspecialchars` to the `video->title` and `video->thumbnails` variables before they are output into HTML attributes and element bodies [patch_id=4828894]. This function properly encodes special characters, preventing them from being interpreted as HTML or JavaScript by the browser, thus mitigating the stored XSS vulnerability.
Preconditions
- configThe YouTubeAPI plugin must be enabled and configured with a YouTube Data API key and a `keyword` search query.
- inputAn attacker must control a YouTube video whose title contains malicious HTML or JavaScript.
- inputThe attacker must ensure the malicious video's title matches the AVideo operator's configured `keyword` search query.
Reproduction
Configure the YouTubeAPI plugin with any non-empty `developer_key` and `keyword`. Ensure the AVideo cache for YouTube API results has expired or is flushed. Then, load the AVideo homepage. The browser will display an `alert(2222)` modal dialog as the gallery section renders [ref_id=1].
Generated on Jun 4, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
3News mentions
0No linked articles in our index yet.