CVE-2019-13956

9.8 CRITICAL

📋 TL;DR

CVE-2019-13956 is a remote code execution vulnerability in Discuz!ML multilingual forum software. Attackers can execute arbitrary PHP code by manipulating the language cookie parameter, potentially taking full control of affected systems. All Discuz!ML installations versions 3.2 through 3.4 are vulnerable.

💻 Affected Systems

Products:
  • Discuz!ML
Versions: 3.2 through 3.4
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable; the random cookie prefix mentioned in the description varies per installation but doesn't prevent exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, install backdoors, steal data, pivot to internal networks, and maintain persistent access.

🟠

Likely Case

Webshell deployment leading to data theft, defacement, or use as part of a botnet for further attacks.

🟢

If Mitigated

Limited impact if proper web application firewalls, input validation, and network segmentation are implemented.

🌐 Internet-Facing: HIGH - Exploitation requires only HTTP access and no authentication, making internet-facing instances extremely vulnerable.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable but require network access; risk depends on internal segmentation.

🎯 Exploit Status

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

Exploitation is trivial with publicly available proof-of-concept code; attackers only need to modify a cookie value in HTTP requests.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 3.5 or later

Vendor Advisory: http://esoln.net/esoln/blog/2019/06/14/discuzml-v-3-x-code-injection-vulnerability/

Restart Required: No

Instructions:

1. Download Discuz!ML version 3.5 or later from the official source. 2. Backup your current installation and database. 3. Replace all files with the patched version. 4. Verify the language cookie handling is properly sanitized.

🔧 Temporary Workarounds

Web Application Firewall Rule

all

Block malicious language cookie patterns at the WAF level

Add WAF rule to detect and block cookie values containing PHP code patterns like '.phpinfo().' or suspicious characters

Input Validation Patch

all

Manually patch the vulnerable cookie handling code

Locate the language cookie processing code and add proper input validation/sanitization before use

🧯 If You Can't Patch

  • Implement strict web application firewall rules to block malicious cookie patterns
  • Isolate the vulnerable system in a segmented network with strict outbound traffic controls

🔍 How to Verify

Check if Vulnerable:

Test by sending a modified language cookie with PHP code (e.g., en'.phpinfo().') and checking if code executes

Check Version:

Check the Discuz!ML version in the admin panel or by examining the source code files

Verify Fix Applied:

After patching, repeat the test; code execution should be prevented and proper error handling should occur

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests with language cookies containing PHP code patterns
  • Unusual file creation/modification in web directories
  • Webshell access patterns in access logs

Network Indicators:

  • Outbound connections from web server to suspicious IPs
  • Unusual HTTP POST requests with encoded payloads

SIEM Query:

web_access_logs WHERE cookie CONTAINS '.phpinfo().' OR cookie CONTAINS suspicious PHP functions

🔗 References

📤 Share & Export