/

CVE-2026-52854

Severity:

HIGH RISK

(8.6)

Stored XSS (CWE-79) in MediaWiki Maps Extension UI

CVE-2026-52854

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79, CWE-80

Impact:

Stored Cross-Site Scripting and user-session compromise

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 Maps extension allows an editor to place attacker-controlled HTML in a map overlay label. When another user previews or views the affected map, the browser may execute the embedded script within that user's MediaWiki session.

Affected context

The issue occurs in Maps deployments that use the display_map parser function with the Leaflet service. It becomes risky when a user with edit permission can store malicious wikitext in the overlays parameter and the resulting overlay name is rendered as a Leaflet layer-control label without adequate HTML escaping.

Exploit preconditions

  • Attack surface: MediaWiki pages containing Maps extension Leaflet maps
  • Required access: Permission to edit content that can include the affected map syntax
  • Trigger point: Another user previews or views a page containing the affected map
  • Why exploitation is possible: Attacker-controlled overlay text is inserted into browser-rendered HTML without sufficient output encoding

Why this happens

The underlying bug is context-inappropriate handling of user-controlled content during client-side HTML rendering. The Leaflet integration uses an overlay name as a layer-control label without escaping it, allowing markup or script-bearing content to become active in the viewer's browser. This behavior maps primarily to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), with CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page also relevant to the unsafe HTML handling pattern.

Potential impact

  • An attacker may execute JavaScript in another user's browser session.
  • The script could access data visible to the affected user.
  • The script could perform actions permitted by the victim's MediaWiki account.
  • Administrative or privileged users could face broader account or site-impacting consequences.
  • The vulnerability could facilitate content manipulation, credential abuse, or follow-on attacks.

General mitigation guidance

Mitigation generally focuses on treating map labels and other rendered metadata as untrusted text.

Common defensive patterns include:

  • Apply context-appropriate HTML escaping before inserting overlay names into the DOM.
  • Prefer text-only DOM APIs or framework mechanisms that do not interpret supplied values as markup.
  • Use allowlists and strict schemas for map configuration fields where formatting is genuinely required.
  • Reduce the trust granted to users who can create or modify map syntax.
  • Apply least privilege to editor and administrative roles to limit the impact of script execution.
  • Use browser-side defenses such as an appropriately restrictive Content Security Policy as a defense in depth.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying concatenation of user-controlled values into HTML or DOM sinks.
  • Code review checks for innerHTML, HTML-building APIs, template interpolation, or equivalent unsafe rendering patterns.
  • Tests using markup-like and script-like input in overlay names and other map metadata.
  • Content-security and web-application monitoring policies that identify unexpected inline script execution.
  • Repository scans and automated security review tools that flag missing output encoding at browser-rendering boundaries.

Sources

SourceLink
github.comgithub.com/ProfessionalWiki/Maps/blob/12.1.3/RELEASE-NOTES.md
github.comgithub.com/ProfessionalWiki/Maps/commit/737a993fc2f40499e9bb22198fd1d56c25613806
github.comgithub.com/ProfessionalWiki/Maps/pull/899
github.comgithub.com/ProfessionalWiki/Maps/releases/tag/12.1.3
github.comgithub.com/ProfessionalWiki/Maps/security/advisories/GHSA-4h7g-5542-v3fc

Frequently asked

questions

It can be triggered through normal web access when an attacker with edit permission stores affected map content and another user views or previews it. The exact reach depends on site permissions and page visibility.

The attacker generally needs permission to edit wikitext or otherwise create content containing the affected display_map and overlays values.

Treat overlay names as untrusted text and render them through context-appropriate escaping or text-only DOM APIs rather than interpreting them as HTML.

Establish output-encoding rules for every rendering context, test user-controlled map fields with hostile markup, review client-side DOM sinks, and limit the privileges of users who can create stored content.

Find out what's already
exploitable in your codebase.