NanoMQ MQTT Broker Heap Buffer Overflow Vulnerability in REST API URI Parameter Parsing

Vulnerability

A heap buffer overflow vulnerability has been identified in NanoMQ MQTT Broker versions prior to 0.24.11. The issue arises in the 'uri_param_parse' function of the REST API, where an off-by-one error in memory allocation for query parameter keys and values allows an attacker to write a null byte beyond the allocated buffer. This vulnerability can be exploited by sending a crafted HTTP request, leading to potential heap corruption.

Impact

Exploitation of this vulnerability causes a heap buffer overflow, which can corrupt memory and potentially lead to a crash or allow for remote code execution, depending on the heap layout.

Reproduction

The vulnerability can be reproduced by sending an authenticated HTTP GET request to the '/api/v4/get_file' endpoint with an unencoded 'path' query parameter. This can be done using a Python script that includes the necessary authorization headers. The request will cause NanoMQ to crash, as indicated by AddressSanitizer output showing a heap-buffer-overflow error.

Remediation

Users can upgrade to NanoMQ version 0.24.11 or later, where this vulnerability has been patched.

Added: Apr 20, 2026, 8:32 PM
Updated: Apr 20, 2026, 8:32 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
7.5
exploitability
7.0
remediation
7.7
relevance
6.4
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.