CVE-2021-46149

7.5 HIGH

📋 TL;DR

This vulnerability allows attackers to cause denial of service by searching for extremely long language names in MediaWiki's Language Name Search feature. It affects MediaWiki installations running vulnerable versions, potentially impacting all users by consuming server resources and making the wiki unavailable.

💻 Affected Systems

Products:
  • MediaWiki
Versions: MediaWiki before 1.35.5, 1.36.x before 1.36.3, and 1.37.x before 1.37.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all MediaWiki installations with Language Name Search functionality enabled (default).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service unavailability due to resource exhaustion, affecting all wiki functionality for legitimate users.

🟠

Likely Case

Temporary performance degradation or service interruption during attack periods.

🟢

If Mitigated

Minimal impact with proper rate limiting and resource monitoring in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Simple HTTP request with long search parameter can trigger the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: MediaWiki 1.35.5, 1.36.3, or 1.37.1

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

Restart Required: No

Instructions:

1. Backup your MediaWiki installation. 2. Update to MediaWiki 1.35.5, 1.36.3, or 1.37.1. 3. Verify the update completed successfully.

🔧 Temporary Workarounds

Disable Language Name Search

all

Temporarily disable the vulnerable Language Name Search feature

Edit LocalSettings.php and add: $wgUseDatabaseMessages = false;

Implement Input Validation

all

Add input length validation for search parameters

Implement custom validation in search handlers to limit input length

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block requests with excessively long search parameters
  • Implement rate limiting on search endpoints to prevent resource exhaustion attacks

🔍 How to Verify

Check if Vulnerable:

Check MediaWiki version in includes/DefaultSettings.php or via Special:Version page

Check Version:

grep 'wgVersion' includes/DefaultSettings.php

Verify Fix Applied:

Verify version is 1.35.5, 1.36.3, or 1.37.1 or higher

📡 Detection & Monitoring

Log Indicators:

  • Unusually long search queries in access logs
  • Multiple rapid search requests from single IP
  • High CPU/memory usage correlated with search requests

Network Indicators:

  • HTTP GET requests with extremely long 'search' parameters
  • Pattern of repeated search requests

SIEM Query:

source="mediawiki_access.log" | search "search=*" AND length(search) > 1000

🔗 References

📤 Share & Export