CVE-2025-3881 in cPH2info

Summary

by MITRE • 05/22/2025

eCharge Hardy Barth cPH2 check_req.php ntp Command Injection Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of eCharge Hardy Barth cPH2 charging stations. Authentication is not required to exploit this vulnerability.

The specific flaw exists within the handling of the ntp parameter provided to the check_req.php endpoint. The issue results from the lack of proper validation of a user-supplied string before using it to execute a system call. An attacker can leverage this vulnerability to execute code in the context of the www-data user. Was ZDI-CAN-23113.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 05/24/2025

The CVE-2025-3881 vulnerability represents a critical command injection flaw in eCharge Hardy Barth cPH2 charging stations that exposes these devices to remote code execution attacks. This vulnerability specifically affects the check_req.php endpoint within the device's web interface and stems from insufficient input validation mechanisms. The flaw occurs when the ntp parameter is processed without proper sanitization before being passed to system calls, creating an avenue for malicious actors to inject arbitrary commands into the underlying operating system. The vulnerability's severity is amplified by its accessibility since no authentication credentials are required for exploitation, making it particularly dangerous in network-adjacent environments where attackers can directly interact with the device's web interface.

The technical implementation of this vulnerability aligns with CWE-77, which categorizes command injection flaws as weaknesses that occur when a program constructs a system command using externally-influenced input without proper validation or sanitization. The ntp parameter handling in check_req.php demonstrates a classic example of unsafe system call invocation where user-supplied data directly influences command execution paths. When an attacker submits malicious input through the ntp parameter, the system processes this input without adequate filtering mechanisms, allowing command injection payloads to be executed with the privileges of the www-data user account. This privilege level typically provides access to web application resources but may also enable further escalation depending on the underlying system configuration and available services.

The operational impact of this vulnerability extends beyond simple remote code execution to encompass potential system compromise and unauthorized access to charging station operations. Attackers leveraging this vulnerability can execute arbitrary commands on affected devices, potentially leading to complete system takeover, data exfiltration, or disruption of charging services. The www-data user context limitation means that while attackers cannot directly access system-level resources or escalate privileges to root, they can still manipulate the charging station's operational parameters, potentially affecting charging sessions, network connectivity, or even physical device behavior. This vulnerability particularly impacts industrial control systems and IoT devices where physical security may be limited, making the attack surface more accessible than traditional enterprise systems.

Mitigation strategies for CVE-2025-3881 should focus on immediate input validation and sanitization measures to prevent command injection attacks. Organizations should implement proper parameter validation on the ntp parameter within check_req.php, utilizing allowlists or proper escaping mechanisms to prevent malicious command injection. Network segmentation and access controls should be enforced to limit exposure of these charging stations to untrusted networks, as the vulnerability does not require authentication. Security patches should be applied immediately to address the root cause, with network monitoring implemented to detect potential exploitation attempts. Additionally, implementing web application firewalls and input validation rules can provide additional layers of protection against similar vulnerabilities. The ATT&CK framework categorizes this type of vulnerability under T1059.001 for command and script injection, emphasizing the need for proper input validation and privilege separation to prevent exploitation. Regular security assessments and vulnerability scanning should be conducted to identify similar injection flaws in other components of the charging infrastructure.

Reservation

04/22/2025

Disclosure

05/22/2025

Moderation

accepted

CPE

ready

EPSS

0.00472

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!