libmodbus
CVE-2024-10918
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach Modbus endpoint (TCP/502 or serial)
-
DeliverySend request with unexpected length field
-
ExploitOverflow stack response buffer in libmodbus
-
ExecutionCorrupt stack / hijack control flow
-
ImpactCrash device or execute code
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to be built on libmodbus 3.1.10 and to be acting as a Modbus responder that processes attacker-supplied requests through the vulnerable reply path; the specific trigger is a Modbus request whose length is 'unexpected' relative to what the response builder allocates, causing the overflow while replying. Because Modbus is typically unauthenticated and the CVSS vector is AV:N/AC:L/PR:N/UI:N, no credentials or user interaction are needed - any peer able to open a Modbus session (commonly TCP/502 or a serial/RTU link) can send the malformed request. Limiting factors that reduce real-world exposure: the vulnerable code is a library, so a deployment is only exploitable if the embedding product exposes the reply path to untrusted peers, and most Modbus devices live on isolated OT/ICS networks rather than the public internet, so reachability - not authentication - is the primary gate. |
| Impact | Signals are mixed. The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, 9.8 Critical) argues for maximal urgency - network-reachable, no authentication, no user interaction, full C/I/A impact - which is plausible given Modbus's lack of authentication. However, EPSS is only 0.21% (43rd percentile), the CVE is not on CISA KEV, and no public POC is referenced, so there is no evidence of widespread or automated exploitation today; the realistic near-term risk is a denial-of-service crash of the Modbus endpoint, with code execution being possible-but-unproven for a stack overflow of this class. A key limiting nuance the raw score hides: libmodbus is a library, so exposure depends entirely on how the embedding product deploys it (internet-facing vs. isolated OT segment) and whether the vulnerable reply path is reachable from an untrusted peer - verify reachability per deployment rather than treating every install as internet-exploitable. Net: a real priority for OT/ICS asset owners running Modbus servers built on 3.1.10, but the low EPSS and absence of exploitation suggest patching on a planned OT maintenance window rather than emergency out-of-band action, absent internet exposure. |
| Exploit ScenarioDerived | An attacker with network access to an OT segment connects to an internet- or LAN-reachable device whose firmware uses libmodbus 3.1.10 as a Modbus server and sends a crafted Modbus/TCP request with a length field that does not match the expected reply size. When the library builds its response, the oversized write overflows the stack buffer, crashing the device (denial of service) or potentially corrupting control flow; given AV:N/AC:L/PR:N, no authentication or user interaction is needed. No public exploit code is identified at time of analysis, so an attacker would need to develop the crafted request themselves. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 01, 2026
Stack-based buffer overflow in libmodbus 3.1.10 lets an attacker overrun the fixed response buffer when the library builds a Modbus reply to a request whose declared length is unexpected. Any application embedding this widely-used Modbus TCP/RTU library - typically PLCs, gateways, SCADA/HMI components and IoT devices acting as Modbus servers - can be crashed or potentially made to execute code by an attacker able to reach the Modbus endpoint. There is no public exploit identified at time of analysis, and the EPSS probability is low (0.21%, 43rd percentile), but the flaw was reported by Nozomi Networks and a vendor fix is available.
Earlier versions of this analysis (1)
Stack-based Buffer Overflow vulnerability in libmodbus v3.1.10 allows to overflow the buffer allocated for the Modbus response if the function tries to reply to a Modbus request with an unexpected. Rated medium severity (CVSS 4.8), this vulnerability is remotely exploitable, no authentication required. No vendor patch available.
RemediationAI
Patch is available per the vendor: upgrade libmodbus above 3.1.10 to a fixed release and rebuild/redeploy any product that bundles it, then confirm the embedded version rather than relying on the OS package alone. On Debian-based systems, apply the libmodbus updates referenced in the Debian LTS advisories (https://lists.debian.org/debian-lts-announce/2025/03/msg00010.html and https://lists.debian.org/debian-lts-announce/2026/08/msg00003.html) and consult the Nozomi Networks advisory (https://www.nozominetworks.com/labs/vulnerability-advisories-cve-2024-10918) for details. Where immediate patching of embedded/OT devices is not feasible, apply compensating controls: place Modbus endpoints on an isolated OT VLAN and restrict TCP/502 (and any serial-over-IP gateway) with firewall allow-lists so only trusted masters can send requests - this blocks arbitrary peers but requires accurate knowledge of legitimate Modbus clients; and deploy Modbus-aware deep-packet-inspection/IDS rules to drop requests with malformed or out-of-range length fields, accepting that DPI adds latency and may false-positive on non-standard-but-legitimate traffic. Exact fixed version numbers beyond 'greater than 3.1.10' are not enumerated in the provided data and should be taken from the vendor/distribution advisory.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
libmodbus is a portable open-source C library implementing the Modbus protocol over serial (RTU) and TCP, embedded in a large range of industrial control, energy and IoT firmware to speak to PLCs, sensors and actuators. The root cause is CWE-121 (Stack-based Buffer Overflow): when constructing a response, the code writes into a stack-allocated buffer sized for the expected reply, but a request carrying an unexpected/oversized length field drives more bytes into that buffer than it can hold, corrupting the stack. Because Modbus is a lightweight, historically unauthenticated field-bus protocol, the malformed length can be delivered by any peer that can open a Modbus/TCP (typically port 502) or serial session, and the CPE data confirms the affected component is precisely cpe:2.3:a:libmodbus:libmodbus:3.1.10.
Know when Libmodbus gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Sources disagree (Medium–Critical)AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Unauthenticated network peer sends a malformed Modbus request (AV:N/AC:L/PR:N/UI:N); a stack overflow in the reply path plausibly yields code execution, so C/I/A:H, though demonstrated impact may be limited to availability.
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionNVD
Stack-based Buffer Overflow vulnerability in libmodbus v3.1.10 allows to overflow the buffer allocated for the Modbus response if the function tries to reply to a Modbus request with an unexpected length.
Executive ViewAI
libmodbus 3.1.10 contains a critical stack-based buffer overflow in its Modbus TCP/RTU implementation, affecting industrial control systems, SCADA platforms, PLCs, and IoT gateways widely deployed across operational technology environments. Unauthenticated remote attackers can crash these systems or execute code, threatening operational continuity and physical safety systems in critical infrastructure. Immediate patching is mandatory.
Apply vendor patch. Until patching completes, restrict network access to Modbus endpoints via firewall rules and network segmentation-permit connections only from trusted internal systems; disable any external or internet-facing Modbus exposure; and implement real-time monitoring and alerting on Modbus port activity for unusual connection patterns or payloads exceeding normal request sizes.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.
Affected Products (CPE)NVD
A heap-based buffer overflow flaw was found in libmodbus in function modbus_reply() in src/modbus.c. Rated high severity
libmodbus v3.1.6 was discovered to contain a use-after-free via the ctx->backend pointer. Rated high severity (CVSS 7.5)
libmodbus v3.1.6 was discovered to contain a heap overflow via the modbus_mapping_free() function. Rated high severity (
libmodbus v3.1.10 is vulnerable to Buffer Overflow via the modbus_write_bits function. Rated high severity (CVSS 7.5), t
An issue was discovered in libmodbus before 3.0.7 and 3.1.x before 3.1.5. Rated critical severity (CVSS 9.1), this vulne
An issue was discovered in libmodbus before 3.0.7 and 3.1.x before 3.1.5. Rated critical severity (CVSS 9.1), this vulne
An invalid pointer in the modbus_receive() function of libmodbus v3.1.6 allows attackers to cause a Denial of Service (D
Same weakness CWE-121 – Stack-based Buffer Overflow
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Medium| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
NVD
CVE.org
EPSS
VulDB
GitHub PoC
Exploit-DB