NanoMQ Buffer Overflow Vulnerability in PUBLISH Packet Handling

Vulnerability

A buffer overflow vulnerability has been identified in NanoMQ versions prior to 0.24.4. This issue arises in the message broker's handling of PUBLISH packets, which inadvertently trigger both shared and vanilla subscriptions. The buffer overflow occurs in the 'pub_handler' component, leading to potential memory corruption.

Impact

Exploitation of this vulnerability causes a heap-based buffer overflow, which can lead to memory corruption and potentially allow for arbitrary code execution.

Reproduction

The vulnerability can be reproduced by sending PUBLISH packets that activate both shared and vanilla subscriptions while using NanoMQ version 0.24.2. This can be done by publishing messages to a topic that has shared subscriptions enabled, which will trigger the buffer overflow in the 'pub_handler' component.

Remediation

Users can upgrade to NanoMQ version 0.24.4 or later to address this vulnerability. As an alternative, shared subscriptions can be disabled to mitigate the issue.

Added: Dec 15, 2025, 9:36 PM
Updated: Dec 15, 2025, 9:36 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
10.0
exploitability
6.2
remediation
8.3
relevance
1.5
threat
6.4
urgency
2.9
incentive
1.7

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