CVE-2026-71256

debevv · nanoMODBUS

nanoMODBUS contains an out-of-bounds stack read and wild-pointer write vulnerability in its Modbus identification response handling, which can be triggered by a malicious server.

Executive summary

A critical memory corruption vulnerability in the nanoMODBUS library allows for potential arbitrary code execution via a malicious server response.

Vulnerability

The library fails to perform bounds checking on the object_id field when processing Modbus Device Identification responses (CWE-125). An unauthenticated remote attacker can provide a crafted response that causes an out-of-bounds read, leading to an arbitrary-address write with controlled data.

Business impact

The ability to perform arbitrary-address writes typically results in remote code execution or complete application crashes. With a CVSS score of 9.8, this vulnerability poses a severe threat to the availability and integrity of any system integrating the nanoMODBUS library.

Remediation

Immediate Action: Monitor the official debevv nanoMODBUS GitHub repository for the release of a patched version. If a patch is not yet available, evaluate the feasibility of disabling Modbus identification features in affected deployments.

Proactive Monitoring: Monitor network traffic for anomalous Modbus protocol traffic patterns or unexpected device identification responses.

Compensating Controls: Deploy network-based intrusion detection systems to inspect Modbus traffic and filter out malformed or suspicious identification response packets.

Exploitation status

Public Exploit Available: Unknown

Analyst recommendation

This vulnerability is critical due to the potential for memory corruption and code execution. Organizations should track the project repository for updates and move to version 1.23.1 or later as soon as it becomes available.