CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-57440

CVE-2026-57440: Stored Cross-Site Scripting (XSS) in MediaWiki EmbedVideo Extension

Alon Barad
Alon Barad
Software Engineer

Sep 25, 2026·7 min read·3 visits

Executive Summary (TL;DR)

Stored Cross-Site Scripting (XSS) in the MediaWiki EmbedVideo extension before version 4.1.0 allows authenticated or anonymous page editors to execute arbitrary JavaScript in the browsers of wiki visitors when video consent overlays are disabled.

CVE-2026-57440 is a high-severity stored Cross-Site Scripting (XSS) vulnerability affecting the EmbedVideo extension for MediaWiki. When the extension is configured with consent requirements disabled ($wgEmbedVideoRequireConsent = false), video URLs and service IDs are parsed and inserted directly into the 'src' attribute of a generated iframe element without sanitization or context-aware escaping. This allows an attacker with editing privileges to inject arbitrary JavaScript and execute malicious commands in the context of other users' sessions.

Vulnerability Overview

The EmbedVideo extension for MediaWiki, developed by StarCitizenWiki, allows wiki contributors to embed audio and video files from external platforms directly into wiki articles. This functionality is implemented via the custom parser function #ev and other specialized parser tags. The component is widely used within individual media-focused wikis to enrich page content with remote streams from sites such as YouTube, Vimeo, Archive.org, and various corporate video solutions.

Under certain configurations, specifically when video-loading consent restrictions are disabled ($wgEmbedVideoRequireConsent = false), the extension exposes an attack surface through its HTML parsing and formatting functions. The lack of proper sanitization during direct HTML output generation introduces a severe stored cross-site scripting (XSS) vulnerability. Any user with page editing capabilities can leverage this vulnerability to insert malicious input that is subsequently rendered for other users.

This vulnerability is tracked as CVE-2026-57440 and has been assigned a CVSS v3.1 base score of 7.5. The primary consequence is the capability for unauthorized execution of arbitrary script commands within the browser sessions of visiting users, including elevated administrative roles.

The attack vector is entirely remote and requires low complexity. On open wikis, anonymous users or newly created accounts can exploit the vulnerability immediately. Even on closed or moderated wikis, any user with basic page-editing rights can execute this attack, bypass standard security filters, and target internal users and administrators.

Root Cause Analysis

The core deficiency resides in the manual concatenation and formatting of the HTML <iframe> tag within includes/EmbedService/EmbedHtmlFormatter.php. When explicit consent overlays are disabled, the system invokes the makeIframe() function to output the element immediately. The function dynamically aggregates tag attributes and compiles them using raw string operations without calling any neutralization or sanitization routines.

The logic uses sprintf to map over the attribute key-value pairs and generate output strings in the format key="value". No context-aware escaping, such as htmlspecialchars() or MediaWiki's native escaping helpers, is applied to the values before formatting. Consequently, if the $service->getUrl() method returns a string that contains a double quotation mark, the structure of the resulting HTML attribute is broken.

An attacker can exploit this structural weakness by supplying input parameters that break out of the src attribute context. By injecting a double quote, the attacker can insert arbitrary attributes, such as onload or onerror event handlers, which the browser parses and executes as native script blocks. This represents a classic instance of CWE-79 and CWE-80, occurring because the input boundaries are not preserved during serialization.

The vulnerability is highly persistent because MediaWiki heavily caches rendered parser outputs. Once a page containing the malicious payload is rendered, the raw HTML is stored in the objectcache or parsercache database tables. Every subsequent viewer requests the cached HTML directly, which triggers the execution of the payload without re-running the parser or performing validation.

Code Analysis

A detailed look at the vulnerable implementation of the makeIframe() method reveals the insecure manual format mapping:

public static function makeIframe( AbstractEmbedService $service ): string {
    ...
    $attributes[$srcType] = $service->getUrl();
 
    $out = array_map( static function ( $key, $value ) {
        return sprintf( '%s="%s"', $key, $value );
    }, array_keys( $attributes ), $attributes );
 
    return sprintf( '<iframe %s></iframe>', implode( ' ', $out ) );
}

In this vulnerable implementation, each key-value pair is directly interpolated into a double-quoted string. When an attribute value like $service->getUrl() contains raw quotation marks, the browser interprets the first matching quotation mark as the termination of the src attribute. This permits any subsequent characters to be interpreted as separate HTML attributes inside the <iframe> tag.

The official patch committed in version 4.1.0 completely eliminates this vulnerability by migrating the HTML serialization process to MediaWiki's robust, secure framework functions. Specifically, the manual string formatting is replaced with Html::element():

public static function makeIframe( AbstractEmbedService $service ): string {
    ...
    $attributes[$srcType] = $service->getUrl();
 
    return Html::element( 'iframe', $attributes );
}

The Html::element() helper automatically handles the attribute serialization and ensures that all key-value pairs are properly escaped using context-aware sanitization filters. This ensures that any quotation marks present in the URL are safely encoded as &quot;, preventing any possibility of attribute breakout. Additionally, the patch refactors the outer figure template to use mustache files and MediaWiki's TemplateParser instead of inline heredocs, which significantly hardens the codebase against format-string and layout-injection variants.

Exploitation Methodology

Exploitation of CVE-2026-57440 requires three distinct prerequisites. First, the MediaWiki installation must run a vulnerable version of the EmbedVideo extension prior to version 4.1.0. Second, the server configuration must have explicit video consent disabled via $wgEmbedVideoRequireConsent = false. Third, the threat actor must possess the permissions necessary to edit or create wiki articles on the targeted instance.

To conduct the attack, the threat actor constructs a page with a malformed parser tag containing double quotes within a permissive service provider ID. Some service definitions, such as those for Archive.org, SharePoint, or Wistia, use patterns that allow the inclusion of double quotes without failing regex validation. A typical malicious syntax submitted to the wiki parser is represented below:

{{#ev:archiveorg|2024-12-21" onload="javascript:alert(document.domain)" style="display:none}}

When the parser processes this input, the EmbedVideo service handler resolves the parameters and passes them to EmbedHtmlFormatter::makeIframe(). The resulting HTML output is written into the page cache as shown below:

<iframe src="//archive.org/embed/2024-12-21" onload="javascript:alert(document.domain)" style="display:none"></iframe>

When standard users or administrators navigate to the affected wiki page, their browser parses the cached HTML. The browser instantiates the <iframe> element, parses the injected onload attribute, and executes the specified JavaScript commands under the host wiki's origin. This can be used to extract active session tokens or perform background operations with the victim's privileges.

Impact Assessment

The impact of a successful exploit of CVE-2026-57440 is high. Stored cross-site scripting vulnerabilities allow permanent script execution without requiring the attacker to trick individual users into clicking malicious external links. Because the payload is saved in the wiki database and cached, it runs automatically whenever any visitor accesses the contaminated page.

In a standard MediaWiki deployment, administrators regularly audit and edit pages. If an administrator views a compromised article, the injected script executes within the context of their administrative session. This enables the script to perform state-changing transactions, such as creating new administrator accounts, modifying sensitive system configurations, or exfiltrating private databases.

Furthermore, the vulnerability allows for silent data collection and session hijacking. Injected JavaScript can access the document.cookie property (unless protected by HttpOnly flags) or read session tokens from local storage. The stolen authentication credentials can then be transmitted to an external server controlled by the attacker, leading to persistent administrative compromise.

Remediation & Defense

The primary and recommended remediation is to upgrade the EmbedVideo extension to version 4.1.0 or later. This version replaces all insecure manual concatenation steps with MediaWiki's standard HTML helper classes, effectively blocking the injection vector. The update also updates local-video template formatting to use safe Mustache templates.

In environments where upgrading the extension is not immediately feasible, administrators should enforce the consent system by adding or modifying the following variable in LocalSettings.php:

$wgEmbedVideoRequireConsent = true;

When enabled, this directive forces the extension to wrap videos inside an interactive overlay, preventing the direct execution of the vulnerable makeIframe function during page load. Additionally, security teams can deploy a robust Content Security Policy (CSP) with a strict script-src directive that excludes 'unsafe-inline'. This prevents the browser from executing inline event handlers like onload and onerror even if an attacker successfully injects them into the iframe tag.

Official Patches

StarCitizenWikiOfficial Security Fix Commit

Fix Analysis (2)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
0.26%
Top 85% most exploited

Affected Systems

mediawiki-extensions-EmbedVideo

Affected Versions Detail

Product
Affected Versions
Fixed Version
mediawiki-extensions-EmbedVideo
StarCitizenWiki
< 4.1.04.1.0
AttributeDetail
CWE IDCWE-79 (Improper Neutralization of Input During Web Page Generation)
Attack VectorNetwork (Remote)
CVSS Severity7.5 (High)
EPSS Score0.00255 (Percentile: 15.21%)
Exploit StatusNone / Unproven
CISA KEV StatusNot Listed
Ransomware UseNo Known Involvement

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The software 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.

Vulnerability Timeline

Vulnerability patched by developers in commit 370156335b325bb81d14d89edf0a1f2643d50a84
2026-06-02
Vulnerability formally disclosed and GHSA-v65j-hff3-753c published
2026-09-24
EPSS scores published and NVD database updated
2026-09-25

References & Sources

  • [1]GitHub Security Advisory GHSA-v65j-hff3-753c
  • [2]Official Security Fix Commit
  • [3]Official CVE Registry Entry
  • [4]NVD Detail Page
  • [5]Repository Home Page
  • [6]JSON Definition (CvelistV5)
  • [7]Secondary Contextual Commit (Archive.org Slash Fix)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•40 minutes ago•CVE-2026-61823
7.3

CVE-2026-61823: Stored Cross-Site Scripting (XSS) via iframe srcdoc Attribute in code16 Sharp

A stored cross-site scripting (XSS) vulnerability was identified in the content-management and administrative framework code16 Sharp. The flaw stems from an overly permissive HTML sanitization configuration that whitelists the 'srcdoc' attribute on HTML 'iframe' tags. When processed and stored, browsers render the content of this attribute by decoding nested HTML entities, converting sanitized elements back into executable code.

Amit Schendel
Amit Schendel
1 views•5 min read
•about 3 hours ago•CVE-2026-92161
9.8

CVE-2026-92161: Unauthenticated Account Takeover in FriendsOfFlarum OAuth Extension

A critical logical vulnerability in the FriendsOfFlarum OAuth (fof/oauth) extension allows unauthenticated remote attackers to perform complete account takeover, including administrative profiles. This vulnerability is caused by a failure to verify the email verification status returned by third-party identity providers such as Discord before asserting that the email is trusted and matching it to existing local accounts.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-61784
6.1

CVE-2026-61784: HTML Attribute Injection and Sanitizer Bypass in node-xhtml-purifier

A critical sanitizer bypass vulnerability exists in the xhtml-purifier Node.js library prior to version 0.4.3. Due to a lack of HTML entity encoding during the attribute re-serialization phase, unauthenticated remote attackers can break out of double-quoted attribute contexts to inject arbitrary script handlers, resulting in Cross-Site Scripting.

Alon Barad
Alon Barad
3 views•7 min read
•about 5 hours ago•CVE-2026-61741
9.3

CVE-2026-61741: XML External Entity (XXE) Injection in http4s-scala-xml

CVE-2026-61741 is a critical XML External Entity (XXE) injection vulnerability in the http4s-scala-xml library. The vulnerability allows remote, unauthenticated attackers to perform arbitrary local file disclosure, execute server-side request forgery (SSRF) attacks, or cause denial of service via recursive entity expansion. The vulnerability stems from the use of an unconfigured SAXParserFactory, which enables external entity resolution by default.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 6 hours ago•CVE-2026-61742
9.3

CVE-2026-61742: DNS Rebinding to Unauthenticated SQL Execution in DBHub

A critical DNS rebinding vulnerability in DBHub (associated with GHSA-fm8p-53ww-hf6w) allows unauthenticated remote attackers to execute arbitrary SQL queries against local and internal databases. By exploiting a relative origin validation check within the HTTP transport middleware, an attacker can bypass same-origin protections via DNS rebinding. This allows malicious external websites to send JSON-RPC commands to the local DBHub service to read, write, and exfiltrate database contents. The issue affects all versions of DBHub prior to 0.22.5.

Alon Barad
Alon Barad
5 views•7 min read
•about 7 hours ago•CVE-2026-61788
7.4

CVE-2026-61788: Read-Only Bypass in DBHub Database Model Context Protocol Server

CVE-2026-61788 identifies a critical vulnerability in DBHub, an open-source database Model Context Protocol (MCP) server designed to manage and interact with database engines including PostgreSQL, MySQL, SQL Server, Oracle, MariaDB, and SQLite. Prior to version 0.22.6, DBHub fails to securely enforce its declared 'readonly' execution mode. Unauthenticated remote attackers can bypass keyword-based filters and transaction controls to execute arbitrary write operations, manipulate database sequences, read or write files on the host operating system, and potentially execute arbitrary system commands.

Amit Schendel
Amit Schendel
6 views•8 min read