CVE-2017-17779
📋 TL;DR
CVE-2017-17779 is a SQL injection vulnerability in Paid To Read Script 2.0.5 that allows attackers to execute arbitrary SQL commands via the referrals.php id parameter. This affects all websites running this specific version of the script, potentially compromising the entire database.
💻 Affected Systems
- Paid To Read Script
📦 What is this software?
Paid To Read Script by Paid To Read Script Project
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution through database functions.
Likely Case
Database information disclosure, including user credentials, payment information, and sensitive business data.
If Mitigated
Limited impact with proper input validation and parameterized queries in place.
🎯 Exploit Status
SQL injection via GET parameter makes exploitation trivial with standard SQLi tools. Public proof-of-concept exists in the GitHub references.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None available
Restart Required: No
Instructions:
1. Check if you're running Paid To Read Script 2.0.5
2. Replace vulnerable referrals.php file with patched version if available
3. Implement parameterized queries in all database interactions
4. Update to latest version if newer exists
🔧 Temporary Workarounds
Input Validation Filter
allAdd input validation to sanitize the id parameter before processing
Edit referrals.php and add: $id = intval($_GET['id']); before SQL query
WAF Rule
allImplement web application firewall rules to block SQL injection patterns
ModSecurity rule: SecRule ARGS_GET:id "@detectSQLi" "id:1001,phase:2,deny"
🧯 If You Can't Patch
- Disable or remove referrals.php file if not essential
- Implement network-level blocking to restrict access to vulnerable endpoint
🔍 How to Verify
Check if Vulnerable:
Check if referrals.php exists and examine version in script headers or configuration files. Test with SQL injection payload: referrals.php?id=1' OR '1'='1
Check Version:
grep -r 'version\|Version' /path/to/paid-to-read-script/ | grep -i '2.0.5'
Verify Fix Applied:
Test with SQL injection payloads after applying fixes. Use automated SQLi scanners or manual testing with error-based payloads.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in web server logs
- Multiple requests to referrals.php with SQL syntax in parameters
- Database error messages containing SQL fragments
Network Indicators:
- HTTP requests to referrals.php with SQL keywords (UNION, SELECT, etc.) in parameters
- Abnormal database query patterns from web server
SIEM Query:
source="web_logs" AND uri="*referrals.php*" AND (param="*id=*'*" OR param="*id=*%27*")