CVE-2026-39839
Stored XSS in Mediawiki Cargo Extension Before
Publication date: 2026-04-07
Last updated on: 2026-04-15
Assigner: wikimedia-foundation
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| mediawiki | cargo | to 3.8.7 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-80 | The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
CVE-2026-39839 is a stored Cross-Site Scripting (XSS) vulnerability in the MediaWiki Cargo extension that allows attackers to execute arbitrary JavaScript in users' browsers. Such vulnerabilities can lead to unauthorized access to user sessions and data, which may impact the confidentiality and integrity of personal information.
While the provided information does not explicitly mention compliance with standards like GDPR or HIPAA, stored XSS vulnerabilities generally pose risks to data protection and privacy requirements mandated by these regulations. Exploitation could result in unauthorized disclosure or manipulation of personal data, potentially leading to non-compliance with such standards.
Can you explain this vulnerability to me?
CVE-2026-39839 is a stored Cross-Site Scripting (XSS) vulnerability in the MediaWiki Cargo extension, specifically in the map output format. The vulnerability occurs because the URL field in Cargo map queries is not properly validated or sanitized. This allows an attacker to inject a malicious `javascript:` URL that executes arbitrary JavaScript code when a user clicks on a map marker.
The issue arises from the CargoMapsFormat.php component where the URL parameter is rendered as a clickable link without proper checks. An attacker can create a Cargo template with a URL field containing a `javascript:` URI, which then executes malicious scripts in the context of the user's browser.
This vulnerability was fixed by adding URL validation and sanitization to prevent execution of JavaScript URIs in map markers.
How can this vulnerability impact me? :
This vulnerability can lead to arbitrary script execution in users' browsers when they interact with the affected map markers. An attacker could exploit this to perform malicious actions such as session hijacking, defacement of the website, or stealing sensitive information.
Because the malicious script runs in the context of the vulnerable site, it can bypass same-origin policies and potentially manipulate user data or perform actions on behalf of the user without their consent.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by identifying stored Cross-Site Scripting (XSS) payloads in the Cargo extension's map output format, specifically by checking for unvalidated or malicious URLs such as those starting with "javascript:" in Cargo map queries.
A practical detection approach involves querying the Cargo tables for URL fields containing suspicious or script-based URIs.
- Use database queries to search for entries in Cargo tables where the URL field contains "javascript:" or other script-based schemes.
- Example SQL command to detect suspicious URLs in Cargo tables: SELECT * FROM <cargo_table> WHERE URL LIKE 'javascript:%';
- Additionally, monitor web application logs or use web vulnerability scanners that can detect stored XSS by simulating clicks on map markers or inspecting map output for unsafe URLs.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to update the MediaWiki Cargo extension to version 3.8.7 or later, where the vulnerability has been patched by adding proper URL validation and sanitization in the map output format.
Until the update can be applied, avoid using or exposing Cargo map outputs that include user-controllable URL fields, especially those that can contain untrusted input.
- Apply the official patch that adds URL validation to the CargoMapsFormat component.
- Review and sanitize any existing data in Cargo tables to remove or neutralize malicious javascript: URLs.
- Restrict permissions to limit who can create or modify Cargo data that affects map outputs.