Skip to main content
VulnerabilityPublished

CVE-2026-29972: nanoMODBUS · Stack-based Buffer Overflow

Affects nanoMODBUSSource CVE Database V5

0

Not known to be exploited · CVSS 8.2 High.

Data as of 26 Oct 2026, 12:55 UTC

CVSS 3.1 base score
8.2High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 50% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 8 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
GitHubdebevv/nanoMODBUSpkg:github/debevv/nanoMODBUSOther threatsAffected
  • <=1.22.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Until a patch or official fix is available, users should avoid connecting to untrusted or potentially malicious Modbus TCP servers. Implementing network-level controls to restrict access to trusted servers may reduce exposure.

Description

nanoMODBUS through v1.22.0 has a stack-based buffer overflow in recv_read_registers_res() in nanomodbus.c. When a client calls nmbs_read_holding_registers() or nmbs_read_input_registers(), the library writes register data from the server response to the caller-provided buffer based on the response's byte_count field before validating that byte_count matches the requested quantity. A malicious Modbus TCP server can send a response with byte_count=250 (125 registers) regardless of the requested quantity, causing up to 248 bytes of attacker-controlled data to overflow the buffer, potentially allowing remote code execution.

References

Community reviews

Loading reviews…