/

CVE-2026-55691

Severity:

HIGH RISK

(8.6)

Stored XSS (CWE-79) in MediaWiki EmbedVideo Extension

CVE-2026-55691

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored client-side code execution in wiki visitors' browsers

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored cross-site scripting vulnerability in the MediaWiki EmbedVideo Extension allows user-supplied class values to inject HTML attributes or markup into rendered video elements.

A user who can edit a wiki page may store JavaScript that executes in the browsers of visitors who view the affected content, particularly when the class value is rendered without adequate output encoding.

Affected context

The issue occurs in MediaWiki installations using the EmbedVideo Extension before its security fix, when the extension renders user-controlled class values while constructing figure elements. It becomes risky where an attacker can edit or otherwise influence wiki content and visitors subsequently render the affected embedded media.

Exploit preconditions

  • Attack surface: MediaWiki page content processed by the EmbedVideo parser function or related parser tags
  • Required access: Permission to edit or submit wiki content that can reach the affected rendering path
  • Trigger point: Rendering an embedded video whose class value is included in the generated figure element
  • Why exploitation is possible: The class value is inserted into an HTML template without sufficient contextual output encoding, allowing attribute boundaries or markup to be altered

Why this happens

The underlying bug is improper neutralization of user-controlled data in an HTML attribute context. The formatter passes the supplied class value directly into a string-formatting operation used to build markup, allowing special characters to change the structure of the generated HTML.

This maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), specifically a stored XSS pattern in which attacker-controlled content is persisted and later delivered to other users.

Potential impact

  • JavaScript may execute in the security context of visitors viewing affected pages
  • Session information or page data could be exposed, subject to browser and application controls
  • Attackers could alter rendered content or perform actions on behalf of users
  • Administrative visitors could be targeted for broader wiki or configuration changes
  • The wiki's trust and content integrity could be undermined

General mitigation guidance

Mitigation generally focuses on treating all editable wiki content as untrusted and applying context-appropriate output encoding at the point where HTML is generated.

Common defensive patterns include:

  • Encode attribute values with an HTML attribute-context encoder rather than interpolating them directly
  • Prefer structured DOM or templating APIs that separate data from markup
  • Restrict class values to an allowlisted set of expected tokens
  • Apply validation before rendering while retaining output encoding as a separate control
  • Limit page-editing privileges and review untrusted embedded-media content
  • Use a restrictive Content Security Policy as defense in depth

How teams detect issues like this

Detection can include static analysis for string formatting or template interpolation of user-controlled values in HTML attributes, especially where encoding is absent or applied in the wrong context. Code review should examine parser functions, formatter classes, and extension hooks that transform editable wiki content into markup.

Runtime monitoring may look for unusual attribute values, unexpected event-handler attributes, or markup patterns in newly edited pages. CI policies can require context-aware output encoding and security tests for stored content rendered through extension-specific paths. Automated code review tools may help identify direct interpolation into HTML construction.

Sources

SourceLink
github.comgithub.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/commit/370156335b325bb81d14d89edf0a1f2643d50a84
github.comgithub.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/releases/tag/v4.1.0
github.comgithub.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/security/advisories/GHSA-7h5p-637f-jfr7

Frequently asked

questions

An attacker generally needs permission to edit wiki content that reaches the affected EmbedVideo rendering path. The resulting payload can affect visitors who view the stored content.

It can be triggered through normal web access when an attacker has the required content-editing permission and a visitor renders the affected page. Exploitability depends on the wiki's access controls and configuration.

Use context-aware HTML attribute encoding and constrain class values to an allowlist. Data should remain separate from markup throughout the rendering process.

Treat editable content as untrusted, use secure templating or DOM construction APIs, review extension rendering code, and test stored-content paths for HTML and script injection.

Find out what's already
exploitable in your codebase.