Description
snap7 through 1.4.3 contains an out-of-bounds write vulnerability in TSnap7MicroClient::opReadArea() that allows malicious S7 peers to overflow client buffers via an unchecked DataLength field. Rogue or impersonated PLCs can return crafted ReadVar responses causing memcpy of up to 65535 bytes into caller buffers, crashing SCADA, HMI, or gateway processes and corrupting memory.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| davenardella | snap7 | ≤ 1.4.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | snap7 | No fix yet | — |
| Ubuntu 26.04 LTS | snap7 | No fix yet | — |
References
- https://github.com/davenardella/snap7/issues/31 issue-tracking
- https://github.com/davenardella/snap7/blob/30f37da3114024a71ba93f7fd855c680b97a406f/src/core/s7_micro_client.cpp#L136-L150 technical-description
- https://github.com/davenardella/snap7 product
- VulnCheck Advisory: snap7 through 1.4.3 Out-of-Bounds Write via TSnap7MicroClient::opReadArea third-party-advisory