CVE-2024-34502

9.8 CRITICAL

📋 TL;DR

This vulnerability allows unauthenticated attackers to merge lexemes in WikibaseLexeme without proper authorization. It affects MediaWiki installations with the WikibaseLexeme extension enabled. The issue occurs when Special:MergeLexemes processes requests without requiring POST method or edit tokens.

💻 Affected Systems

Products:
  • MediaWiki with WikibaseLexeme extension
Versions: MediaWiki versions before 1.39.6, 1.40.x before 1.40.2, and 1.41.x before 1.41.1
Operating Systems: All operating systems running affected MediaWiki versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with WikibaseLexeme extension enabled. The vulnerability is in the extension, not core MediaWiki.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Unauthenticated remote attackers could merge arbitrary lexemes, corrupting linguistic data and potentially causing data loss or inconsistency in lexeme databases.

🟠

Likely Case

Unauthorized users could merge lexemes they shouldn't have access to, disrupting linguistic data integrity and potentially affecting downstream applications relying on this data.

🟢

If Mitigated

With proper access controls and network segmentation, impact is limited to authorized users who could still perform unauthorized merges within their access scope.

🌐 Internet-Facing: HIGH - The vulnerability is exploitable via web interface without authentication, making internet-facing instances particularly vulnerable.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable but attack surface is reduced compared to internet-facing deployments.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW - Exploitation requires only web access to the Special:MergeLexemes endpoint without authentication.

The vulnerability is a CSRF-type issue (CWE-352) where actions can be triggered without proper request validation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: MediaWiki 1.39.6, 1.40.2, or 1.41.1

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

Restart Required: No

Instructions:

1. Update MediaWiki to version 1.39.6, 1.40.2, or 1.41.1 or later. 2. Alternatively, update the WikibaseLexeme extension to the latest version. 3. No service restart required for MediaWiki updates.

🔧 Temporary Workarounds

Disable WikibaseLexeme extension

all

Temporarily disable the vulnerable extension until patching is possible

Edit LocalSettings.php and comment out or remove: wfLoadExtension('WikibaseLexeme');

Restrict access to Special:MergeLexemes

linux

Use web server rules to block access to the vulnerable endpoint

For Apache: <Location "/wiki/Special:MergeLexemes">
    Require all denied
</Location>
For Nginx: location ~ ^/wiki/Special:MergeLexemes { deny all; }

🧯 If You Can't Patch

  • Implement strict access controls to limit who can access the MediaWiki instance
  • Monitor logs for unauthorized access attempts to Special:MergeLexemes endpoint

🔍 How to Verify

Check if Vulnerable:

Check if WikibaseLexeme extension is enabled and MediaWiki version is in affected range. Access Special:MergeLexemes without authentication to test.

Check Version:

Check MediaWiki version via Special:Version page or grep 'wgVersion' in LocalSettings.php

Verify Fix Applied:

After update, verify MediaWiki version is 1.39.6, 1.40.2, 1.41.1 or later. Test that Special:MergeLexemes requires proper authentication and POST requests.

📡 Detection & Monitoring

Log Indicators:

  • Unauthenticated requests to /wiki/Special:MergeLexemes
  • GET requests to merge endpoints that should only accept POST
  • Unexpected lexeme merge operations

Network Indicators:

  • HTTP requests to Special:MergeLexemes without authentication tokens
  • Non-POST requests to merge endpoints

SIEM Query:

source="mediawiki_logs" AND (url_path="/wiki/Special:MergeLexemes" AND (http_method!="POST" OR user="-"))

🔗 References

📤 Share & Export