CVE-2019-19634

9.8 CRITICAL

📋 TL;DR

CVE-2019-19634 is an arbitrary file upload vulnerability in verot.net's class.upload.php library that fails to block .pht files, allowing attackers to upload malicious PHP code disguised as HTML files. This affects all applications using class.upload.php versions through 1.0.3 and 2.x through 2.0.4, including the K2 extension for Joomla! and other products that implement this library for file upload functionality.

💻 Affected Systems

Products:
  • verot.net class.upload.php
  • K2 extension for Joomla!
  • Other products using class.upload.php library
Versions: class.upload.php through 1.0.3 and 2.x through 2.0.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using vulnerable versions of class.upload.php for file uploads is affected regardless of platform.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, and lateral movement within the network.

🟠

Likely Case

Webshell deployment allowing persistent access, data exfiltration, and further exploitation of the hosting environment.

🟢

If Mitigated

File upload attempts blocked or quarantined with no code execution.

🌐 Internet-Facing: HIGH - File upload functionality is typically exposed to untrusted users.
🏢 Internal Only: MEDIUM - Still exploitable by authenticated users or through other attack vectors.

🎯 Exploit Status

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

Exploitation requires file upload capability; public proof-of-concept demonstrates simple .pht file upload.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: class.upload.php 2.0.5 and later

Vendor Advisory: https://github.com/verot/class.upload.php/commit/1b9c4c8db81b12a7a2b44b6e8e6d5c9c7f8e3a2d

Restart Required: No

Instructions:

1. Update class.upload.php to version 2.0.5 or later. 2. Replace the vulnerable file with patched version. 3. Test file upload functionality.

🔧 Temporary Workarounds

Web Server Block .pht Files

all

Configure web server to block .pht file extensions from being executed.

For Apache: Add 'AddType text/plain .pht' to .htaccess
For Nginx: Add 'location ~ \.pht$ { deny all; }' to config

Application-Level File Extension Validation

all

Add explicit .pht extension to dangerous file list in application code.

Add '.pht' to $this->file_extensions array in class.upload.php around line 3068

🧯 If You Can't Patch

  • Disable file upload functionality entirely
  • Implement strict file type validation using MIME checking, not just extensions

🔍 How to Verify

Check if Vulnerable:

Check if class.upload.php version is ≤1.0.3 or 2.x ≤2.0.4; examine if .pht is in forbidden extensions list.

Check Version:

grep -n 'class.upload' /path/to/file.php | head -1

Verify Fix Applied:

Verify class.upload.php version is ≥2.0.5; confirm .pht appears in forbidden extensions list.

📡 Detection & Monitoring

Log Indicators:

  • File upload attempts with .pht extension
  • Unexpected file creation in upload directories
  • Web server errors related to .pht file execution

Network Indicators:

  • POST requests to upload endpoints with .pht files
  • Subsequent requests to uploaded .pht files

SIEM Query:

source="web_logs" AND (uri="*.pht" OR user_agent CONTAINS ".pht")

🔗 References

📤 Share & Export