CVE-2026-71263: CWE-787 in cwalter-at FreeModbus
The LINUXTCP port of FreeModbus contains an off-by-one bounds check in xMBPortTCPPool() (demo/LINUXTCP/port/porttcp.c). The check `if (usTCPFrameBytesLeft > MB_TCP_BUF_SIZE)` uses a strict greater-than comparison instead of greater-than-or-equal against the 263-byte MB_TCP_BUF_SIZE limit. An MBAP frame with a Length field of 264 makes usTCPFrameBytesLeft equal to 263, which passes the flawed check, and the subsequent recv() call writes up to 263 bytes starting at buffer offset 7 into the 263-byte static buffer aucTCPBuf, overflowing it by 7 bytes into the adjacent static variable usTCPBufPos. A single crafted, unauthenticated Modbus TCP packet triggers the overflow, since Modbus has no built-in authentication.
AI Analysis
Technical Summary
The vulnerability exists in the LINUXTCP port of FreeModbus within the xMBPortTCPPool() function (demo/LINUXTCP/port/porttcp.c). The check `if (usTCPFrameBytesLeft > MB_TCP_BUF_SIZE)` incorrectly uses a strict greater-than comparison instead of greater-than-or-equal, allowing an MBAP frame with a Length field of 264 to bypass the check. This causes the subsequent recv() call to write up to 263 bytes starting at buffer offset 7 into a 263-byte static buffer (aucTCPBuf), overflowing it by 7 bytes into the adjacent static variable (usTCPBufPos). The overflow can be triggered by a single crafted, unauthenticated Modbus TCP packet, potentially leading to denial of service or other impacts due to memory corruption.
Potential Impact
An attacker can send a single crafted Modbus TCP packet to trigger a buffer overflow, potentially causing memory corruption. The vulnerability does not affect confidentiality but impacts integrity and availability, as indicated by the CVSS vector (C:N/I:H/A:H). Since Modbus TCP has no built-in authentication, exploitation does not require credentials. No known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is currently documented. Until a patch is available, network-level controls such as filtering Modbus TCP traffic from untrusted sources may reduce exposure.
CVE-2026-71263: CWE-787 in cwalter-at FreeModbus
Description
The LINUXTCP port of FreeModbus contains an off-by-one bounds check in xMBPortTCPPool() (demo/LINUXTCP/port/porttcp.c). The check `if (usTCPFrameBytesLeft > MB_TCP_BUF_SIZE)` uses a strict greater-than comparison instead of greater-than-or-equal against the 263-byte MB_TCP_BUF_SIZE limit. An MBAP frame with a Length field of 264 makes usTCPFrameBytesLeft equal to 263, which passes the flawed check, and the subsequent recv() call writes up to 263 bytes starting at buffer offset 7 into the 263-byte static buffer aucTCPBuf, overflowing it by 7 bytes into the adjacent static variable usTCPBufPos. A single crafted, unauthenticated Modbus TCP packet triggers the overflow, since Modbus has no built-in authentication.
CVSS v3.1
Score 9.1critical
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the LINUXTCP port of FreeModbus within the xMBPortTCPPool() function (demo/LINUXTCP/port/porttcp.c). The check `if (usTCPFrameBytesLeft > MB_TCP_BUF_SIZE)` incorrectly uses a strict greater-than comparison instead of greater-than-or-equal, allowing an MBAP frame with a Length field of 264 to bypass the check. This causes the subsequent recv() call to write up to 263 bytes starting at buffer offset 7 into a 263-byte static buffer (aucTCPBuf), overflowing it by 7 bytes into the adjacent static variable (usTCPBufPos). The overflow can be triggered by a single crafted, unauthenticated Modbus TCP packet, potentially leading to denial of service or other impacts due to memory corruption.
Potential Impact
An attacker can send a single crafted Modbus TCP packet to trigger a buffer overflow, potentially causing memory corruption. The vulnerability does not affect confidentiality but impacts integrity and availability, as indicated by the CVSS vector (C:N/I:H/A:H). Since Modbus TCP has no built-in authentication, exploitation does not require credentials. No known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is currently documented. Until a patch is available, network-level controls such as filtering Modbus TCP traffic from untrusted sources may reduce exposure.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- TuranSec
- Date Reserved
- 2026-08-05T12:23:34.966Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7336e3bf8831d539ed9131
Added to database: 08/05/2026, 13:13:07 UTC
Last enriched: 08/05/2026, 13:41:15 UTC
Last updated: 08/05/2026, 18:47:05 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.