CVE-2026-29972

8.2

nanoMODBUS · nanoMODBUS

A stack-based buffer overflow in nanoMODBUS allows unauthenticated malicious servers to potentially achieve remote code execution.

Executive summary

A stack-based buffer overflow in nanoMODBUS versions through v1.22.0 allows unauthenticated malicious servers to cause memory corruption and potential remote code execution.

Vulnerability

This is a stack-based buffer overflow flaw located in the recv_read_registers_res function within nanomodbus.c, triggered when processing unvalidated byte counts from an unauthenticated server response.

Business impact

A successful exploit against this vulnerability can lead to system crashes, denial of service, or arbitrary remote code execution on the client host. Given the high CVSS score of 8.2, this flaw represents a significant risk to industrial control systems and operational technology environments relying on affected Modbus communications.

Remediation

Immediate Action: Apply the upstream fix commit 035b8d596a954c2dd4bc40e3fa28a7cb2a8c0ec1 or restrict Modbus communications to trusted, authenticated server endpoints.

Proactive Monitoring: Monitor network traffic for anomalous Modbus TCP responses containing unexpected byte count values or oversized register payloads.

Compensating Controls: Implement strict network segmentation and intrusion detection systems capable of identifying malformed Modbus protocol responses.

Exploitation status

Public Exploit Available: No - no confirmed public exploit exists in the available data.

Analyst recommendation

Security teams must treat this high-severity vulnerability with urgency by auditing software dependencies and integrating the latest upstream patches. Immediate mitigation is essential to protect industrial networks from malicious Modbus servers attempting memory corruption attacks.

More nanoMODBUS CVEs

Sources