Skip to main content

snap7 CVE-2026-16225

| EUVDEUVD-2026-45435 LOW
Out-of-bounds Write (CWE-787)
2026-07-19 VulDB GHSA-cc6f-5g4h-cf75
2.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Obtain low-privilege S7 network credentials
  2. Delivery
    Connect to snap7 listener over network
  3. Exploit
    Send crafted S7 negotiation packet with malicious PDULength
  4. Execution
    Trigger OOB write in TSnap7Peer::NegotiatePDULength
  5. Persist
    Heap memory corruption
  6. Impact
    Process crash or code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

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

Exploitation Conditions

Exploitation requires network-level access to a host running a snap7-based application in server or peer mode that accepts inbound S7 protocol connections (AV:N per CVSS 4.0), and low-privilege authentication (PR:L) - meaning the attacker must possess some credential or session capability sufficient to initiate the S7 connection handshake and reach the PDU length negotiation phase. The vulnerable code path is only reachable during the negotiation handshake itself, so the target must be actively listening for S7 connections. Unauthenticated, zero-touch exploitation is not indicated by the PR:L rating. Attack complexity is low (AC:L) and no special timing or race condition is required (AT:N). No user interaction is needed (UI:N). Scope is contained to the vulnerable system (SC:N/SI:N/SA:N), with no lateral movement or cross-system scope change indicated by the CVSS 4.0 vector.

Impact

The CVSS 4.0 base score of 5.3 (Medium) reflects a network-reachable flaw requiring low privileges (PR:L) and no user interaction, with limited confidentiality, integrity, and availability impacts on the vulnerable system and no scope change to subsequent systems. The E:P (Proof-of-Concept Exploit) modifier is the most actionable signal: a public POC raises exploitability meaningfully above what the base score implies. Exploitation is not listed in CISA KEV, so mass active exploitation is not confirmed. EPSS data is absent from this dataset, preventing quantified exploitation probability. A key tension exists between the low-to-medium CVSS impact ratings (VC:L/VI:L/VA:L) and the OOB write root cause class - CWE-787 is historically leveraged for code execution, and the conservative impact scores may reflect constrained analysis scope rather than a confirmed ceiling. In OT/ICS environments, a snap7 crash or code execution on an HMI or SCADA host can translate to PLC communication loss with physical-process consequences not captured by standard CVSS metrics. Defenders in industrial environments should treat this as higher priority than the numeric score alone suggests.

Exploit ScenarioDerived

An attacker with network access and low-privilege credentials to a snap7-enabled industrial host initiates an S7 protocol connection and sends a crafted negotiation packet containing a manipulated PDULength value. The NegotiatePDULength function writes beyond the allocated buffer boundary, corrupting adjacent heap memory; depending on heap layout and attacker control, this results in a process crash disrupting PLC communications or, leveraging the available public POC, potentially achieving code execution on the host managing industrial operations.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 19, 2026

Out-of-bounds write in davenardella snap7 up to version 1.4.3 allows network-authenticated attackers to corrupt memory by supplying a crafted PDULength value during S7 protocol negotiation. The vulnerable function TSnap7Peer::NegotiatePDULength in src/core/s7_peer.cpp fails to enforce bounds on the PDULength argument, enabling writes beyond the allocated buffer boundary. A public proof-of-concept exploit is available on GitHub (issue #17), and the CVSS 4.0 E:P modifier confirms this - elevating practical risk above the medium base score, particularly in OT/ICS deployments where snap7 is commonly used to interface with Siemens S7 PLCs.

RemediationAI

No vendor-released patch version has been identified at time of analysis - the affected version ceiling is 1.4.3 and no fixed release is referenced in the available data. The public exploit was disclosed via GitHub issue #17 (https://github.com/davenardella/snap7/issues/17), which should be monitored for an upstream code fix or tagged release. As compensating controls: restrict network access to snap7-enabled hosts via firewall or network segmentation rules that allow only authorized S7 clients to initiate connections - this directly narrows the PR:L attack surface by limiting which principals can reach the negotiation endpoint. Deploy snap7-based applications behind a VPN or in isolated OT network segments inaccessible from untrusted networks. If snap7 is running in server/peer mode unnecessarily, disabling inbound S7 listener functionality eliminates the attack path entirely. Monitor snap7 processes for unexpected restarts or crashes as an indicator of exploitation attempts. Containerizing or sandboxing snap7 processes limits the blast radius if memory corruption is achieved. Check https://github.com/davenardella/snap7/ directly for any patches or releases published after CVE assignment.

Affected VersionsENISA

snap7 1.4.1
snap7 1.4.3
snap7 1.4.2
snap7 1.4.0

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 open-source C++ library (CPE: cpe:2.3:a:davenardella:snap7:*:*:*:*:*:*:*:*) implementing the S7 communication protocol used to exchange data with Siemens S7-series Programmable Logic Controllers in industrial control system (ICS) and SCADA environments. The root cause is CWE-787 (Out-of-Bounds Write): during the S7 connection handshake, the TSnap7Peer::NegotiatePDULength function processes a caller-supplied PDULength parameter without adequate bounds validation, allowing a write operation to extend beyond the end of the allocated buffer. This class of memory corruption (tagged Memory Corruption / Buffer Overflow) can manifest as process crashes, heap metadata corruption, or - under controlled conditions - arbitrary code execution, depending on allocator layout and exploit sophistication.

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 2.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 6.3 MEDIUM

Network-reachable with low-privilege requirement per CVSS 4.0 PR:L; limited C/I/A impacts are consistent with the constrained scope indicated by VC:L/VI:L/VA:L in the 4.0 vector.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:L/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
Low
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

3
Severity Changed
Jul 19, 2026 - 09:22 NVD
MEDIUM LOW
CVSS changed
Jul 19, 2026 - 09:22 NVD
5.3 (MEDIUM) 2.1 (LOW)
CVE Published
Jul 19, 2026 - 08:00 cve.org
MEDIUM 5.3

DescriptionCVE.org

A security flaw has been discovered in davenardella snap7 up to 1.4.3. The impacted element is the function TSnap7Peer::NegotiatePDULength of the file src/core/s7_peer.cpp. The manipulation of the argument PDULength results in out-of-bounds write. 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.2%
Top 86% exploitable
Prevalence
Medium
popular open-source OT library for Siemens PLC communication
Exploit
POC
Public exploit code exists
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 LOW
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
No
Human Impact· derived
Low

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
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.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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