CVE-2022-21666
📋 TL;DR
This SQL injection vulnerability in USOC CMS allows authenticated administrators to execute arbitrary SQL commands through the usersearch.php functionality. Only users with administrative privileges can exploit this vulnerability, but it could lead to complete database compromise. The issue affects USOC versions prior to Pb2.4Bfx3.
💻 Affected Systems
- Useful Simple Open-Source CMS (USOC)
📦 What is this software?
Useful Simple Open Source Cms by Useful Simple Open Source Cms Project
⚠️ Risk & Real-World Impact
Worst Case
Administrator account compromise leading to full database access, data exfiltration, privilege escalation, or complete system takeover through SQL injection.
Likely Case
Unauthorized database access allowing data theft, modification of user accounts, or privilege escalation within the CMS.
If Mitigated
Limited impact due to administrative-only access requirement, but still poses risk of data breach if admin credentials are compromised.
🎯 Exploit Status
Requires administrative credentials. SQL injection in usersearch.php parameter.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Pb2.4Bfx3
Vendor Advisory: https://github.com/Aaron-Junker/USOC/security/advisories/GHSA-557p-hhpc-4wrx
Restart Required: No
Instructions:
1. Upgrade to USOC version Pb2.4Bfx3 or later. 2. Alternatively, replace the vulnerable file admin/pages/useredit.php with the fixed version from the Pb2.4Bfx3 release.
🔧 Temporary Workarounds
File Replacement Workaround
linuxReplace vulnerable useredit.php file with patched version without full upgrade
wget https://raw.githubusercontent.com/Aaron-Junker/USOC/Pb2.4Bfx3/admin/pages/useredit.php -O /path/to/usoc/admin/pages/useredit.php
Access Restriction
allRestrict access to admin interface to trusted IP addresses only
🧯 If You Can't Patch
- Implement strict network segmentation to isolate USOC admin interface
- Enforce strong authentication and monitor admin account activity
🔍 How to Verify
Check if Vulnerable:
Check USOC version in admin panel or examine useredit.php file modification date against patch release date.
Check Version:
Check USOC version in admin dashboard or examine version files in installation directory
Verify Fix Applied:
Verify file hash of admin/pages/useredit.php matches the fixed version from Pb2.4Bfx3 release.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries in database logs
- Multiple failed login attempts to admin interface
- Suspicious parameter values in usersearch.php requests
Network Indicators:
- SQL injection patterns in HTTP requests to usersearch.php
- Unusual database connection patterns from web server
SIEM Query:
web.url:*usersearch.php* AND (web.param:*OR* OR web.param:*UNION* OR web.param:*SELECT*)
🔗 References
- https://github.com/Aaron-Junker/USOC/commit/c331d26aaab41a7e9e8c1c1a990132dca9d01e10
- https://github.com/Aaron-Junker/USOC/releases/tag/Pb2.4Bfx3
- https://github.com/Aaron-Junker/USOC/security/advisories/GHSA-557p-hhpc-4wrx
- https://github.com/Aaron-Junker/USOC/commit/c331d26aaab41a7e9e8c1c1a990132dca9d01e10
- https://github.com/Aaron-Junker/USOC/releases/tag/Pb2.4Bfx3
- https://github.com/Aaron-Junker/USOC/security/advisories/GHSA-557p-hhpc-4wrx