CVE-2024-31040: nanomq · Buffer Overflow
Affects nanomqSource CVE Database V5
Not known to be exploited · CVSS 2.7 Low.
Data as of 26 Oct 2026, 13:47 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 47% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 17 Apr 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubnanomq/nanomqpkg:github/nanomq/nanomqOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2024-31040, organizations should: 1) Monitor NanoMQ vendor channels and security advisories for official patches or updates addressing this vulnerability and apply them promptly once available. 2) Restrict network access to the NanoMQ broker to trusted and authenticated users only, minimizing exposure to untrusted networks or users. 3) Implement strict input validation and filtering at network boundaries or MQTT gateways to detect and block malformed or suspicious MQTT messages containing crafted hexstreams. 4) Employ runtime protections such as process isolation, resource limits, and watchdog timers to detect and recover from broker crashes quickly. 5) Conduct regular security assessments and fuzz testing on MQTT message handling components to identify similar vulnerabilities proactively. 6) Consider upgrading to newer versions of NanoMQ if they include security improvements or alternative MQTT brokers with robust security features if patching is delayed. 7) Maintain comprehensive logging and monitoring of MQTT broker activity to detect anomalous message patterns or repeated crashes indicative of exploitation attempts.
Description
Buffer Overflow vulnerability in the get_var_integer function in mqtt_parser.c in NanoMQ 0.21.7 allows remote attackers to cause a denial of service via a series of specially crafted hexstreams.