CVE-2021-36503
📋 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
- native-php-cms
📦 What is this software?
Native Php Cms by Native Php Cms Project
⚠️ 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.
🎯 Exploit Status
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
allBlock SQL injection patterns targeting the cat parameter in /list.php
WAF-specific configuration required
Input Validation Filter
allAdd 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|--|#|;)")