Cloudanix VulnDB

CVE-2023-26793

Critical · 9.8

CVSS

9.8

EPSS

0.7%

Published

May 1, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

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

  1. Identify publicly reachable Modbus TCP/RTU endpoints using libmodbus
  2. Craft and send oversized or malformed function code 0x07/0x08 response packets
  3. Trigger heap overflow and achieve code execution or crash
  4. 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