nanoMODBUS through v1.23.0 contains an out-of-bounds write in the Modbus client-side recvreaddeviceidentificationres() function (FC 0x2B/MEI 0x0E, Read Device Identification) in nanomodbus.c. The server-supplied objectlength field (0-246) is validated only against the remaining PDU size (ressizeleft) and is never validated against the caller-supplied bufferslength parameter. After copying data with strncpy(buffersout[bufindex], str, bufferslength), the code unconditionally writes a NUL terminator at buffersout[bufindex][objectlength]. When a malicious or compromised Modbus server sends a response with objectlength greater than or equal to the client's bufferslength, this NUL write lands past the end of the caller-provided buffer, corrupting adjacent stack or heap memory on the client.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71255.json",
"cna_assigner": "TuranSec",
"cwe_ids": [
"CWE-787"
]
}{
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "1.23.0"
},
{
"fixed": "v1.23.0"
}
],
"source": [
"AFFECTED_FIELD",
"DESCRIPTION"
]
}[
{
"digest": {
"length": 706.0,
"function_hash": "43930683384586369989119764856046191633"
},
"deprecated": false,
"id": "CVE-2026-71255-2e2d87d4",
"signature_version": "v1",
"target": {
"file": "nanomodbus.c",
"function": "recv_read_registers_res"
},
"source": "https://github.com/debevv/nanomodbus/commit/91d6782930ee263bc760f27b0cbc5b82773c5f0d",
"signature_type": "Function"
},
{
"digest": {
"length": 1432.0,
"function_hash": "191132749338481715068679544708146536524"
},
"deprecated": false,
"id": "CVE-2026-71255-4c0320ff",
"signature_version": "v1",
"target": {
"file": "nanomodbus.c",
"function": "handle_read_discrete"
},
"source": "https://github.com/debevv/nanomodbus/commit/91d6782930ee263bc760f27b0cbc5b82773c5f0d",
"signature_type": "Function"
},
{
"digest": {
"length": 1771.0,
"function_hash": "138244319710543192589913111859839260296"
},
"deprecated": false,
"id": "CVE-2026-71255-b809b9fb",
"signature_version": "v1",
"target": {
"file": "nanomodbus.c",
"function": "handle_write_multiple_coils"
},
"source": "https://github.com/debevv/nanomodbus/commit/91d6782930ee263bc760f27b0cbc5b82773c5f0d",
"signature_type": "Function"
},
{
"digest": {
"line_hashes": [
"6757658592252049191057077353244594635",
"173246798663779492191044794472711644388",
"201123161981660887808582356630476593494",
"182970786455787802761837060624754277229",
"324060117404835209103030211721901139917",
"335629579770334951107761008378484268341",
"193846363705036862041434221672979808921",
"228317482186195778445627755958617538317",
"319494073574386167987923512798064539398",
"237211782954421548721720002283344651838",
"40565148437630482060728325690066681375",
"245103394802154470089796992133834878339",
"228996339500900752227192895831538573313",
"23872434491142496420915001156559729678",
"328346009684504319704411398779077611592",
"192041551300145493868691064806977755858",
"301049820610973897629895682089142193585",
"45473464109489739649048246195543217222",
"257102493345768540969940681802047049855",
"33390113032853571136115251443084049106",
"286970104490934229061815146048932275335",
"119672187298319876631512538197931989352",
"226293647693874060624860032522331467745",
"81065135462443072107319482318908882641",
"49140238898704186397665095831526913425",
"335981277227297077837754786656756923171",
"89088247926131137423214924161945828538",
"289985426966966636035335922428145383457",
"74590402505412851979088559463323930823",
"143178722018170079987364021331770611440",
"249472076923746384794548633458630698387",
"95260750019989558129126938874883634248",
"288861144493816911499420574997496246718",
"230197994169092124818684262100174972677",
"250568708632035917884741266292448655984",
"99196889745262399818210635171913294344",
"319438313745715048738128980743057278659",
"63946976407189256434153205335558616656",
"166511411236362991243866167831925324681",
"250005773725542749478623920674101815461",
"24637633890142857819744908034669317081",
"48472177227951349649668850429642346960",
"165193918795874516602931879375331241207",
"333784346461106547210947923506018608774",
"26195871720017948723930733293126203077",
"24575271609143215469139061057734279794",
"185668929970272466715969832823365445776",
"163560789742937855828650234305907981125",
"168201067578329771742770587165716151840",
"93085375775645235313458456919395331966",
"254819460901069791143612979712653562541"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2026-71255-c3fa9421",
"signature_version": "v1",
"target": {
"file": "nanomodbus.c"
},
"source": "https://github.com/debevv/nanomodbus/commit/91d6782930ee263bc760f27b0cbc5b82773c5f0d",
"signature_type": "Line"
}
]
"2026-08-07T21:55:20Z"
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-71255.json"