CVE-2017-20029
📋 TL;DR
This SQL injection vulnerability in PHPList allows attackers to manipulate database queries through the Edit Subscription component. It affects PHPList 3.2.6 installations, potentially enabling unauthorized data access or modification. Remote attackers can exploit this without authentication to compromise the application database.
💻 Affected Systems
- PHPList
📦 What is this software?
Phplist by Phplist
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including user data theft, administrative account takeover, and potential server compromise via SQL injection to execute arbitrary commands.
Likely Case
Unauthorized access to subscriber data, email lists, and potentially administrative credentials stored in the database.
If Mitigated
Limited impact with proper input validation and database permissions, potentially only allowing read access to non-sensitive data.
🎯 Exploit Status
Exploit details were publicly disclosed in March 2017. The vulnerability is remotely exploitable without authentication.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.3.1
Vendor Advisory: https://www.phplist.org/newslist/phplist-3-3-1-release-notes/
Restart Required: No
Instructions:
1. Backup your PHPList database and files. 2. Download PHPList 3.3.1 or later from the official website. 3. Replace the existing installation with the new version. 4. Verify the upgrade completed successfully.
🔧 Temporary Workarounds
Input Validation Filter
allAdd input validation to filter SQL injection attempts in the Edit Subscription component
# Requires modifying /lists/index.php to sanitize user inputs
Web Application Firewall
allDeploy WAF rules to block SQL injection patterns targeting /lists/index.php
# Example ModSecurity rule: SecRule ARGS "@detectSQLi" "id:1001,phase:2,deny,status:403"
🧯 If You Can't Patch
- Restrict network access to PHPList administration interface using firewall rules
- Implement database user with minimal permissions (read-only where possible)
🔍 How to Verify
Check if Vulnerable:
Check PHPList version in admin interface or examine /lists/index.php file modification dates
Check Version:
grep -r 'define.*VERSION' /path/to/phplist/ or check admin dashboard
Verify Fix Applied:
Verify PHPList version is 3.3.1 or later and test Edit Subscription functionality
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries in database logs
- Multiple failed login attempts followed by SQL error messages
- Access to /lists/index.php with SQL injection patterns in parameters
Network Indicators:
- HTTP requests to /lists/index.php containing SQL keywords (UNION, SELECT, etc.)
- Unusual database connection patterns from web server
SIEM Query:
source="web_logs" AND uri="/lists/index.php" AND (query="*UNION*" OR query="*SELECT*" OR query="*INSERT*")