CVE-2026-10848: Out-of-bounds read in Zephyr OCPP 1.6 RPC message parser (parse_rpc_msg)
The OCPP 1.6 client in subsys/net/lib/ocpp parsed inbound WAMP RPC frames in parserpcmsg() (subsys/net/lib/ocpp/ocppj.c) using a hand-rolled helper, extractstringfield(), that copied the message's uid and action fields with strncpy(outbuf, token + 1, outlen - 1) and then scanned the result with strchr(outbuf, '"'). 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 extractpayload() 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 recvbuf via websocketrecvmsg() and calls parserpcmsg() 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 (CONFIGOCPP). The fix replaces the manual parser with the bounds-respecting jsonmixedarrparse() and copies the extracted uid with an explicitly NUL-terminated buffer, eliminating both over-reads.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Ensure the feature is explicitly enabled (CONFIG_OCPP) only when needed, since the affected OCPP 1.6 client code in parse_rpc_msg() is guarded by CONFIG_OCPP.
Zephyr OCPP (CONFIG_OCPP) CONFIG_OCPP = explicitly enabled - Compensating control
Mitigate remote triggerability over plaintext ws:// by placing OCPP central-system websocket traffic behind an external network control (e.g., TLS termination and/or restricting/isolating access to the central-system websocket endpoints) to reduce exposure to on-path attackers.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-10848?
The severity of CVE-2026-10848 is rated as high with a score of 7.
What type of vulnerability is CVE-2026-10848?
CVE-2026-10848 is an out-of-bounds read vulnerability in the Zephyr OCPP 1.6 RPC message parser.
How do I fix CVE-2026-10848?
To fix CVE-2026-10848, you should update to the latest version of Zephyr Project that addresses this vulnerability.
What software is affected by CVE-2026-10848?
CVE-2026-10848 affects the Zephyr Project's OCPP 1.6 implementation.
What can happen if CVE-2026-10848 is exploited?
Exploitation of CVE-2026-10848 can lead to potential information leakage and system instability due to out-of-bounds memory access.