Description
nanoMODBUS through v1.23.0 contains an out-of-bounds stack read leading to a wild-pointer write in nmbs_read_device_identification_basic / recv_read_device_identification_res in nanomodbus.c. A fixed 3-element stack array order[3] = {0,1,2} maps object IDs to buffer indices. The server-supplied object_id field (0-255, read directly from the wire) is used without any bounds check as buf_index = order[object_id].
Published: 2026-08-05
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An out-of-bounds stack read in nanoMODBUS allows a malicious Modbus server to supply an object_id value beyond the 0‑2 range of the three-element stack array order[3] = {0,1,2}. The server-supplied object_id (0‑255) is used without bounds checking as buf_index = order[object_id], which indirection can produce a wild pointer during the read. The resulting writing of data to that address may corrupt memory, potentially enabling arbitrary code execution on the client.

Affected Systems

Debevv nanoMODBUS clients with version 1.23.0 or earlier are affected; all instances remain at risk until a vendor update is applied.

Risk and Exploitability

The CVSS score of 9.8 indicates a high severity vulnerability. The EPSS score of < 1% suggests a very low but non‑zero probability of exploitation, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is a remote Modbus server capable of sending a crafted Read Device Identification response; the client must be reachable over Modbus, and the attacker needs to supply an object_id of at least 3 to trigger the out‑of‑bounds access, making the flaw remotely exploitable.

Generated by OpenCVE AI on August 10, 2026 at 22:17 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply any available vendor patch or update nanoMODBUS to the latest release.
  • Restrict Modbus traffic to trusted sources using firewall rules or network segmentation.
  • Monitor for anomalous Modbus traffic that could trigger out-of-bounds behavior and investigate any memory corruption events.

Generated by OpenCVE AI on August 10, 2026 at 22:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
Description nanoMODBUS through v1.23.0 contains an out-of-bounds stack read leading to a wild-pointer write in nmbs_read_device_identification_basic() / recv_read_device_identification_res() in nanomodbus.c. A fixed 3-element stack array order[3] = {0,1,2} maps object IDs to buffer indices. The server-supplied object_id field (0-255, read directly from the wire) is used without any bounds check as buf_index = order[object_id]. When a malicious Modbus server sends a Read Device Identification response with object_id >= 3, this reads an out-of-bounds/garbage byte from the stack adjacent to order[], which is then used as an index into a 3-element buffers[] array of char* pointers. The resulting wild pointer is passed to strncpy() as the destination, causing an arbitrary-address write with server-controlled data. nanoMODBUS through v1.23.0 contains an out-of-bounds stack read leading to a wild-pointer write in nmbs_read_device_identification_basic / recv_read_device_identification_res in nanomodbus.c. A fixed 3-element stack array order[3] = {0,1,2} maps object IDs to buffer indices. The server-supplied object_id field (0-255, read directly from the wire) is used without any bounds check as buf_index = order[object_id].
Title nanoMODBUS - Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id nanoMODBUS Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id

Mon, 10 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Title nanoMODBUS Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id nanoMODBUS - Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id

Wed, 05 Aug 2026 14:00:00 +0000

Type Values Removed Values Added
First Time appeared Debevv
Debevv nanomodbus
Vendors & Products Debevv
Debevv nanomodbus

Wed, 05 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Wed, 05 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
Description nanoMODBUS through v1.23.0 contains an out-of-bounds stack read leading to a wild-pointer write in nmbs_read_device_identification_basic() / recv_read_device_identification_res() in nanomodbus.c. A fixed 3-element stack array order[3] = {0,1,2} maps object IDs to buffer indices. The server-supplied object_id field (0-255, read directly from the wire) is used without any bounds check as buf_index = order[object_id]. When a malicious Modbus server sends a Read Device Identification response with object_id >= 3, this reads an out-of-bounds/garbage byte from the stack adjacent to order[], which is then used as an index into a 3-element buffers[] array of char* pointers. The resulting wild pointer is passed to strncpy() as the destination, causing an arbitrary-address write with server-controlled data.
Title nanoMODBUS Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id
Weaknesses CWE-125
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Debevv Nanomodbus
cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:46:18.081Z

Reserved: 2026-08-05T11:43:52.778Z

Link: CVE-2026-71256

cve-icon Vulnrichment

Updated: 2026-08-05T12:26:06.758Z

cve-icon NVD

Status : Deferred

Published: 2026-08-05T12:18:57.847

Modified: 2026-08-26T17:13:24.800

Link: CVE-2026-71256

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T22:30:06Z

Weaknesses