MediaWiki Cross-site Scripting (XSS) Vulnerability in mediawiki/core

mediawiki/core Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
6.1

CVE-2020-25812: MediaWiki Cross-site Scripting (XSS) vulnerability. Affects mediawiki/core across 2 version ranges.

>= 1.34.0, < 1.34.3 >= 1.35.0-rc.0, < 1.35.0

Fixed in 1.34.3 or 1.35.0, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2020-25812 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

MediaWiki is an open-source wiki software used to power numerous websites, including Wikipedia. It provides a platform for collaborative editing and content management. The mediawiki/core package is the core component of MediaWiki, responsible for its fundamental functionality. Unfortunately, this package is susceptible to a Cross-site Scripting (XSS) vulnerability.

Vulnerability Detail

The identified vulnerability in MediaWiki 1.34.x before 1.34.3 involves the NS filter on the Special:Contributions page. The filter utilizes unescaped messages as keys in the option key for an HTMLForm specifier. This allows for a mild XSS attack if one of the messages is modified to include raw HTML. An attacker could exploit this vulnerability to inject malicious scripts or content into the affected page, potentially leading to unauthorized access, data theft, or other malicious activities.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.34.0, < 1.34.3 1.34.3
    composer require mediawiki/core:1.34.3
  • >= 1.35.0-rc.0, < 1.35.0 1.35.0
    composer require mediawiki/core:1.35.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround can be implemented. This involves manually escaping the messages used as keys in the option key for the HTMLForm specifier on the Special:Contributions page. By properly escaping the messages, the vulnerability can be mitigated until the upgrade can be performed. Here is an example of how the messages can be escaped in PHP:

$escapedMessage = htmlspecialchars( $message, ENT_QUOTES );

Conclusion

In conclusion, the mediawiki/core package in MediaWiki is vulnerable to a Cross-site Scripting (XSS) attack on the Special:Contributions page. Upgrading to version 1.34.3 or later is the recommended solution to fix this vulnerability. Alternatively, implementing the provided workaround can mitigate the risk until the upgrade is performed. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mediawiki/core →

Share this vulnerability

FAQ

MediaWiki is an open-source wiki software widely used for collaborative editing and content management. It powers websites like Wikipedia.

The mediawiki/core package is the core component of MediaWiki. It provides the fundamental functionality of the software.

Cross-site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts or content into web pages viewed by other users. This can lead to various attacks, such as session hijacking, data theft, or defacement.

This vulnerability in MediaWiki can allow an attacker to inject malicious scripts or content into the Special:Contributions page. This can potentially lead to unauthorized access, data theft, or other malicious activities.

To fix this vulnerability, it is recommended to upgrade to MediaWiki version 1.34.3 or later. This version includes a patch that addresses the XSS vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for mediawiki/core.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.34.0, < 1.34.3 1.34.3
    composer require mediawiki/core:1.34.3
  • >= 1.35.0-rc.0, < 1.35.0 1.35.0
    composer require mediawiki/core:1.35.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback