Improperly sanitized style parameter enables code injection in The Wikimedia Foundation MediaWiki LanguageSelector Extension

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2025-62697?

CVE-2025-62697 is a vulnerability classified as Improper Neutralization of Special Elements in Output Used by a Downstream Component, affecting Mediawiki - LanguageSelector Extension (affected versions: master – < 1.39). This vulnerability is rated High, with a CVSS score of 8.8. Current sources do not report this vulnerability as exploited.

Overview

Original source data

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in The Wikimedia Foundation Mediawiki - LanguageSelector Extension allows Code Injection.This issue affects Mediawiki - LanguageSelector Extension: from master before 1.39.

Affected products and scope

  • The CNA record marks The Wikimedia Foundation MediaWiki LanguageSelector Extension as affected on master with the condition master before 1.39. The supplied default status is unaffected outside that stated affected range.
  • Wikimedia's issue record later documents security changes on REL1_39, REL1_43, REL1_44, and master. The single range in the CNA record should therefore not be treated as a complete inventory of affected branches.
  • Release tracking associates the branch fixes with MediaWiki 1.39.14, 1.43.4, and 1.44.1. The available evidence does not establish an open-ended rule for every later or parallel branch, and it does not provide an exact released version for the master fix.

Technical details

The attacker-controlled style parameter is supplied through the <languageselector> tag and inserted into generated HTML by the extension. The issue report states that the parameter is processed only with htmlspecialchars, which is insufficient for CSS content. The languageSelectorHTML function then places the resulting style string in an element's style attribute.

When the style value contains a CSS mechanism such as url(), the browser can request an external destination while rendering the page. The report demonstrates that this can expose the viewer's IP address and user agent. The record describes network reachability without requiring privileges or user interaction, while the issue report uses Special:ExpandTemplates to demonstrate tag processing. The available public detail does not establish arbitrary server-side code execution, browser JavaScript execution, or the full scope of the reported code-injection impact.

Exploitability

The supplied record describes network reachability, low attack complexity, no required privileges, and no required user interaction. In practice, the deployment must have LanguageSelector Extension installed and must process a <languageselector> tag containing a controllable style value.

The issue report documents a concrete behavior in which CSS causes a request to an external resource, exposing the viewer's IP address and user agent. The supplied record does not identify a public exploit, and its known-exploited field is not populated with a confirmed status. That does not prove exploitation has never occurred, and it does not establish a complete exploit chain for arbitrary code execution.

Technical impact

The documented direct outcome is that a browser can make a request to an attacker-controlled destination while rendering the page, exposing the viewer's IP address and user agent. The record also classifies the issue as code injection, so inserting content into the output context may affect client-side rendered integrity.

The supplied assessment describes low confidentiality and integrity impact and high availability impact, but the technical material does not explain a specific denial-of-service mechanism. No evidence establishes privileged access, arbitrary server-side code execution, or complete system takeover. Practical scope depends on whether the extension processes the affected tag, where the tag is rendered, and how the browser handles external CSS requests.

Business impact

  • Client-side data exposure: Malicious style content can cause a browser to contact an external destination, disclosing the viewer's IP address and user agent.
  • Privacy and tracking risk: Unexpected external requests may provide user metadata to a third party.
  • Rendered-content integrity: Injection into the style context may alter page presentation; the practical extent depends on the browser and where the content is rendered.
  • Evidence limits: The reviewed material does not identify a victim, campaign, compromise, or confirmed breach. It also does not demonstrate arbitrary server-side code execution.

Remediation

  1. Apply the Wikimedia security change to LanguageSelector Extension on the deployed branch. Release tracking associates the branch fixes with MediaWiki 1.39.14, 1.43.4, and 1.44.1; use the release corresponding to the branch in service.
  2. For master, verify that the change titled SECURITY: Sanitize style parameter properly is present in the deployed source. The available evidence does not state an exact release version for the master fix.
  3. If the deployed branch or version is uncertain, inventory the extension source and inspect how style is handled in LanguageSelectorHooks.php and languageSelectorHTML. Do not infer that a parallel branch is unaffected because another branch has been patched.
  4. Until the fix is applied, review and remove untrusted style values passed to <languageselector>. Treat this only as temporary risk reduction, not as a confirmed vendor workaround.
  5. The available evidence does not document an additional official vendor workaround.

Detection

  1. Inventory every wiki that installs The Wikimedia Foundation MediaWiki LanguageSelector Extension, including the extension branch and MediaWiki version in use.
  2. Inspect LanguageSelectorHooks.php, the languageSelectorHTML function, and the complete style-parameter handling path. Confirm whether the value is still inserted directly into a style attribute or whether the security change is present.
  3. Review templates, pages, and other content using the <languageselector> tag, especially cases where style values originate from untrusted input.
  4. Review outbound telemetry from proxies, browsers, or network monitoring for unexpected requests generated while rendering pages that contain LanguageSelector. This is precautionary monitoring, not a confirmed indicator of compromise.
  5. Compare the deployed source with the security changes recorded for REL1_39, REL1_43, REL1_44, and master. The absence of recorded outbound requests does not prove that a deployment is safe.
Sources (23)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.