Skip to main content

CVE-2025-1158: ESAFENET CDG SQL Injection Vulnerability

CVE-2025-1158 is a critical SQL injection vulnerability in ESAFENET CDG that allows remote attackers to manipulate database queries. This article covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-1158 Overview

CVE-2025-1158 is a SQL injection vulnerability in ESAFENET CDG version 5.6.3.154.205_20250114. The flaw resides in the addPolicyToSafetyGroup.jsp endpoint, where the safetyGroupId parameter is passed to a database query without proper sanitization. Attackers can exploit the issue remotely over the network with low-privileged authentication. The vulnerability maps to [CWE-74] (improper neutralization of special elements in output). Public exploit details have been disclosed, and the vendor did not respond to the disclosure attempt. The weakness allows unauthorized read, modification, or deletion of data stored in the backend database used by the CDG document security product.

Critical Impact

Authenticated remote attackers can inject arbitrary SQL through the safetyGroupId parameter, exposing or altering sensitive data within the ESAFENET CDG database.

Affected Products

  • ESAFENET CDG 5.6.3.154.205_20250114
  • Component: addPolicyToSafetyGroup.jsp
  • Parameter: safetyGroupId

Discovery Timeline

  • 2025-02-10 - CVE-2025-1158 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-1158

Vulnerability Analysis

The vulnerability exists in the addPolicyToSafetyGroup.jsp server-side script of ESAFENET CDG. The script accepts a safetyGroupId request parameter and concatenates it into a backend SQL statement without parameterized queries or input validation. An attacker holding a low-privilege session can submit crafted input that modifies the structure of the SQL statement.

Successful exploitation permits data extraction, authentication-related record tampering, or deletion of policy data governing the document security groups. Because ESAFENET CDG manages document encryption policies, altered policy records can weaken downstream data-loss prevention controls. The exploit has been publicly disclosed through a VulDB submission and a GitHub proof-of-concept writeup, increasing the probability of opportunistic abuse.

Root Cause

The root cause is improper neutralization of special characters passed through the safetyGroupId HTTP parameter. The JSP page builds a dynamic SQL query by string concatenation instead of binding parameters through prepared statements. Any single-quote, boolean operator, or UNION keyword supplied by the caller is interpreted as part of the query.

Attack Vector

The attack is executed remotely over HTTP against the ESAFENET CDG management interface. The attacker authenticates with a low-privileged account and issues a crafted request to addPolicyToSafetyGroup.jsp containing a malicious safetyGroupId value. The injected clause runs under the privileges of the application database user and returns results in the HTTP response or through boolean/time-based inference. Technical reproduction steps are documented in the public GitHub Policy Addition Guide and the VulDB entry #295062.

Detection Methods for CVE-2025-1158

Indicators of Compromise

  • HTTP requests to addPolicyToSafetyGroup.jsp containing SQL metacharacters such as ', --, UNION, SLEEP(, or OR 1=1 in the safetyGroupId parameter.
  • Unusually long or URL-encoded safetyGroupId values that deviate from numeric identifiers normally issued by the application.
  • Database error messages, stack traces, or extended response times correlating with requests to the vulnerable endpoint.

Detection Strategies

  • Deploy web application firewall (WAF) signatures that match SQL injection patterns targeting the addPolicyToSafetyGroup.jsp path.
  • Enable database query logging and alert on unexpected statements originating from the CDG application account, especially those referencing information_schema or system tables.
  • Correlate authentication logs with abnormal request volume to the policy management endpoints to identify low-privileged accounts probing the parameter.

Monitoring Recommendations

  • Forward CDG application and database logs to a centralized analytics platform for continuous review.
  • Monitor outbound connections from the CDG server for signs of data exfiltration following suspicious requests.
  • Baseline normal values of safetyGroupId and alert on non-numeric or oversized submissions.

How to Mitigate CVE-2025-1158

Immediate Actions Required

  • Restrict network access to the ESAFENET CDG management interface so that only trusted administrative networks can reach addPolicyToSafetyGroup.jsp.
  • Revoke or rotate credentials for low-privileged CDG accounts that could be used to reach the vulnerable endpoint.
  • Enable WAF rules that block SQL injection payloads targeting the safetyGroupId parameter.

Patch Information

No vendor patch is available. According to the disclosure, ESAFENET was contacted but did not respond. Monitor the vendor website and the VulDB entry #295062 for future updates and apply any security release as soon as it is published.

Workarounds

  • Place the CDG console behind a reverse proxy or VPN that enforces strong authentication and strict parameter validation.
  • Configure the application database account with the minimum privileges required so that any successful injection cannot escalate to administrative database operations.
  • Add virtual patching rules at the WAF to reject non-numeric safetyGroupId values until a vendor fix is released.
bash
# Example ModSecurity rule to block non-numeric safetyGroupId values
SecRule REQUEST_URI "@contains addPolicyToSafetyGroup.jsp" \
    "chain,phase:2,deny,status:403,id:1000158,msg:'CVE-2025-1158 SQLi attempt'"
    SecRule ARGS:safetyGroupId "!@rx ^[0-9]+$" "t:none"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.