CVE-2019-7731

9.8 CRITICAL

📋 TL;DR

MyWebSQL 3.7 has a remote code execution vulnerability where attackers can write PHP shell code into a database, then trigger the Backup Database function with a .php filename extension. This allows execution of arbitrary code on the server. Anyone running MyWebSQL 3.7 without proper security controls is affected.

💻 Affected Systems

Products:
  • MyWebSQL
Versions: Version 3.7 specifically
Operating Systems: Any OS running MyWebSQL
Default Config Vulnerable: ⚠️ Yes
Notes: Requires database write access and backup functionality access. Default installations are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise leading to data theft, lateral movement, ransomware deployment, or complete system takeover.

🟠

Likely Case

Webshell installation allowing persistent access, data exfiltration, and further exploitation of the server environment.

🟢

If Mitigated

Limited impact with proper network segmentation, file upload restrictions, and web application firewalls blocking malicious requests.

🌐 Internet-Facing: HIGH - Directly accessible web application with RCE vulnerability poses critical risk.
🏢 Internal Only: HIGH - Even internally, RCE allows attackers to pivot and compromise other systems.

🎯 Exploit Status

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

Exploit requires database write permissions. Attack chain involves writing PHP code to database then triggering backup with .php extension.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Update to MyWebSQL version after 3.7

Vendor Advisory: https://github.com/samnan/MyWebSQL

Restart Required: No

Instructions:

1. Download latest MyWebSQL version from official repository. 2. Replace existing installation files. 3. Verify backup functionality no longer accepts .php extensions.

🔧 Temporary Workarounds

Disable Backup Functionality

all

Remove or restrict access to database backup feature

# Remove backup.php or restrict via .htaccess

File Extension Restriction

all

Configure web server to block .php file execution from backup directory

# Apache: <Files "*.php"> Deny from all </Files>
# Nginx: location ~ \.php$ { deny all; }

🧯 If You Can't Patch

  • Network segmentation: Isolate MyWebSQL server from critical systems
  • Implement WAF rules to block suspicious backup requests and file uploads

🔍 How to Verify

Check if Vulnerable:

Check if running MyWebSQL 3.7 and test if backup function accepts .php extensions

Check Version:

Check MyWebSQL version in interface or read version.txt file

Verify Fix Applied:

Attempt to trigger backup with .php extension - should be rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual database write operations followed by backup requests
  • Backup requests with .php file extensions
  • PHP file creation in backup directories

Network Indicators:

  • POST requests to backup.php with suspicious parameters
  • Unexpected file uploads to backup locations

SIEM Query:

source="web.log" (backup.php AND ".php") OR ("PUT" AND "/backup/")

🔗 References

📤 Share & Export