nanoMODBUS Client-Side Out-of-Bounds Write via object_length in recv_read_device_identification_res()

Summary

CVECVE-2026-71255
StatePUBLISHED
AssignerTuranSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-05 12:18:57 UTC
Updated2026-08-05 13:24:49 UTC
DescriptionnanoMODBUS through v1.23.0 contains an out-of-bounds write in the Modbus client-side recv_read_device_identification_res() function (FC 0x2B/MEI 0x0E, Read Device Identification) in nanomodbus.c. The server-supplied object_length field (0-246) is validated only against the remaining PDU size (res_size_left) and is never validated against the caller-supplied buffers_length parameter. After copying data with strncpy(buffers_out[buf_index], str, buffers_length), the code unconditionally writes a NUL terminator at buffers_out[buf_index][object_length]. When a malicious or compromised Modbus server sends a response with object_length greater than or equal to the client's buffers_length, this NUL write lands past the end of the caller-provided buffer, corrupting adjacent stack or heap memory on the client.

Risk And Classification

Primary CVSS: v3.1 8.6 HIGH from 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

Problem Types: CWE-787 | CWE-787 CWE-787


VersionSourceTypeScoreSeverityVector
3.1309f9ea4-e3e9-4c6c-b79d-e8eb01244f2cSecondary8.6HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
3.1CNADECLARED8.6HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Debevv NanoMODBUS affected 1.23.0 semver Not specified

References

ReferenceSourceLinkTags
github.com/debevv/nanoMODBUS/blob/master/nanomodbus.c 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c github.com
github.com/debevv/nanoMODBUS 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Shukhratbek Uraiimov (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report