CVE-2019-11036

9.1 CRITICAL

📋 TL;DR

This vulnerability in PHP's EXIF extension allows attackers to cause a buffer over-read when processing certain image files. This can lead to information disclosure or application crashes. It affects PHP applications that process EXIF metadata from uploaded images.

💻 Affected Systems

Products:
  • PHP
Versions: PHP 7.1.x < 7.1.29, 7.2.x < 7.2.18, 7.3.x < 7.3.5
Operating Systems: All operating systems running affected PHP versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires EXIF extension enabled (commonly enabled by default for image processing).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution through memory corruption leading to complete system compromise.

🟠

Likely Case

Information disclosure (memory contents) or denial of service through application crashes.

🟢

If Mitigated

Limited impact with proper input validation and memory protections.

🌐 Internet-Facing: HIGH - PHP applications processing user-uploaded images are common attack vectors.
🏢 Internal Only: MEDIUM - Internal applications may still process malicious images from internal sources.

🎯 Exploit Status

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

Exploitation requires crafting malicious image files with specific EXIF data structures.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: PHP 7.1.29, 7.2.18, 7.3.5 or later

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

Restart Required: Yes

Instructions:

1. Update PHP to patched version using your package manager. 2. Restart web server (Apache/Nginx) and PHP-FPM if used. 3. Verify version with php -v.

🔧 Temporary Workarounds

Disable EXIF extension

all

Temporarily disable the vulnerable EXIF extension if image metadata processing is not required.

php -i | grep exif
Edit php.ini and add: extension=exif.so to ;extension=exif.so
Restart web server

Input validation for image uploads

all

Implement strict file type validation and size limits for uploaded images.

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) rules to block malicious image uploads
  • Isolate PHP applications in containers with limited privileges

🔍 How to Verify

Check if Vulnerable:

Run: php -v and check if version falls within affected ranges. Also check if EXIF extension is enabled: php -m | grep exif

Check Version:

php -v | head -1

Verify Fix Applied:

After patching, verify php -v shows patched version and test with known malicious image samples.

📡 Detection & Monitoring

Log Indicators:

  • PHP segmentation fault errors
  • Memory allocation errors in PHP logs
  • Large number of image upload failures

Network Indicators:

  • Unusual image upload patterns
  • Multiple failed upload attempts with crafted files

SIEM Query:

source="php_error.log" AND ("segmentation fault" OR "buffer over-read" OR "exif_process_IFD_TAG")

🔗 References

📤 Share & Export