Submit #1074225: Davide Nardella Snap7 <=1.4.3 (30f37da) Stack-based Buffer Overflowinfo

TitleDavide Nardella Snap7 <=1.4.3 (30f37da) Stack-based Buffer Overflow
Descriptionsnap7 up to 1.4.3 is affected. The function TS7Worker::PerformFunctionWrite in src/core/s7_server.cpp of the S7 server (WriteVar / Write Request handler) uses the client-controlled item count ReqParams->ItemsCount without any bounds check to index the fixed-size stack arrays ReqData (PReqFunWriteDataItem[MaxVars]) and ResData->Data (byte[MaxVars]), where MaxVars equals 20. The sibling handler PerformFunctionRead clamps this value to MaxVars; PerformFunctionWrite does not. A crafted S7 Write Request with an item count of up to 255 overflows these stack arrays, corrupting the stack frame. The attack can be launched remotely over the S7 / ISO-on-TCP protocol (TCP port 102) without authentication. Denial of service is certain and memory corruption with attacker-influenced pointer values cannot be excluded. This issue is distinct from CVE-2026-15105, which affects the ReadVar handler PerformFunctionRead in the same file. Fix: clamp ItemsCount to MaxVars at the start of PerformFunctionWrite, mirroring PerformFunctionRead.
Source⚠️ https://github.com/davenardella/snap7/issues/42
User
 GyuHyunJeon (UID 102740)
Submission11/04/2026 08:59 (24 days ago)
Moderation11/27/2026 21:58 (24 days later)
StatusAccepted
VulDB entry445027 [davenardella snap7 up to 1.4.3 S7 Server WriteVar Request src/core/s7_server.cpp PerformFunctionWrite ItemsCount stack-based overflow]
Points20

Do you know our Splunk app?

Download it now for free!