CVE-2024-10501

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in ESAFENET CDG 5 allows remote attackers to execute arbitrary SQL commands by manipulating the 'id' parameter in the findById function. This can lead to unauthorized data access, modification, or deletion. All users running vulnerable versions of ESAFENET CDG 5 are affected.

💻 Affected Systems

Products:
  • ESAFENET CDG 5
Versions: All versions up to the vulnerable version
Operating Systems: Any OS running Java applications
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the Java servlet component and affects all deployments using the vulnerable code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized access to sensitive data stored in the database, including user credentials, personal information, and system configuration.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details have been publicly disclosed, making weaponization straightforward for attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: Yes

Instructions:

1. Contact ESAFENET for patch information. 2. If no patch available, implement workarounds. 3. Monitor vendor communications for updates.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement strict input validation for the 'id' parameter to only accept expected values

Implement parameterized queries in ExamCDGDocService.java
Add input validation: if (!id.matches("^[0-9]+$")) { throw new IllegalArgumentException(); }

WAF Rule

all

Deploy web application firewall rules to block SQL injection patterns

Configure WAF to block requests containing SQL keywords in the id parameter
Implement rate limiting on /com/esafenet/servlet/document/ExamCDGDocService endpoints

🧯 If You Can't Patch

  • Isolate the vulnerable system behind a reverse proxy with strict input validation
  • Implement network segmentation to limit database access from the application server

🔍 How to Verify

Check if Vulnerable:

Test the findById endpoint with SQL injection payloads like: id=1' OR '1'='1

Check Version:

Check application version through admin interface or configuration files

Verify Fix Applied:

Verify that SQL injection payloads no longer work and that parameterized queries are implemented

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests with SQL keywords in parameters
  • Requests to /com/esafenet/servlet/document/ExamCDGDocService with suspicious id values

Network Indicators:

  • Unusual database connection patterns from application server
  • Large data transfers from database to external IPs

SIEM Query:

source="application.log" AND ("SQL" OR "syntax" OR "union" OR "select") AND uri="/com/esafenet/servlet/document/ExamCDGDocService"

🔗 References

📤 Share & Export