MEDIUM 5.6

CVE-2026-13590: Heap-Based Buffer Overflow in PcapPlusPlus 25.05 Modbus Handler

A heap-based buffer overflow vulnerability has been identified in seladb PcapPlusPlus version 25.05, specifically within the Modbus Protocol Handler component. When a specially crafted packet with a manipulated length argument is processed by the pcpp::ModbusLayer::getLength function, it can cause a buffer overflow in heap memory. An unauthenticated attacker on the network can trigger this condition, though significant technical knowledge and specific packet construction are required to exploit it successfully. The vulnerability enables attackers to leak sensitive memory contents, corrupt data, or potentially crash the application.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.6 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Weaknesses (CWE)
CWE-119, CWE-122
Affected products
0 configuration(s)
Published / Modified
2026-06-29 / 2026-06-30

NVD description (verbatim)

A security flaw has been discovered in seladb PcapPlusPlus 25.05. This impacts the function pcpp::ModbusLayer::getLength in the library Packet++/header/ModbusLayer.h of the component Modbus Protocol Handler. The manipulation of the argument length results in heap-based buffer overflow. The attack can be launched remotely. A high complexity level is associated with this attack. The exploitability is said to be difficult. The exploit has been released to the public and may be used for attacks. The patch is identified as 4c90c3e3418a2b09dc82b7ca5775e9c1e22fe454. Applying a patch is advised to resolve this issue.

10 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-13590 is a heap-based buffer overflow in PcapPlusPlus 25.05's Modbus Protocol Handler, located in the pcpp::ModbusLayer::getLength function within Packet++/header/ModbusLayer.h. The flaw occurs when the length parameter is manipulated during Modbus packet processing, causing writes beyond allocated heap boundaries. The vulnerability maps to CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) and CWE-122 (Heap-based Buffer Overflow). Exploitation requires crafting a malicious Modbus packet and delivering it to a system running the affected library; however, the attack complexity is rated as high, meaning specific conditions must align for successful exploitation. A public exploit has been released, increasing practical risk.

Business impact

Organizations using PcapPlusPlus 25.05 for packet analysis, network monitoring, or Modbus protocol inspection face potential exposure. Successful exploitation could result in information disclosure (leaking credentials, keys, or application data from memory), data integrity issues (corrupting packet analysis results or logs), or denial of service (crashing monitoring tools). For critical infrastructure or industrial control environments relying on Modbus protocol processing, this vulnerability could disrupt network visibility and incident response capabilities. The moderate CVSS score (5.6) reflects that while impact is feasible, the barrier to exploitation remains substantial.

Affected systems

PcapPlusPlus version 25.05 is affected. Any application or tool embedding this library and processing untrusted Modbus traffic is potentially vulnerable, including packet capture utilities, network monitoring platforms, and industrial protocol analyzers. Systems in air-gapped or closed networks face lower risk, while those analyzing external or Internet-facing Modbus devices are at higher risk.

Exploitability

Although a public exploit has been released, actual exploitation requires high technical complexity. An attacker must craft a Modbus packet with a precise length manipulation, deliver it to a vulnerable system, and successfully trigger memory corruption. Factors limiting real-world exploitation include the need for Modbus traffic to reach the vulnerable function, the precise nature of the buffer overflow, and environment-specific memory layout variations. Nevertheless, the availability of public exploit code lowers the barrier for motivated threat actors and means this is no longer a theoretical risk.

Remediation

Apply the security patch identified as commit 4c90c3e3418a2b09dc82b7ca5775e9c1e22fe454 to PcapPlusPlus. Verify the exact patched version number against the seladb project's official releases and security advisories before deployment. Until patching is possible, implement network segmentation to restrict untrusted Modbus traffic from reaching systems running PcapPlusPlus 25.05, or disable Modbus protocol processing if not actively required.

Patch guidance

Obtain the patched version from the official seladb PcapPlusPlus repository, confirming it includes commit 4c90c3e3418a2b09dc82b7ca5775e9c1e22fe454. Test the patch in a non-production environment to ensure compatibility with dependent applications before rolling out to production systems. Verify patch application by reviewing release notes and commit history rather than relying solely on version numbers. If using PcapPlusPlus as a library dependency, update your project's build configuration and re-link all dependent binaries.

Detection guidance

Monitor for suspicious Modbus packets with malformed or oversized length fields arriving at systems running PcapPlusPlus. Log and alert on crashes or segmentation faults in applications using the library, particularly if correlating with network traffic analysis tools. Endpoint Detection and Response (EDR) solutions should flag unexpected memory corruption or process crashes in packet processing contexts. Review network logs for anomalous Modbus traffic patterns, particularly from untrusted sources. Perform software inventory scans to identify systems running PcapPlusPlus 25.05 and prioritize patching.

Why prioritize this

This vulnerability warrants prompt but measured attention. The public availability of exploit code significantly elevates practical risk, and the MEDIUM severity reflects real potential for data breach or service disruption. However, the high attack complexity means opportunistic or script-kiddie exploitation is unlikely. Prioritize patching systems analyzing untrusted or externally-sourced Modbus traffic and those in industrial or critical infrastructure environments. Lower priority for closed networks or air-gapped systems with no Modbus exposure.

Risk score, explained

The CVSS 3.1 score of 5.6 (MEDIUM) balances several factors: the vulnerability requires network access (AV:N) but high attack complexity (AC:H), no privileges or user interaction, and impacts confidentiality, integrity, and availability equally but minimally (C:L/I:L/A:L). The score does not account for the existence of public exploit code or the prevalence of PcapPlusPlus in real deployments, both of which elevate practical risk beyond the base score. Organizations should supplement CVSS with threat modeling considering their specific use of the library.

Frequently asked questions

Which PcapPlusPlus versions are affected?

PcapPlusPlus version 25.05 is confirmed affected. Other versions, both earlier and later, should be verified against the seladb security advisories and release notes. It is recommended to check the official repository for the complete list of affected and fixed versions.

Do we need to patch if we do not process Modbus traffic?

If your use of PcapPlusPlus does not invoke Modbus protocol handling (ModbusLayer), the risk is significantly reduced. However, accidental or indirect invocation is possible if the library is configured to auto-detect protocols. Patching is still recommended as a defense-in-depth measure and to avoid future confusion during upgrades.

Can this vulnerability be exploited over the Internet without network access to Modbus devices?

The vulnerability requires a Modbus packet to reach the vulnerable pcpp::ModbusLayer::getLength function. In networks where PcapPlusPlus is actively sniffing or analyzing traffic from Modbus devices or where Modbus traffic is forwarded to the analysis system, remote exploitation from the Internet is feasible if that traffic path exists. In isolated lab or air-gapped environments, exploitation is much harder.

What is the relationship between the public exploit and real-world risk?

The public release of an exploit proof-of-concept lowers the barrier for skilled attackers to craft working exploits but does not automatically enable mass exploitation due to the high complexity of triggering the buffer overflow. However, it increases the likelihood of targeted attacks against known deployments and requires faster patching cycles to mitigate.

This analysis is provided for informational purposes and should not be construed as professional security advice. Consult with your security team and the seladb project's official advisories for definitive patch guidance and affected version lists. CVSS scores and severity ratings are approximate and should be supplemented with organization-specific threat modeling. No guarantee is made regarding the accuracy or completeness of this vulnerability assessment. Always verify patches against official sources before deployment. SEC.co assumes no liability for actions taken based on this information. Source: NVD (public-domain), retrieved 2026-08-08. Analysis generated by SEC.co (claude-haiku-4-5).