CVE-2020-29004

8.8 HIGH

📋 TL;DR

This CSRF vulnerability in MediaWiki's Push extension allows attackers to perform unauthorized API actions by tricking authenticated users into visiting malicious web pages. It affects MediaWiki installations with the Push extension enabled. The vulnerability stems from missing edit token validation in the API endpoint.

💻 Affected Systems

Products:
  • MediaWiki with Push extension
Versions: MediaWiki through version 1.35 with Push extension
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with the Push extension enabled. The vulnerability is in the API endpoint implementation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could push malicious content to MediaWiki instances, modify configurations, or perform administrative actions without authorization, potentially compromising the entire wiki.

🟠

Likely Case

Unauthorized content modification, configuration changes, or data manipulation through the Push API by leveraging authenticated user sessions.

🟢

If Mitigated

With proper CSRF protections and edit token validation, the API would reject unauthorized requests, limiting impact to legitimate authenticated actions only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires tricking an authenticated user into visiting a malicious page. The vulnerability is straightforward to exploit once the attack vector is understood.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: MediaWiki 1.35.1 or later with updated Push extension

Vendor Advisory: https://phabricator.wikimedia.org/T262724

Restart Required: No

Instructions:

1. Update MediaWiki to version 1.35.1 or later. 2. Update the Push extension to the patched version. 3. Verify the edit token validation is now required in ApiPushBase.php.

🔧 Temporary Workarounds

Disable Push Extension

all

Temporarily disable the vulnerable Push extension until patching is possible

Remove or comment out 'wfLoadExtension( 'Push' );' in LocalSettings.php

Implement CSRF Protection

all

Add custom CSRF protection middleware or validation for the API endpoint

🧯 If You Can't Patch

  • Restrict access to the MediaWiki instance using network controls or authentication gateways
  • Implement web application firewall rules to detect and block CSRF attempts

🔍 How to Verify

Check if Vulnerable:

Check if MediaWiki version is 1.35 or earlier and Push extension is enabled. Review ApiPushBase.php for missing edit token validation.

Check Version:

php maintenance/run.php --version

Verify Fix Applied:

Verify that edit token validation is now required in ApiPushBase.php and test API calls fail without proper tokens.

📡 Detection & Monitoring

Log Indicators:

  • API calls to Push endpoints without edit tokens
  • Unusual push activity from unexpected sources

Network Indicators:

  • HTTP POST requests to Push API endpoints without CSRF tokens
  • Requests with missing or invalid edit tokens

SIEM Query:

source="mediawiki.log" AND "ApiPush" AND NOT "edit_token"

🔗 References

📤 Share & Export