CVE-2021-36503

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in native-php-cms 1.0 allows remote attackers to execute arbitrary SQL commands through the cat parameter in /list.php. Attackers can potentially read, modify, or delete database content, and in some cases achieve remote code execution. Any organization running native-php-cms 1.0 with the vulnerable /list.php endpoint exposed is affected.

💻 Affected Systems

Products:
  • native-php-cms
Versions: 1.0
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation when /list.php is accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, and potential remote code execution on the database server.

🟠

Likely Case

Unauthorized data access, data manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - The vulnerability is exploitable via HTTP requests to a public endpoint without authentication.
🏢 Internal Only: MEDIUM - Still exploitable by internal users or attackers who gain internal network access.

🎯 Exploit Status

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

SQL injection via URL parameter is straightforward to exploit with common tools like sqlmap.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

1. Replace vulnerable code with parameterized queries or prepared statements. 2. Implement proper input validation for the cat parameter. 3. Sanitize all user inputs before database interaction.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rule

all

Block SQL injection patterns targeting the cat parameter in /list.php

WAF-specific configuration required

Input Validation Filter

all

Add server-side validation to reject malicious cat parameter values

Modify /list.php to validate cat parameter against allowed values

🧯 If You Can't Patch

  • Block external access to /list.php using firewall rules or web server configuration
  • Implement network segmentation to isolate the vulnerable system from sensitive data

🔍 How to Verify

Check if Vulnerable:

Test /list.php?cat=1' OR '1'='1 to see if SQL error appears or unexpected behavior occurs

Check Version:

Check CMS version in configuration files or admin panel

Verify Fix Applied:

Test with SQL injection payloads and verify they are rejected or properly handled

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /list.php with SQL-like patterns in parameters

Network Indicators:

  • HTTP requests to /list.php containing SQL keywords in cat parameter
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND uri="/list.php" AND (param="cat" AND value MATCHES "(?i)(union|select|insert|update|delete|drop|alter|exec|--|#|;)")

🔗 References

📤 Share & Export