CVE-2021-42235
📋 TL;DR
This SQL injection vulnerability in osTicket's login and password reset functionality allows attackers to execute arbitrary SQL commands. It affects all osTicket installations before versions 1.14.8 and 1.15.4, potentially enabling unauthorized access to administration profiles.
💻 Affected Systems
- osTicket
📦 What is this software?
Osticket by Enhancesoft
Osticket by Enhancesoft
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the osTicket database, allowing attackers to steal sensitive ticket data, user credentials, and potentially gain administrative control over the entire system.
Likely Case
Unauthorized access to administration functionality, allowing attackers to view, modify, or delete tickets, user accounts, and system settings.
If Mitigated
Limited impact with proper input validation and parameterized queries preventing SQL injection, though authentication bypass may still be possible.
🎯 Exploit Status
SQL injection vulnerabilities in authentication systems are commonly exploited. The public commit shows the specific vulnerable code paths.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.14.8 or 1.15.4
Vendor Advisory: https://github.com/osTicket/osTicket/commit/e28291022e662ffa754e170c09cade7bdadf3fd9
Restart Required: No
Instructions:
1. Backup your osTicket installation and database. 2. Download osTicket version 1.14.8 or 1.15.4 from the official repository. 3. Replace all files with the patched version. 4. Verify the installation works correctly.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy a WAF with SQL injection protection rules to block exploitation attempts.
Input Validation Filter
allImplement custom input validation for login and password reset fields to reject SQL injection patterns.
🧯 If You Can't Patch
- Implement network segmentation to isolate osTicket from critical systems
- Enable detailed logging and monitoring for SQL injection attempts on login/password reset endpoints
🔍 How to Verify
Check if Vulnerable:
Check your osTicket version in the admin panel or by examining the include/ost-config.php file version information.
Check Version:
grep -i 'version' include/ost-config.php || check Admin Panel > System Information
Verify Fix Applied:
After patching, verify the version shows 1.14.8 or higher (for 1.14.x branch) or 1.15.4 or higher (for 1.15.x branch). Test login and password reset functionality.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries in database logs
- Failed login attempts with SQL syntax in username/password fields
- Multiple password reset requests from single IP
Network Indicators:
- HTTP POST requests to login.php or pwreset.php containing SQL keywords (UNION, SELECT, etc.)
- Unusual traffic patterns to authentication endpoints
SIEM Query:
source="osticket.logs" AND ("login.php" OR "pwreset.php") AND ("UNION" OR "SELECT" OR "' OR '1'='1")