← Back to CVE Explorer

CVE-2026-71255

Full vulnerability record from the local CVENow database.

Description

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

Severity
HIGH
CVSS score
8.6 (v3.1)
Vulnerability status
Deferred
Source identifier
309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Published
2026-08-05 12:18:57.727000
Last modified
2026-10-24 15:10:00.190000
View original CVE JSON
{
  "id": "CVE-2026-71255",
  "sourceIdentifier": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
  "published": "2026-08-05T12:18:57.727",
  "lastModified": "2026-10-24T15:10:00.190",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "nanoMODBUS 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."
    },
    {
      "lang": "es",
      "value": "nanoMODBUS hasta la v1.23.0 contiene una escritura fuera de límites en la función recv_read_device_identification_res() del lado del cliente Modbus (FC 0x2B/MEI 0x0E, Identificación de Lectura de Dispositivo) en nanomodbus.c. El campo object_length (0-246) suministrado por el servidor se valida solo contra el tamaño PDU restante (res_size_left) y nunca se valida contra el parámetro buffers_length suministrado por el llamador. Después de copiar datos con strncpy(buffers_out[buf_index], str, buffers_length), el código escribe incondicionalmente un terminador NUL en buffers_out[buf_index][object_length]. Cuando un servidor Modbus malicioso o comprometido envía una respuesta con object_length mayor o igual que el buffers_length del cliente, esta escritura NUL aterriza más allá del final del búfer proporcionado por el llamador, corrompiendo la memoria adyacente de la pila o del montón en el cliente."
    }
  ],
  "affected": [
    {
      "source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
      "affectedData": [
        {
          "vendor": "debevv",
          "product": "nanoMODBUS",
          "defaultStatus": "unaffected",
          "programFiles": [
            "nanomodbus.c"
          ],
          "versions": [
            {
              "version": "0",
              "lessThanOrEqual": "1.23.0",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
          "baseScore": 8.6,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 4.7
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-08-05T12:28:05.858513Z",
          "id": "CVE-2026-71255",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-787"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/debevv/nanoMODBUS",
      "source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c"
    },
    {
      "url": "https://github.com/debevv/nanoMODBUS/blob/master/nanomodbus.c",
      "source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c"
    }
  ]
}