CVE-2025-3882 Overview
CVE-2025-3882 is a command injection vulnerability affecting eCharge Hardy Barth cPH2 charging stations. The flaw resides in the nwcheckexec.php endpoint, where the dest parameter is passed to a system call without proper validation. Network-adjacent attackers can exploit this issue without authentication to execute arbitrary commands as the www-data user. The vulnerability is classified under [CWE-78] (Improper Neutralization of Special Elements used in an OS Command). It was reported through the Zero Day Initiative as ZDI-CAN-23114 and published to the National Vulnerability Database (NVD) on May 22, 2025.
Critical Impact
Unauthenticated attackers on an adjacent network can execute arbitrary operating system commands on affected charging stations, leading to full compromise of the device in the context of the www-data user.
Affected Products
- Hardy Barth cPH2 eCharge Firmware version 2.0.4
- Hardy Barth cPH2 eCharge charging station hardware
- Deployments exposing the nwcheckexec.php endpoint on adjacent networks
Discovery Timeline
- 2025-05-22 - CVE-2025-3882 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-3882
Vulnerability Analysis
The vulnerability exists in the network check functionality exposed by nwcheckexec.php on the cPH2 charging station web interface. The endpoint accepts a dest parameter, which is intended to specify a network destination for diagnostic checks such as connectivity tests. Instead of sanitizing or restricting the value to a valid hostname or IP address, the application concatenates the user input directly into a string used in a system shell call.
Because the endpoint requires no authentication, any attacker who can reach the device over the local network or through an adjacent network segment can submit a crafted request. Successful exploitation yields command execution under the www-data account, providing a foothold on the charging station. From that position, an attacker can manipulate charging operations, pivot to other systems on the network, or persist on the device firmware.
Root Cause
The root cause is missing input validation and unsafe construction of an operating system command using attacker-controlled data, as described by [CWE-78]. The dest parameter is treated as a trusted string and inserted into a shell command without escaping shell metacharacters such as ;, |, &, or backticks.
Attack Vector
Exploitation requires network adjacency to the charging station. An attacker sends an HTTP request to the nwcheckexec.php endpoint with a dest parameter containing shell metacharacters followed by arbitrary commands. The web server invokes the system shell, which executes the injected payload. No credentials, user interaction, or prior compromise are required.
No verified public proof-of-concept code is available. Technical details are documented in the Zero Day Initiative Advisory ZDI-25-248.
Detection Methods for CVE-2025-3882
Indicators of Compromise
- HTTP requests to /nwcheckexec.php containing shell metacharacters such as ;, |, &, $(), or backticks in the dest parameter
- Unexpected outbound network connections from the charging station to attacker-controlled infrastructure
- New or unfamiliar processes spawned by the www-data user on the cPH2 device
- Modifications to web root files, cron entries, or startup scripts on the firmware
Detection Strategies
- Inspect web server access logs on the charging station for requests to nwcheckexec.php with non-standard dest values
- Deploy network intrusion detection signatures targeting command injection patterns in HTTP query strings to the device
- Baseline normal traffic to the cPH2 management interface and alert on deviations such as repeated diagnostic endpoint calls
Monitoring Recommendations
- Centralize syslog from charging stations and adjacent network segments for correlation
- Monitor for lateral movement attempts originating from operational technology (OT) and Internet of Things (IoT) network segments
- Track DNS and outbound HTTP requests from charging stations that fall outside vendor-defined update endpoints
How to Mitigate CVE-2025-3882
Immediate Actions Required
- Restrict network access to the cPH2 management interface using firewall rules or VLAN segmentation
- Place charging stations on an isolated network segment that blocks direct access from user, guest, and corporate networks
- Audit existing deployments for exposure of nwcheckexec.php to untrusted networks
Patch Information
No vendor advisory or fixed firmware version is referenced in the NVD entry at the time of publication. Administrators should monitor Hardy Barth communications and the Zero Day Initiative Advisory ZDI-25-248 for remediation guidance and apply firmware updates as soon as they become available.
Workarounds
- Block external and adjacent-network access to the nwcheckexec.php endpoint using an upstream reverse proxy or firewall ruleset
- Require network-level authentication, such as 802.1X or VPN, before allowing access to the charging station management interface
- Disable or remove diagnostic endpoints that are not required for production charging operations where feasible
# Example firewall rule restricting management access to a trusted subnet
iptables -A INPUT -p tcp --dport 80 -s 10.10.50.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

