Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCompromise or deploy rogue OCPP central server
-
DeliveryEstablish WebSocket session to target Zephyr device
-
ExploitSend WAMP RPC CallRequest with 127-byte non-terminated uid field
-
InstallTrigger strncpy non-NUL-termination in extract_string_field()
-
C2strchr() scans past 128-byte stack buffer
-
ExecuteFault on unmapped page or corrupt adjacent stack state
-
ImpactDevice crash (denial of service)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Three concrete conditions must all be satisfied for exploitation. First, the target Zephyr firmware must have been compiled with CONFIG_OCPP=y; this is an experimental feature disabled by default, so standard Zephyr builds are entirely unaffected. Second, the attacker must either directly control the OCPP 1.6 central server (CSMS) that the victim device is configured to connect to - for example by compromising the EV charging network management backend - or occupy an on-path network position capable of injecting WebSocket frames into an unencrypted ws:// OCPP session; OCPP commonly operates over plain ws:// in practice, making on-path injection a realistic threat model on untrusted network segments. Third, the attacker must craft a WAMP RPC frame in which the uid or action field is at least 127 bytes and contains no closing double-quote character within the first 127 bytes. The CVSS vector (PR:N) correctly reflects that no authentication to the OCPP client device is required from the attacker's perspective, since the malicious frame originates from the server side. Exploitation is further limited to the version range Zephyr 4.3.0 to pre-4.5.0. |
| Impact | The NVD-assigned CVSS 3.1 score of 8.6 (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H) reflects network reachability without authentication but overstates real-world risk in several respects. The most significant mitigating factor is that CONFIG_OCPP is an EXPERIMENTAL Kconfig option that is disabled by default - the overwhelming majority of Zephyr deployments never compile in this code path and are entirely unaffected; this condition is not reflected in the CVSS score. The C:L sub-score is questionable given the vendor advisory explicitly states the over-read data is not reflected to the peer; I:L and A:H are more defensible. Practical exploitation further requires either control of the OCPP central server the device connects to, or on-path network positioning to inject WebSocket frames into an unencrypted ws:// session - while OCPP-over-ws:// is common in EV charging infrastructure, achieving either position is not trivial. EPSS at 0.19% (10th percentile) confirms negligible observed exploitation activity, and SSVC classifies technical impact as only partial with automatable exploitation assessed as 'no.' Against that, SSVC does flag POC availability, which meaningfully lowers the skill barrier for any attacker targeting OCPP infrastructure; operators who have CONFIG_OCPP compiled in and are running affected versions should treat patching as urgent regardless of the low prevalence signal. No CISA KEV listing has been identified, so active in-the-wild exploitation is not confirmed. |
| Exploit ScenarioDerived | An attacker who has compromised or operates a rogue OCPP 1.6 central server sends a WAMP RPC CallRequest frame over the established WebSocket connection in which the uid field is exactly 127 bytes long and contains no closing double-quote character. The Zephyr OCPP client's parse_rpc_msg() passes the token to extract_string_field(), which copies 127 bytes via strncpy() without writing a NUL terminator; the subsequent strchr() call then scans past the end of the 128-byte stack buffer into adjacent memory and, depending on the stack layout, either faults on an unmapped page (crashing the device) or writes a NUL byte over a critical adjacent value such as a saved return address. SSVC data indicates proof-of-concept exploit code exists, which lowers the technical bar for an attacker familiar with OCPP and Zephyr internals. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 10, 2026
Stack buffer over-read and stray one-byte NUL write in Zephyr RTOS's experimental OCPP 1.6 client allow a malicious or compromised OCPP central server - or an on-path attacker exploiting the commonly unencrypted ws:// transport - to crash a connected embedded device by sending a crafted WAMP RPC frame with an oversized uid or action field. The vulnerable helper extract_string_field() uses strncpy() without guaranteeing NUL-termination, causing a subsequent strchr() call to scan unbounded into adjacent stack memory; a secondary defect in extract_payload() compounds this on maximal-length frames. No active exploitation has been confirmed by CISA KEV, but SSVC classification indicates publicly available proof-of-concept code, and EPSS sits at a low 0.19% (10th percentile), consistent with a niche embedded RTOS attack surface.
Earlier versions of this analysis (1)
Stack memory corruption in Zephyr RTOS's OCPP 1.6 client allows a malicious or on-path attacker targeting the central-system WebSocket connection to crash affected devices or corrupt adjacent stack state by sending a malformed WAMP RPC frame. All Zephyr builds with CONFIG_OCPP=y are affected; because OCPP is widely deployed over plaintext ws://, on-path injection is realistic in EV-charging infrastructure. No public exploit has been identified and the vulnerability is not in CISA KEV, but a vendor-confirmed fix is available via upstream commit.
RemediationAI
Upgrade to Zephyr 4.5.0 or later, which incorporates the fix from commit e500f7b81b5b8a867e28b2f4e59512cbfdd5ae75 (https://github.com/zephyrproject-rtos/zephyr/commit/e500f7b81b5b8a867e28b2f4e59512cbfdd5ae75); the patched version is confirmed by the upstream Zephyr project security advisory at GHSA-jgqq-7mjj-w642. If an immediate firmware rebuild and deployment is not feasible, the most effective compensating control is to disable CONFIG_OCPP at build time and re-flash, which eliminates the vulnerable code entirely with no functional impact on non-OCPP workloads. For operators who require OCPP functionality and cannot patch immediately, two network-layer mitigations reduce (but do not eliminate) risk: first, configure the OCPP WebSocket connection to use TLS (wss://) with certificate pinning to the legitimate central server, which defeats on-path injection attacks though not a compromised server; second, isolate the device's network segment so the OCPP central server endpoint is reachable only from a trusted management VLAN, reducing the on-path attacker surface. Note that neither network-layer measure addresses the case of a legitimately compromised central server, so patching remains the only complete fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability originates in the OCPP 1.6 (Open Charge Point Protocol) WebSocket JSON client within Zephyr's networking subsystem at subsys/net/lib/ocpp/ocpp_j.c. OCPP 1.6 encodes RPC messages as WAMP (Web Application Messaging Protocol) arrays over WebSocket, and the Zephyr implementation parses these in parse_rpc_msg(). CWE-125 (Out-of-bounds Read) maps precisely to the root cause: extract_string_field() calls strncpy(out_buf, token + 1, outlen - 1) with outlen=128, copying at most 127 bytes but never writing the NUL terminator when the source string is exactly 127 or more bytes - a well-documented C pitfall. The immediately following strchr(out_buf, '"') then walks unbounded into adjacent stack frames; if a double-quote byte is found beyond the 128-byte boundary, a one-byte NUL is written at that out-of-bounds address, potentially corrupting a saved return address, local variable, or canary. A secondary defect in extract_payload() calls strchr/strrchr on recv_buf, which may be unterminated when a maximal-length OCPP frame exactly fills the buffer. The commit diff confirms the fix replaces both helpers with the bounds-safe json_mixed_arr_parse() API and explicitly NUL-terminates the uid copy with uid[uidlen-1]='\0'. The affected CPE is cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*, covering versions 4.3.0 through pre-4.5.0 on all supported architectures, but only when CONFIG_OCPP=y is set at build time.
Know when Zephyr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
C:N because vendor explicitly confirms over-read data is not reflected to the peer; I:L for the stray NUL stack write; AV:N and PR:N because the attack originates from the remote OCPP central server.
Primary rating from Vendor (zephyr).
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
The OCPP 1.6 client in subsys/net/lib/ocpp parsed inbound WAMP RPC frames in parse_rpc_msg() (subsys/net/lib/ocpp/ocpp_j.c) using a hand-rolled helper, extract_string_field(), that copied the message's uid and action fields with strncpy(out_buf, token + 1, outlen - 1) and then scanned the result with strchr(out_buf, '"'). Because strncpy does not NUL-terminate the destination when the source is at least outlen - 1 (127) bytes long, the subsequent strchr reads past the 128-byte destination buffer into adjacent stack memory; if a " byte is found beyond the buffer, a one-byte out-of-bounds NUL write also occurs. A related defect in extract_payload() runs strchr/strrchr over the receive buffer, which may not be NUL-terminated when a maximal-length frame fills it.
The parsed bytes come directly from the OCPP central-system server over a websocket: the reader thread fills recv_buf via websocket_recv_msg() and calls parse_rpc_msg() on each inbound DATA frame (subsys/net/lib/ocpp/ocpp.c). A malicious or compromised central server, or an on-path attacker (OCPP is commonly deployed over plain ws://), can send an RPC frame whose uid or action field is 127+ bytes with no closing quote, triggering the out-of-bounds access.
The primary impact is a remotely triggerable denial of service: the unbounded scan can fault on an unmapped page, and the stray NUL write can corrupt adjacent stack state. The over-read data is not reflected to the peer, so disclosure is limited. The feature is EXPERIMENTAL and must be explicitly enabled (CONFIG_OCPP). The fix replaces the manual parser with the bounds-respecting json_mixed_arr_parse() and copies the extracted uid with an explicitly NUL-terminated buffer, eliminating both over-reads.
Executive ViewAI
Zephyr RTOS embedded operating system, used in IoT and industrial automation systems, contains a high-severity vulnerability (CVSS 8.6) in its experimental OCPP 1.6 client that allows remote attackers to crash connected devices through malformed network requests. Publicly available exploit code exists for this vulnerability. Organizations relying on Zephyr for electric vehicle charging, building automation, or similar applications face potential service disruption if systems are not patched within 30 days.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
EUVD-2026-52008
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB