CVE-2019-9020

9.8 CRITICAL

📋 TL;DR

This vulnerability in PHP's xmlrpc_decode() function allows attackers to trigger invalid memory access (heap out-of-bounds read or read-after-free) by providing malicious input. This can potentially lead to information disclosure, denial of service, or remote code execution. Affects PHP applications using the XML-RPC extension across multiple PHP versions.

💻 Affected Systems

Products:
  • PHP
Versions: PHP <5.6.40, 7.x <7.1.26, 7.2.x <7.2.14, 7.3.x <7.3.1
Operating Systems: All operating systems running affected PHP versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires XML-RPC extension to be enabled (not enabled by default in all PHP installations).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Denial of service causing application crashes or information disclosure through memory leaks.

🟢

If Mitigated

Limited impact with proper input validation and memory protection mechanisms in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires sending specially crafted XML-RPC requests to vulnerable endpoints.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: PHP 5.6.40, 7.1.26, 7.2.14, 7.3.1

Vendor Advisory: https://www.php.net/ChangeLog-7.php#7.3.1

Restart Required: Yes

Instructions:

1. Identify PHP version (php -v). 2. Update PHP using your package manager (apt-get update && apt-get upgrade php for Debian/Ubuntu, yum update php for RHEL/CentOS). 3. Restart web server (systemctl restart apache2/nginx). 4. Verify update with php -v.

🔧 Temporary Workarounds

Disable XML-RPC Extension

all

Remove or disable the XML-RPC extension if not required.

php -m | grep xmlrpc
comment out 'extension=xmlrpc.so' in php.ini
restart web server

Input Validation Filter

all

Implement strict input validation for XML-RPC endpoints.

🧯 If You Can't Patch

  • Implement WAF rules to block malicious XML-RPC requests
  • Isolate vulnerable systems behind network segmentation

🔍 How to Verify

Check if Vulnerable:

Check PHP version with 'php -v' and compare against affected versions. Check if XML-RPC extension is loaded with 'php -m | grep xmlrpc'.

Check Version:

php -v | head -1

Verify Fix Applied:

Confirm PHP version is updated to patched version with 'php -v'. Test XML-RPC functionality with valid requests.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed XML-RPC requests
  • Application crashes in PHP error logs
  • Unusual memory usage patterns

Network Indicators:

  • Malformed XML-RPC POST requests to /xmlrpc.php endpoints
  • Unusual traffic to XML-RPC services

SIEM Query:

source="php_error.log" AND ("xmlrpc" OR "heap" OR "memory")

🔗 References

📤 Share & Export