CVE-2026-138109
Deferred Deferred - Pending Action

Stack-Based Buffer Overflow in Snap7 S7 Server WriteVar Request Handler

Vulnerability report for CVE-2026-138109, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-29

Last updated on: 2026-11-29

Assigner: VulDB

Description

A security flaw has been discovered in davenardella snap7 up to 1.4.3. Affected is the function TS7Worker::PerformFunctionWrite of the file src/core/s7_server.cpp of the component S7 Server WriteVar Request Handler. The manipulation of the argument ItemsCount results in stack-based buffer overflow. The attack can be executed remotely. The exploit has been released to the public and may be used for attacks.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-29
Last Modified
2026-11-29
Generated
2026-11-29
AI Q&A
2026-11-29
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 4 associated CPEs

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-121 A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).
CWE-119 The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-138109 is a stack-based buffer overflow in the Snap7 library's S7 server component. It occurs in the TS7Worker::PerformFunctionWrite function in src/core/s7_server.cpp. The vulnerability is triggered when a malicious client sends a Write Request with an ItemsCount parameter set to 255 (0xFF). This value exceeds the fixed-size stack arrays (ReqData and ResData->Data) which are sized to MaxVars (20 elements). The overflow corrupts the stack frame, potentially leading to denial of service or remote code execution.

Detection Guidance

To detect this vulnerability, monitor network traffic on TCP port 102 for ISO-on-TCP/COTP packets. Use tools like Wireshark to capture and analyze packets for Write Requests with ItemsCount set to 0xFF. Check for crashes or memory corruption in Snap7 server logs or system crash reports.

Impact Analysis

This vulnerability allows remote, unauthenticated attackers to corrupt stack memory by sending a crafted Write Request. The impact includes system crashes (denial of service) and potential remote code execution. Since Snap7 is used for communication with Siemens S7 PLCs, affected systems could experience operational disruptions or unauthorized control of industrial processes.

Mitigation Strategies

Immediately update Snap7 to a patched version beyond 1.4.3. If updating is not possible, restrict network access to TCP port 102 using firewalls. Monitor for suspicious activity and apply the suggested patch clamping ItemsCount to MaxVars in PerformFunctionWrite.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-138109. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...