PT-2026-68123 · Unknown · Nanomodbus

·

CVE-2026-71254

·

Published

2026-08-05

·

Updated

2026-08-10

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions nanoMODBUS versions prior to 1.23.1
Description An out-of-bounds write exists in the server-side handle read file record() function (FC 0x14, Read File Record) within nanomodbus.c. While the function validates the total request size and individual sub-request record length, it fails to validate the cumulative response size across all sub-requests. The response data size accumulator, declared as uint8 t, can overflow when processing up to 35 sub-requests. This allows a subsequent loop to call get n() and swap regs(), which writes data unconditionally to a pointer derived from the 260-byte msg.buf receive buffer. An unauthenticated network client can send a crafted FC 0x14 request to write approximately 8490 bytes beyond the buffer, potentially leading to memory corruption, denial of service, or remote code execution, especially on embedded or bare-metal systems lacking memory protection.
Recommendations Update nanoMODBUS to a version later than 1.23.0. As a temporary workaround, restrict network access to the Modbus server to trusted clients only to prevent unauthenticated requests.

Exploit

Fix

DoS

RCE

Memory Corruption

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-71254

Affected Products

Nanomodbus