CVE-2019-11039

9.1 CRITICAL

📋 TL;DR

This vulnerability in PHP's iconv_mime_decode_headers() function allows attackers to trigger an integer overflow leading to out-of-bounds memory reads. This can cause information disclosure or application crashes. It affects PHP applications running vulnerable versions that process MIME headers.

💻 Affected Systems

Products:
  • PHP
Versions: PHP 7.1.x below 7.1.30, 7.2.x below 7.2.19, 7.3.x below 7.3.6
Operating Systems: All operating systems running affected PHP versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when applications use iconv_mime_decode_headers() function to parse MIME headers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution through memory corruption leading to complete system compromise, though this requires specific memory layout conditions.

🟠

Likely Case

Information disclosure through memory reads (potentially exposing sensitive data) or denial of service through application crashes.

🟢

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: MEDIUM

Exploitation requires triggering the vulnerable function with specially crafted MIME headers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: PHP 7.1.30, 7.2.19, 7.3.6 or later

Vendor Advisory: https://bugs.php.net/bug.php?id=78069

Restart Required: Yes

Instructions:

1. Update PHP to patched version using your package manager (apt-get upgrade php, yum update php, etc.) 2. Restart web server (apache2 restart, systemctl restart nginx) 3. Verify PHP version with php -v

🔧 Temporary Workarounds

Disable vulnerable function

all

Disable or avoid using iconv_mime_decode_headers() function in application code

Input validation

all

Implement strict input validation for MIME headers before processing

🧯 If You Can't Patch

  • Implement WAF rules to block malicious MIME headers
  • Isolate vulnerable systems behind reverse proxies with input filtering

🔍 How to Verify

Check if Vulnerable:

Check PHP version with php -v and compare against affected versions

Check Version:

php -v | grep "PHP"

Verify Fix Applied:

Verify PHP version is 7.1.30+, 7.2.19+, or 7.3.6+

📡 Detection & Monitoring

Log Indicators:

  • Application crashes in PHP error logs
  • Unusual memory access patterns

Network Indicators:

  • Malformed MIME headers in HTTP requests

SIEM Query:

source="php_error.log" AND ("segmentation fault" OR "out of bounds" OR "memory corruption")

🔗 References

📤 Share & Export