CVE-2024-5122
📋 TL;DR
This critical SQL injection vulnerability in SourceCodester Event Registration System 1.0 allows attackers to execute arbitrary SQL commands via the 'search' parameter in the /registrar/ endpoint. Attackers can potentially access, modify, or delete database content, including sensitive user information. Any organization using this vulnerable software is affected.
💻 Affected Systems
- SourceCodester Event Registration System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise leading to data theft, data destruction, authentication bypass, and potential remote code execution if database permissions allow.
Likely Case
Unauthorized data access and extraction of sensitive information like user credentials, personal data, and event registration details.
If Mitigated
Limited impact with proper input validation, parameterized queries, and database permission restrictions in place.
🎯 Exploit Status
Public exploit code available on GitHub, making exploitation trivial for attackers with basic SQL injection knowledge.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None available
Restart Required: No
Instructions:
No official patch available. Consider migrating to alternative software or implementing custom fixes with parameterized queries and input validation.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy WAF rules to block SQL injection patterns targeting the /registrar/ endpoint search parameter.
Input Validation Filter
allImplement server-side input validation to sanitize the search parameter before processing.
🧯 If You Can't Patch
- Isolate the system behind a reverse proxy with strict input filtering
- Implement network segmentation to limit database access from the application server
🔍 How to Verify
Check if Vulnerable:
Test the /registrar/ endpoint with SQL injection payloads in the search parameter (e.g., search=' OR '1'='1).
Check Version:
Check application version in admin panel or configuration files.
Verify Fix Applied:
Verify that SQL injection payloads no longer execute and return error messages or are properly sanitized.
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL error messages in application logs
- Multiple rapid requests to /registrar/ with suspicious parameters
Network Indicators:
- HTTP requests containing SQL keywords (SELECT, UNION, etc.) in search parameter
SIEM Query:
source="web_logs" AND uri_path="/registrar/" AND (query_string="*SELECT*" OR query_string="*UNION*" OR query_string="*OR*1*1*")
🔗 References
- https://github.com/BurakSevben/CVEs/blob/main/Event%20Registration%20System/Event%20Registration%20System%20-%20SQL%20Injection%20-%204.md
- https://vuldb.com/?ctiid.265202
- https://vuldb.com/?id.265202
- https://vuldb.com/?submit.338615
- https://github.com/BurakSevben/CVEs/blob/main/Event%20Registration%20System/Event%20Registration%20System%20-%20SQL%20Injection%20-%204.md
- https://vuldb.com/?ctiid.265202
- https://vuldb.com/?id.265202
- https://vuldb.com/?submit.338615