# CVE-2026-13217: NULL-pointer dereference in Zephyr OCPP CALLRESULT parsing via unchecked strtok\_r/atoi

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.67% (percentile 47, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2026-08-25T16:05:38.128Z
- **Modified:** 2026-11-04T05:18:42.010Z

## Who should check

- Anyone running zephyrproject zephyr \>= 4.3.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2

## Description

The OCPP 1.6 client in subsys/net/lib/ocpp/ocpp.c reconstructs a session handle and PDU id from the uid field of a CALLRESULT message. In ocpp\_process\_server\_msg() the code calls atoi(strtok\_r(uid, "-", &tmp)) without checking the strtok\_r return value. When the server-supplied uid is empty or contains no - delimiter, strtok\_r() returns NULL and atoi(NULL) dereferences a NULL pointer, which is undefined behaviour.

The uid originates from network data: parse\_rpc\_msg() in subsys/net/lib/ocpp/ocpp\_j.c JSON-parses a frame received from the OCPP central system over TCP/WebSocket and copies the server-controlled string into the local buffer. A malicious or compromised central system, or a man-in-the-middle on a non-TLS ws:// connection, can return a malformed uid to reach the defect. No authentication beyond the existing server connection (or MITM position) is required, and the reconstructed pointer is membership-validated by ocpp\_session\_is\_valid(), so the impact is limited to the NULL dereference rather than arbitrary pointer use.

On Zephyr targets that trap access to address 0 (MMU/MPU platforms or CONFIG\_NULL\_POINTER\_EXCEPTION\_DETECTION), the dereference faults inside the OCPP reader thread and invokes the fatal handler, producing a remote denial of service of the charge point; on bare targets where address 0 is readable the call returns 0 and is benign, so the impact is availability-only and platform-conditional.

The applied fix guards only the first atoi(); the second strtok\_r(NULL, "-", &tmp) followed by pdu = atoi(buf) in the same function remains unguarded and the identical NULL dereference is still reachable from the same network input when the uid has a first token but no second --delimited token. A complete fix should validate the second token as well.

## Affected and fixed versions

- zephyrproject zephyr: \>= 4.3.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2 (cvelist)

## Mitigation

- Upgrade zephyr to 4.4.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-13217. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-13217.md
Affected: zephyrproject zephyr >= 4.3.0, < 4.3.2; >= 4.4.0, < 4.4.2
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-13217 being exploited?

There is no confirmed exploitation: CVE-2026-13217 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.67% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-13217?

Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-13217?

zephyrproject zephyr \>= 4.3.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2.

### Is there a fix for CVE-2026-13217?

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.

### How do I check if I'm affected by CVE-2026-13217?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-w234-pcxp-4q8r>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/4d8a9eb1448061ccee557ef20a2a58aec91d9cad>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/eba36f8ed63a055ed862ab2b4bb801b6dce07bb7>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-13217>

HTML: <https://flawdb.com/CVE-2026-13217> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-13217>
