CVE-2023-26793
Critical · 9.8CVSS
9.8
EPSS
0.7%
Published
May 1, 2024
CISA due date
—
Cloudanix analysis
A flaw in a widely used industrial communication library can let attackers take over connected equipment over the network without any login.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in read_io_status allows out-of-bounds memory writes when processing oversized or malformed Modbus responses, enabling arbitrary code execution or denial of service.
Why it matters to the business
Compromise of industrial control and automation systems that rely on libmodbus can result in unauthorized control of physical processes, production downtime, data exfiltration, or ransomware deployment.
How an attack unfolds
An attacker sends a specially crafted Modbus request that triggers the vulnerable read_io_status path, overflowing the heap buffer with attacker-controlled data to hijack execution flow or crash the process.
How to fix it
Upgrade libmodbus to a version containing the corrected read_io_status implementation; if no update is available, apply vendor patches, restrict network access to Modbus ports, and implement protocol-aware filtering at gateways.
How to confirm the fix worked
Confirm the library version is newer than 3.1.10, run regression tests with malformed Modbus responses, and verify absence of the vulnerable buffer handling logic via source or binary diff.
Typical attack path
- Identify publicly reachable Modbus TCP/RTU endpoints using libmodbus
- Craft and send oversized or malformed function code 0x07/0x08 response packets
- Trigger heap overflow and achieve code execution or crash
- Establish persistence or pivot within the industrial network
How to detect it
Review application logs and network captures for repeated or malformed Modbus read I/O status requests; look for process crashes, heap corruption signals, or unexpected child process spawns originating from modbus-handling binaries.
What your security team should do
- Immediately inventory all deployments of libmodbus 3.1.10 or earlier
- Apply updates or compensating network controls within the next maintenance window
- Monitor industrial networks for anomalous Modbus traffic volumes and function codes
The record
libmodbus v3.1.10 has a heap-based buffer overflow vulnerability in read_io_status function in src/modbus.c.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libmodbus | 0 | No fix |
| Debian:12 | libmodbus | 0 | No fix |
| Debian:13 | libmodbus | 0 | No fix |
| Ubuntu:20.04:LTS | libmodbus | 0 | No fix |
| Ubuntu:22.04:LTS | libmodbus | 0 | No fix |
| Ubuntu:24.04:LTS | libmodbus | 0 | No fix |
| Ubuntu:24.10 | libmodbus | 0 | No fix |
| Ubuntu:25.04 | libmodbus | 0 | No fix |
| Ubuntu:25.10 | libmodbus | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | libmodbus | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | libmodbus | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | libmodbus | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | libmodbus | 0 | No fix |
Related vulnerabilities
- CVE-2024-36844 libmodbus v3.1.6 was discovered to contain a use-after-free via the ctx->backend pointer. Also affects libmodbus
- CVE-2024-36845 An invalid pointer in the modbus_receive() function of libmodbus v3.1.6 allows attackers… Also affects libmodbus
- CVE-2024-36843 libmodbus v3.1.6 was discovered to contain a heap overflow via the modbus_mapping_free()… Also affects libmodbus
- CVE-2024-34244 libmodbus v3.1.10 is vulnerable to Buffer Overflow via the modbus_write_bits function. Also affects libmodbus
- CVE-2026-112403 Pillow is a Python imaging library. CWE-122
- CVE-2026-112393 Pillow is a Python imaging library. CWE-122
- CVE-2026-112395 Pillow is a Python imaging library. CWE-122
- CVE-2026-103658 GNU Aspell 0.60.8.2 (first vulnerable version is not known) contains a heap-based buffer… CWE-122