# CVE-2026-13214: Stack buffer overflow in OCPP GetConfiguration key parsing

> A stack buffer overflow in the Zephyr RTOS OCPP client allows remote attackers to cause denial of service or potentially execute code via a malicious GetConfiguration request.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 25 Aug 2026
- **Updated:** 25 Aug 2026
- **Also known as:** GHSA-fqhf-6v24-4px2

## What is CVE-2026-13214?

CVE-2026-13214 is a critical memory corruption vulnerability in zephyrproject zephyr, published on 25 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The OCPP 1.6 client in subsys/net/lib/ocpp/ocpp_j.c contains a stack buffer overflow in parse_getconfig_msg(). When handling a GetConfiguration request from the central system, the handler copied the attacker-controlled JSON "key" string into the caller's fixed 50-byte stack buffer (skey[CISTR50], declared in subsys/net/lib/ocpp/ocpp.c) using an unbounded strcpy(). The parsed key value points directly into the receive buffer, so its length is bounded only by the message size (CONFIG_OCPP_RECV_BUFFER_SIZE, default 2048).

The GetConfiguration message is delivered over the WebSocket connection that the charge point opens to its configured central system. The reader thread ocpp_wsreader() reads the message into ui->recv_buf and dispatches it to parse_getconfig_msg() via the PDU function table. An attacker who controls the central system endpoint, or a man-in-the-middle on an unencrypted connection, can send a GetConfiguration request whose "key" field exceeds 50 bytes and overflow the reader thread's stack with attacker-chosen bytes.

The consequence is a remotely triggerable stack smash on the OCPP reader thread: at minimum a denial of service, and plausibly remote code execution depending on build-time hardening such as stack canaries and MPU configuration. The fix replaces the strcpy() with a bounded strncpy(key, payload.key[0], CISTR50 - 1) followed by explicit NUL termination, matching the bounded copies already used by the sibling handlers.

Weakness: CWE-787 (Out-of-bounds Write)

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


## How do I fix CVE-2026-13214?

No fix has been published for CVE-2026-13214 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-13214 being exploited?

There is no known exploitation of CVE-2026-13214 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-13214 and fix it if it is affected.

What it is: CVE-2026-13214 is a critical memory corruption vulnerability in zephyrproject zephyr, published on 25 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-13214 in the wild and no public exploit code.

Affected product: zephyrproject zephyr. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-13214/ (Markdown: https://insights.sbomify.com/CVE-2026-13214/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-13214
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-13214
- OSV: https://osv.dev/vulnerability/CVE-2026-13214

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-13214/
Summaries are generated and may contain mistakes; the official description above is the record.
