# CVE-2026-34608: nanomq: Heap-Buffer-Overflow in webhook_inproc.c via cJSON_Parse OOB Read

> An out-of-bounds read in NanoMQ's webhook processing allows attackers to cause crashes or potentially execute code via crafted JSON payloads.

- **Severity:** Medium 4.9 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 2 Apr 2026
- **Updated:** 2 Apr 2026
- **Also known as:** GHSA-8p57-jxj9-3qq3

## What is CVE-2026-34608?

CVE-2026-34608 is a medium-severity memory corruption vulnerability in nanomq, published on 2 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

NanoMQ MQTT Broker (NanoMQ) is an all-around Edge Messaging Platform. Prior to version 0.24.10, in NanoMQ's webhook_inproc.c, the hook_work_cb() function processes nng messages by parsing the message body with cJSON_Parse(body). The body is obtained from nng_msg_body(msg), which is a binary buffer without a guaranteed null terminator. This leads to an out-of-bounds read (OOB read) as cJSON_Parse reads until it finds a \0, potentially accessing memory beyond the allocated buffer (e.g., nng_msg metadata or adjacent heap/stack). The issue is often masked by nng's allocation padding (extra 32 bytes of zeros for non-power-of-two sizes <1024 or non-aligned). The overflow is reliably triggered when the JSON payload length is a power-of-two >=1024 (no padding added). This issue has been patched in version 0.24.10.

Weakness: CWE-457 (Use of Uninitialized Variable), CWE-125 (Out-of-bounds Read)

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

It affects 1 product.


Products: Emqx Nanomq.

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

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

## Is CVE-2026-34608 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-34608 exists.

## Other vulnerabilities in nanomq

- [CVE-2024-42655](https://insights.sbomify.com/CVE-2024-42655/): Missing authorization in n/a (high 8.8)
- [CVE-2025-59947](https://insights.sbomify.com/CVE-2025-59947/): NanoMQ has Buffer Overflow (high 8.5)
- [CVE-2023-34488](https://insights.sbomify.com/CVE-2023-34488/): Memory corruption in n/a (high 8.0)
- [CVE-2026-32135](https://insights.sbomify.com/CVE-2026-32135/): NanoMQ has Heap Buffer Overflow in URI Parameter Parsing (high 7.7)
- [CVE-2026-36590](https://insights.sbomify.com/CVE-2026-36590/): Denial of service in n/a (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-34608 is a medium-severity memory corruption vulnerability in nanomq, published on 2 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-34608 exists.

Affected product: nanomq. 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-34608/ (Markdown: https://insights.sbomify.com/CVE-2026-34608/index.md)
```

## Sources

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

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