Skip to main content

Snap7 CVE-2026-138109

| EUVDEUVD-2026-137652 MEDIUM
Stack-based Buffer Overflow (CWE-121)
2026-11-29 VulDB GHSA-v48w-w2p2-9h64
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach Snap7 S7 server on TCP/102
  2. Exploit
    Send WriteVar request with oversized ItemsCount
  3. Execution
    Overflow stack buffer in PerformFunctionWrite handler
  4. Impact
    Crash or corrupt the server process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target to be running the Snap7 S7 server component with its ISO-on-TCP listener (S7comm, typically TCP port 102) exposed to the attacker, and the server must process an incoming WriteVar request whose ItemsCount field the attacker controls. Per the supplied CVSS vector (AV:N/AC:L/PR:N/UI:N) no authentication, special privileges, or user interaction are needed against a default S7-server deployment. Limiting factors for defenders: Snap7 is an embeddable library, so exposure depends on an integrator actually deploying the server role and leaving TCP/102 network-reachable (industrial networks are often segmented); the assessed impact is Low across confidentiality, integrity, and availability, so realistic outcome is more likely service disruption than full code execution; and the PoC is an unverified reference, not confirmed working exploit code.

Impact

This is a moderate-priority issue rather than a top-tier emergency, and the signals are largely consistent on that. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a remotely reachable, low-complexity, unauthenticated flaw with no user interaction, which is the part that elevates it; however, every impact metric is rated Low (VC:L/VI:L/VA:L, SC/SI/SA:N), so the assessed consequence of a successful hit is limited rather than full system compromise, despite the CWE-121 stack-based buffer overflow classification. Exploit maturity is E:P (proof-of-concept), and the multi-source intelligence lists the PoC as 'reference only, not verified as working exploit code' - so a public PoC reference exists but is not confirmed as a working exploit. There is no CISA KEV listing and no EPSS score in the supplied data, so there is no evidence of active or widespread exploitation; the vuln.today decision label is 'this_month', not act_now/emergency, reinforcing a planned-remediation rather than drop-everything posture. One conflict should be flagged explicitly: the description locates the flaw in the server-side TS7Worker::PerformFunctionWrite handler of src/core/s7_server.cpp (attacker-controlled ItemsCount in a WriteVar request), but the referenced patch PR #44 modifies src/core/s7_isotcp.cpp and src/core/s7_micro_client.cpp (ISO-TCP fragment reassembly and client-side response handling) and does not visibly touch s7_server.cpp or PerformFunctionWrite - verify with the vendor that PR #44 is the complete and correct fix for the described server-side WriteVar overflow.

Exploit ScenarioDerived

An attacker with network reachability to a host running the Snap7 S7 server component sends a crafted S7comm WriteVar request over ISO-on-TCP (typically TCP/102) in which the ItemsCount argument is manipulated to overflow a stack buffer in the server's write-request handler. No authentication or user interaction is required (AV:N/AC:L/PR:N/UI:N). A public PoC reference exists (GitHub issue #42) but is not verified as working exploit code, so reliable weaponization beyond crashing the service is unproven.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 29, 2026

Snap7 through 1.4.3 has a stack-based buffer overflow in the S7 server's WriteVar request handler (TS7Worker::PerformFunctionWrite in src/core/s7_server.cpp), where an attacker-controlled ItemsCount argument is not adequately constrained before use. A remote attacker needs no credentials or user interaction (CVSS 4.0 AV:N/AC:L/AT:N/PR:N/UI:N) and only needs to reach an S7comm/ISO-on-TCP listener (typically TCP port 102) on a deployment that enables the Snap7 server role; the assessed impact is Low for confidentiality, integrity and availability, so service disruption is a more realistic outcome than full code execution. A public PoC reference exists (GitHub issue #42) but is not verified as working exploit code, no KEV listing was supplied, and the vendor indicates an upstream fix in PR #44, with the priority decision set to this_month rather than an emergency patch-now call.

RemediationAI

Treat 1.4.3 as the last known vulnerable release: obtain the vendor's fixed Snap7 source or release and rebuild any application that embeds it - patch status is listed as available from the vendor, and the upstream fix is in PR https://github.com/davenardella/snap7/pull/44 addressing the behaviour reported in https://github.com/davenardella/snap7/issues/42, but a tagged release version containing the fix is not independently confirmed in the supplied data, and the visible PR diff modifies s7_isotcp.cpp and s7_micro_client.cpp rather than s7_server.cpp, so verify that the patch actually covers TS7Worker::PerformFunctionWrite before closing the finding. Because Snap7 is a library, upgrading the standalone package is not enough - every integrator product that statically or dynamically links it must be rebuilt and redistributed. The documented exploitation prerequisite is a reachable S7comm listener on a host running the server role, so until rebuilt binaries are deployed, restrict TCP port 102 (ISO-on-TCP/S7comm) to a small allowlist of engineering and SCADA hosts via firewall or network segmentation and avoid exposing the server role to untrusted networks; the trade-off is that legitimate S7 clients outside the allowlist will lose connectivity, and hosts that never needed the server role should simply not enable it. Priority is this_month rather than immediate, consistent with the low assessed CIA impact; urgency should rise if a working exploit is later confirmed.

Affected VersionsENISA

snap7 1.4.1
snap7 1.4.0
snap7 1.4.2
snap7 1.4.3

Affected Packages

euvd snap7 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Snap7 is an embeddable open-source C++ library implementing Siemens S7 communication (S7comm carried over ISO-on-TCP, i.e. TPKT/COTP, conventionally on TCP port 102), widely used by integrators to build gateways, HMIs and test tooling that talk to S7 PLCs or emulate a PLC/server. The flaw is classified CWE-121 (stack-based buffer overflow) in the server-side write path: the WriteVar request handler TS7Worker::PerformFunctionWrite in src/core/s7_server.cpp consumes an ItemsCount field taken from the incoming request and the manipulation of that argument results in a write past the bounds of a fixed-size stack buffer; the sources do not describe the precise trigger sequence, the buffer size, or the exact number of items required beyond that ItemsCount manipulation. Because Snap7 is a library rather than an appliance, real exposure depends entirely on an integrator compiling and deploying the server role and leaving the listener network-reachable. The CVSS 4.0 vector (6.9, E:P) describes network reachability with no attack prerequisites, no privileges and no user interaction, with limited CIA impact and no subsequent-system impact; the independent assessment maps consistently to CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L. The supplied patch diff for PR #44 does not visibly touch src/core/s7_server.cpp: it changes s7_isotcp.cpp isoRecvPDU pointer arithmetic during multi-fragment PDU reassembly (fixing an offset that is already cumulative, referencing upstream issue #33) and adds client-side answer validation and memcpy bounds checks in s7_micro_client.cpp, so whether that PR is the complete fix for this specific ItemsCount overflow is unverified from the available evidence.

Know when Snap7 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 7.3 HIGH

Remote unauthenticated WriteVar request with no interaction gives AV:N/AC:L/PR:N/UI:N; sources rate consequence low across the board, so C/I/A:L and scope unchanged.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Nov 29, 2026 - 04:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)
CVE Published
Nov 29, 2026 - 03:15 cve.org
MEDIUM 6.9

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 65% exploitable
Prevalence
Low
open-source Siemens S7 PLC library, niche industrial-automation footprint
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

48
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy