


Perceptive Security
SOC/SIEM Consultancy

nanoMODBUS through v1.23.0 contains an out-of-bounds write in the Modbus server-side handle_read_file_record() function (FC 0x14, Read File Record) in nanomodbu…
Published:
4 August 2026 at 22:00:00
Alert date:
5 August 2026 at 13:02:41
Source:
nvd.nist.gov
Mobile & IoT, Critical Infrastructure, Network Infrastructure
CVE-2026-71254 affects nanoMODBUS through v1.23.0, a lightweight Modbus protocol library. The vulnerability is an out-of-bounds write in the server-side handle_read_file_record() function (FC 0x14) within nanomodbus.c. The flaw stems from a failure to validate cumulative response size across sub-requests, combined with a uint8_t integer overflow in the response_data_size accumulator. With 35 sub-requests of maximum record_length, up to 8750 bytes of data demand can overflow the 260-byte msg.buf buffer. The internal get_n() function performs no bounds checking, and swap_regs() writes unconditionally to the resulting pointer. An unauthenticated remote attacker can send a single crafted FC 0x14 request to cause approximately 8490 bytes of out-of-bounds writes, corrupting adjacent memory. Impact ranges from denial of service to potential remote code execution, with heightened risk on embedded and bare-metal targets lacking memory protection.
Technical details
Mitigation steps:
Affected products:
nanoMODBUS v1.23.0 and earlier
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-71254
https://github.com/debevv/nanoMODBUS
https://github.com/debevv/nanoMODBUS/blob/master/nanomodbus.c
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
