CVE-2025-51958

9.8 CRITICAL

📋 TL;DR

CVE-2025-51958 is a critical remote code execution vulnerability in the aelsantex runcommand plugin for DokuWiki. Unauthenticated attackers can execute arbitrary system commands on affected servers via a specific PHP file. All DokuWiki installations using the vulnerable runcommand plugin are affected.

💻 Affected Systems

Products:
  • DokuWiki with aelsantex runcommand plugin
Versions: runcommand plugin versions up to and including 2014-04-01
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation of the runcommand plugin. DokuWiki itself is not vulnerable, only installations with this specific plugin.

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands with web server privileges, potentially leading to data theft, ransomware deployment, or persistent backdoor installation.

🟠

Likely Case

Attackers gain shell access to the web server, allowing them to read sensitive files, modify content, or pivot to other systems on the network.

🟢

If Mitigated

With proper network segmentation and least privilege, impact is limited to the web server's capabilities and isolated network segment.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The vulnerability requires no authentication and has a simple exploitation path via HTTP request to the vulnerable PHP file.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: None available

Vendor Advisory: https://www.dokuwiki.org/plugin:runcommand

Restart Required: No

Instructions:

1. Remove the runcommand plugin from your DokuWiki installation. 2. Delete the lib/plugins/runcommand directory. 3. Clear DokuWiki cache if applicable.

🔧 Temporary Workarounds

Block access to vulnerable file

all

Use web server configuration to block access to the vulnerable PHP file

# For Apache: add to .htaccess or virtual host config
<Files "postaction.php">
    Require all denied
</Files>
# For Nginx: add to server block
location ~ /lib/plugins/runcommand/postaction\.php$ {
    deny all;
    return 403;
}

Disable plugin via DokuWiki

all

Disable the runcommand plugin through DokuWiki's plugin manager

# Access DokuWiki admin panel > Extension Manager > Manage Plugins
# Find 'runcommand' and click 'Disable'

🧯 If You Can't Patch

  • Immediately remove the runcommand plugin from all DokuWiki installations
  • Implement network segmentation to isolate DokuWiki servers from critical systems

🔍 How to Verify

Check if Vulnerable:

Check if the file lib/plugins/runcommand/postaction.php exists in your DokuWiki installation directory

Check Version:

Check the plugin.info.txt file in lib/plugins/runcommand/ for version information

Verify Fix Applied:

Verify that the lib/plugins/runcommand directory has been completely removed

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests to /lib/plugins/runcommand/postaction.php with command parameters
  • Unusual system commands executed by the web server user
  • Web server error logs showing command execution attempts

Network Indicators:

  • HTTP POST requests to the vulnerable endpoint with command parameters
  • Outbound connections from web server to unusual destinations

SIEM Query:

source="web_server_logs" AND (uri="/lib/plugins/runcommand/postaction.php" OR uri CONTAINS "postaction.php")

🔗 References

📤 Share & Export