CVE-2018-12055

9.8 CRITICAL

📋 TL;DR

CVE-2018-12055 is a critical SQL injection vulnerability in PHP Scripts Mall Schools Alert Management Script that allows attackers to execute arbitrary SQL commands via crafted POST data to multiple PHP files. This affects all deployments of the vulnerable script version, potentially compromising the entire database. Attackers can steal, modify, or delete sensitive school data including student records, staff information, and system credentials.

💻 Affected Systems

Products:
  • PHP Scripts Mall Schools Alert Management Script
Versions: All versions prior to patch (specific version unknown)
Operating Systems: Any OS running PHP (Linux, Windows, etc.)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects multiple PHP files including contact_us.php, faq.php, about.php, photo_gallery.php, privacy.php. Requires PHP environment with database connectivity.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, authentication bypass, and potential remote code execution via database functions.

🟠

Likely Case

Unauthenticated attackers exfiltrating sensitive student and staff data, modifying records, or gaining administrative access to the system.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database permissions restricting damage to non-sensitive data.

🌐 Internet-Facing: HIGH - The vulnerable PHP files are typically internet-facing web pages accessible without authentication.
🏢 Internal Only: MEDIUM - Internal attackers could exploit this if they have network access to the web server, though external exposure is more likely.

🎯 Exploit Status

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

Public exploit code available on Exploit-DB and GitHub. Simple POST requests with SQL injection payloads can trigger the vulnerability without authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown specific version - check with PHP Scripts Mall vendor

Vendor Advisory: No official vendor advisory URL found in references

Restart Required: No

Instructions:

1. Contact PHP Scripts Mall for patched version. 2. Replace vulnerable PHP files with patched versions. 3. Implement parameterized queries in all database interactions. 4. Add input validation and sanitization for all user inputs.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns in POST requests to vulnerable PHP files.

Input Validation Filter

linux

Add PHP input validation filters to sanitize POST data before processing.

// Add to vulnerable PHP files:
// $input = filter_input(INPUT_POST, 'parameter', FILTER_SANITIZE_STRING);
// Use prepared statements: $stmt = $pdo->prepare('SELECT * FROM table WHERE column = ?');
// $stmt->execute([$input]);

🧯 If You Can't Patch

  • Block external access to vulnerable PHP files via web server configuration or firewall rules
  • Implement strict database user permissions with minimal privileges required for application functionality

🔍 How to Verify

Check if Vulnerable:

Test POST requests to contact_us.php, faq.php, about.php with SQL injection payloads like ' OR '1'='1 and monitor database responses.

Check Version:

Check script version in admin panel or configuration files. No standard command available.

Verify Fix Applied:

Attempt SQL injection attacks against patched files and verify they return error messages or sanitized responses instead of executing SQL.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to vulnerable PHP files with SQL keywords (SELECT, UNION, INSERT, etc.)
  • Multiple failed login attempts or database errors in web server logs
  • Unexpected database queries from web application user

Network Indicators:

  • POST requests containing SQL injection patterns to /contact_us.php, /faq.php, etc.
  • Unusual database traffic patterns from web server

SIEM Query:

source="web_server.log" AND (uri="/contact_us.php" OR uri="/faq.php" OR uri="/about.php") AND (message="*SELECT*" OR message="*UNION*" OR message="*INSERT*")

🔗 References

📤 Share & Export