CVE-2026-13217: memory-safety in zephyrproject zephyr
Description
CVE-2026-13217 is a memory-safety vulnerability in the Zephyr project's OCPP 1.6 client. It involves improper handling of server-supplied uid strings in the ocpp_process_server_msg() function, leading to a NULL pointer dereference when parsing malformed uid values. This can cause a remote denial of service on platforms that trap NULL pointer accesses. The vulnerability is triggered by network data from a malicious or compromised OCPP central system or a man-in-the-middle on non-TLS connections. The fix partially addresses the issue but does not fully guard against all NULL dereferences in the parsing logic.
CVSS v3.1
Score 5.9medium
Affected software
zephyrproject
zephyr
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The OCPP 1.6 client in Zephyr reconstructs session handles and PDU IDs from the uid field of CALLRESULT messages. The function ocpp_process_server_msg() calls atoi(strtok_r(uid, "-", &tmp)) without checking if strtok_r returns NULL. If the uid is empty or lacks the '-' delimiter, strtok_r returns NULL, and atoi(NULL) causes undefined behavior due to a NULL pointer dereference. The uid is sourced from network data parsed from JSON frames received over TCP/WebSocket from the OCPP central system. A malicious or compromised server or a man-in-the-middle on an unencrypted connection can supply malformed uid values to trigger this defect. On platforms with MMU/MPU or NULL pointer exception detection enabled, this results in a fault and invokes a fatal handler, causing a remote denial of service of the charge point. On bare-metal platforms where address 0 is readable, the call returns 0 and is benign, limiting impact to availability and platform-dependent. The existing fix guards only the first atoi() call; the second strtok_r(NULL, "-", &tmp) followed by atoi(buf) remains unguarded, leaving the NULL dereference reachable when the uid has a first token but no second token. A complete fix should validate both tokens.
Potential Impact
The vulnerability allows a remote attacker controlling the OCPP central system or positioned as a man-in-the-middle on a non-TLS connection to cause a NULL pointer dereference in the Zephyr OCPP client. This results in a denial of service by crashing the OCPP reader thread and invoking the fatal handler on platforms that trap NULL pointer accesses. On platforms without such trapping, the impact is benign and limited to returning 0. There is no impact on confidentiality or integrity, only availability, and the severity is medium.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The existing partial fix guards only the first atoi() call, leaving a similar NULL dereference reachable. Until a complete fix is available, avoid using non-TLS ws:// connections to prevent man-in-the-middle attacks that could supply malformed uid values. Monitor vendor advisories for updates addressing the second unguarded strtok_r and atoi() calls.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-24T15:29:26.668Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a8dc15dacd9273b496e497a
Added to database: 08/25/2026, 16:22:53 UTC
Last enriched: 09/10/2026, 18:22:01 UTC
Last updated: 10/08/2026, 18:48:43 UTC
Views: 32
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.