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-2024-2645 Overview
CVE-2024-2645 is an XPath injection vulnerability in Netentsec NS-ASG Application Security Gateway 6.3. The flaw resides in the /vpnweb/resetpwd/resetpwd.php password reset endpoint. Attackers can manipulate the UserId parameter to inject XPath expressions that the application evaluates without proper neutralization [CWE-643, CWE-91]. The attack requires no authentication and can be launched remotely over the network. The vendor was contacted but did not respond, and the exploit has been publicly disclosed through the GitHub PoC Repository and tracked as VulDB #257283.
Critical Impact
Remote attackers can inject XPath expressions through the password reset form to manipulate backend XML queries and access unintended data records without authentication.
Affected Products
- Netentsec NS-ASG Application Security Gateway 6.3
- The /vpnweb/resetpwd/resetpwd.php password reset component
- Deployments exposing the VPN web portal to untrusted networks
Discovery Timeline
- 2024-03-19 - CVE-2024-2645 published to NVD with public proof-of-concept disclosure
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-2645
Vulnerability Analysis
The vulnerability is an XPath injection flaw in the password reset workflow of the NS-ASG Application Security Gateway. The resetpwd.php script accepts a UserId parameter from the client and embeds it into an XPath expression used to query backend XML data. Because the input is not sanitized or parameterized, attackers can break out of the intended query context and inject arbitrary XPath syntax.
Successful exploitation allows an unauthenticated attacker to alter the logic of the XPath query. This can enable enumeration of user records, extraction of stored credentials or password reset tokens, and bypass of the intended lookup constraints. The impact is scoped to integrity of the query logic and limited information disclosure, consistent with the vendor's failure to acknowledge or patch the report.
Root Cause
The root cause is improper neutralization of data within XPath expressions [CWE-643, CWE-91]. The application concatenates the user-supplied UserId value directly into an XPath query string rather than binding it as a parameter. Any XPath metacharacters submitted by the client are interpreted as query syntax rather than literal data.
Attack Vector
Exploitation proceeds over HTTP or HTTPS against the VPN web portal. An attacker sends a crafted request to /vpnweb/resetpwd/resetpwd.php with a malicious UserId value containing XPath operators such as ' or '1'='1, boolean predicates, or substring() calls used for blind extraction. The backend XPath processor evaluates the manipulated expression and returns results that reveal information or match unintended user records. Full technical details are documented in the GitHub PoC Repository.
No verified sanitized exploitation code is republished here. Refer to the linked proof-of-concept for the exact request structure.
Detection Methods for CVE-2024-2645
Indicators of Compromise
- HTTP requests to /vpnweb/resetpwd/resetpwd.php containing XPath metacharacters in the UserId parameter, including single quotes, or, and, /, //, [, ], or substring(.
- Repeated password reset attempts from a single source IP enumerating different UserId values within short time windows.
- Web server access logs showing anomalously long UserId values or values containing URL-encoded XPath syntax such as %27%20or%20%271%27%3D%271.
Detection Strategies
- Deploy web application firewall rules that inspect the UserId parameter on the resetpwd endpoint for XPath injection patterns and known payload signatures.
- Alert on any successful password reset flow initiated without a preceding legitimate user session or MFA challenge.
- Correlate outbound VPN portal access logs with authentication events to identify reset requests that do not map to a valid user context.
Monitoring Recommendations
- Forward NS-ASG web access logs to a centralized log platform and baseline normal UserId value formats to flag deviations.
- Monitor for spikes in HTTP 200 responses from /vpnweb/resetpwd/resetpwd.php that indicate automated probing.
- Track source IP reputation and geolocation for reset requests, prioritizing review of traffic from anonymization services or foreign networks.
How to Mitigate CVE-2024-2645
Immediate Actions Required
- Restrict network access to the NS-ASG VPN web portal and specifically the /vpnweb/resetpwd/resetpwd.php endpoint using firewall access control lists or reverse proxy allowlists.
- Disable the self-service password reset function if it is not operationally required, forcing resets through an out-of-band administrative process.
- Review authentication and password reset logs for the period since deployment to identify prior exploitation attempts.
Patch Information
No vendor patch is available. The vendor was contacted about this disclosure but did not respond, according to the NVD record and VulDB #257283. Operators should treat the deployment as unsupported for this vulnerability and plan compensating controls or migration to an alternative gateway.
Workarounds
- Place the NS-ASG portal behind a web application firewall configured to block XPath injection payloads targeting the UserId parameter.
- Enforce IP allowlisting so only known corporate networks can reach the VPN password reset endpoint.
- Require multi-factor authentication on any downstream authentication flow so credential recovery alone cannot yield account access.
- Evaluate replacement of the NS-ASG Application Security Gateway 6.3 with a vendor-supported product given the absence of patches.
# Example nginx reverse proxy rule to block the resetpwd endpoint from untrusted sources
location = /vpnweb/resetpwd/resetpwd.php {
allow 10.0.0.0/8;
allow 192.168.0.0/16;
deny all;
}
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

