MIPS-Based Managed Switch Firmware Pre-Auth Kernel RCE — CVE-2026-1668
by tangrs · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-1668
- Category
- binary
- Affected product
- MIPS-based managed switch firmware (web management HTTP server), e.g. SG2005P/SG2008/SG2016P/SG2210MP/SG2218/SG2428/SG3210/SL2428/TL-SG2428 series firmware built around 2025-10-31
- Affected versions
- Firmware images matching SHA256 4b862b8dd7fde44fa57a39b35b562f21878dd6abb8e92ccd9cdef571ed60d544 (multiple product/model builds share this image); earlier firmware versions are likely also vulnerable with payload adjustments
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | tangrs |
| CVE / Advisory | CVE-2026-1668 |
| Category | binary |
| Severity | Critical |
| CVSS Score | Not specified in source |
| Status | Weaponized |
| Tags | mips, embedded-linux, kernel-exploit, firmware, managed-switch, reverse-shell, pre-auth, shellcode |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | MIPS-based managed switch firmware (web management HTTP server), e.g. SG2005P/SG2008/SG2016P/SG2210MP/SG2218/SG2428/SG3210/SL2428/TL-SG2428 series firmware built around 2025-10-31 |
| Versions Affected | Firmware images matching SHA256 4b862b8dd7fde44fa57a39b35b562f21878dd6abb8e92ccd9cdef571ed60d544 (multiple product/model builds share this image); earlier firmware versions are likely also vulnerable with payload adjustments |
| Language / Platform | C/MIPS assembly payload built with a MIPS Linux GCC cross-toolchain; targets embedded Linux firmware |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
The switch’s embedded web management HTTP server contains a memory-corruption flaw reachable via a crafted request to the /data/login.json endpoint, exploitable before the device’s first legitimate HTTP request after boot. The PoC builds a raw MIPS shellcode payload (position-independent, using a custom linker script and freestanding C/assembly stub) that is appended after crafted HTTP headers with an oversized Content-Length value, triggering the vulnerable code path in the kernel/HTTP server. Successful exploitation spawns a reverse shell back to the attacker, granting root access to the switch’s underlying embedded Linux system. The author has published a companion blog series explaining the memory-corruption primitive and payload construction in detail.
Vulnerability Details
Root Cause
A memory-corruption bug in the switch firmware’s HTTP request handling for /data/login.json (root cause detailed in the author’s blog series) is triggered by a malformed request with an oversized Content-Length header, allowing injected MIPS shellcode to hijack execution during a very early boot-time window before the server has processed its first legitimate request.
Attack Vector
- Attacker builds the raw shellcode payload (
payload.s+shell.c+linux.h, linked vialdscript) using a MIPS Linux GCC cross-toolchain (make). - Attacker starts a listener and, immediately after the switch boots (before its first legitimate HTTP request), sends the crafted
http-request.bin(headers fromhttp-headers.txtconcatenated with the compiled shellcode) to TCP port 80 on the switch. - The malformed request with an oversized
Content-Lengthtriggers the memory-corruption path, executing the embedded shellcode. - The shellcode connects back to the attacker’s listener on TCP port 8888.
- Attacker receives an interactive root shell on the switch’s embedded Linux OS.
Impact
Full unauthenticated remote code execution as root on the affected managed switch, granting complete control over network switching infrastructure.
Environment / Lab Setup
Target: Affected MIPS-based managed switch, freshly booted (pre-first-request window), management HTTP server on port 80
Attacker: mips-linux-gnu-gcc / mips-linux-gnu-objcopy (e.g. `apt install gcc-mips-linux-gnu` on Ubuntu 24.04), make, nc (netcat), bash
Proof of Concept
PoC Script
See
Makefile,payload.s,shell.c,linux.h,ldscript,http-headers.txt, andrun.shin this folder.
| |
make builds the raw MIPS shellcode and concatenates it with the crafted HTTP headers into http-request.bin; run.sh then sends that request to the switch’s management IP over port 80 and opens a listener on port 8888 to catch the resulting root reverse shell — this must be run against a freshly booted device before it serves its first real HTTP request.
Detection & Indicators of Compromise
Signs of compromise:
- Unexpected root shell/reverse-connection processes running on the switch’s embedded OS
- Switch management HTTP server crashing or restarting shortly after boot
- Outbound connections from the switch to non-management infrastructure
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for a firmware update addressing the /data/login.json handler |
| Interim mitigation | Restrict management-interface network access to trusted hosts only, disable remote web management if not required, and monitor for anomalous traffic immediately after device boot |
References
Notes
Mirrored from https://github.com/tangrs/cve-2026-1668-poc on 2026-07-05.
| |