CVE-2023-37682

9.8 CRITICAL

📋 TL;DR

Judging Management System v1.0 contains a SQL injection vulnerability in the deductScores.php endpoint via the id parameter. This allows attackers to execute arbitrary SQL commands on the database. Any organization using this specific software version is affected.

💻 Affected Systems

Products:
  • Judging Management System
Versions: v1.0
Operating Systems: Any OS running PHP and MySQL
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the specific version from sourcecodester.com; custom deployments may vary.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, or remote code execution via database functions.

🟠

Likely Case

Unauthorized data access, modification of judging scores, and potential privilege escalation.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to non-critical data.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

SQL injection via GET/POST parameter is straightforward to exploit with common tools like sqlmap.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

No official patch available. Consider manual code fixes or replacing the software.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add parameterized queries or input validation to deductScores.php to sanitize the id parameter.

Modify /php-jms/deductScores.php to use prepared statements with PDO or mysqli.

Web Application Firewall (WAF)

all

Deploy a WAF to block SQL injection patterns targeting the vulnerable endpoint.

Configure WAF rules to block requests containing SQL keywords to /php-jms/deductScores.php.

🧯 If You Can't Patch

  • Restrict network access to the application to trusted IPs only.
  • Implement database user permissions with least privilege to limit potential damage.

🔍 How to Verify

Check if Vulnerable:

Test the /php-jms/deductScores.php endpoint with SQL injection payloads (e.g., id=1' OR '1'='1).

Check Version:

Check the software version in documentation or source code files.

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and that input is properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs, multiple requests to deductScores.php with suspicious parameters.

Network Indicators:

  • HTTP requests to /php-jms/deductScores.php containing SQL keywords like UNION, SELECT, or OR.

SIEM Query:

source="web_logs" AND uri="/php-jms/deductScores.php" AND (param="*id=*'*" OR param="*id=* OR *" OR param="*id=* UNION *")

🔗 References

📤 Share & Export