Skip to content
Heist/ feed
Back to feed
Critical

nanoMODBUS Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id

Type: advisorySources: OSV

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].

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-71256
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 22:55 UTC · Revision 1

Source evidence

nanoMODBUS Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id

core-osv · Original source

Published 5 Aug 2026, 11:44 UTC

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].

osv:CVE-2026-71256
Complete source record
{
  "id": "19505d856a6a92b8eb5707620dd129c63450cf5b24842b6dddacf3581e6b49c7",
  "url": "https://osv.dev/vulnerability/CVE-2026-71256",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "nanoMODBUS Client-Side Out-of-Bounds Read Leading to Wild-Pointer Write via object_id",
    "summary": "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].",
    "evidence": "osv:CVE-2026-71256",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-71256",
      "aliases": [
        "CVE-2026-71256"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/debevv/nanomodbus",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "91d6782930ee263bc760f27b0cbc5b82773c5f0d"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.23.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.23.0"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.23.0",
            "v1.22.1",
            "v1.22.0",
            "v1.21.0",
            "v1.20.1",
            "v1.20.0",
            "v1.19.0",
            "v1.18.1",
            "v1.17.3",
            "v1.17.2",
            "v1.17.1",
            "v1.17.0",
            "v1.16.0",
            "v1.15.0",
            "v1.14.3",
            "v1.14.2",
            "v1.14.1",
            "v1.14.0",
            "v1.13.0",
            "v1.12.1",
            "v1.12.0",
            "v1.11.0",
            "v1.10.0",
            "v1.9.1",
            "v1.9.0",
            "v1.8.1",
            "v1.8.0",
            "v1.7.0",
            "v1.6.0",
            "v1.5.0",
            "v1.4.0",
            "v1.3.1",
            "v1.3.0",
            "v1.2.1",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-71256.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:40.152223908Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71256.json",
        "https://github.com/debevv/nanoMODBUS",
        "https://github.com/debevv/nanoMODBUS/blob/master/nanomodbus.c",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-71256"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-125"
        ],
        "cna_assigner": "TuranSec",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71256.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-71256",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 507774,
  "published_at": "2026-08-05T11:44:21.992+00:00"
}