cWifi Hotspot Wireless CP Code Execution

cWifi Hotspot Wireless CP suffers from a code execution vulnerability.

MD5 | 2371a158d17279351da76595665f3e7a

Document Title:
cWifi Hotspot Wireless CP - Code Execution Vulnerability

References (Source):

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

Vulnerability Class:
Code Execution

Current Estimated Price:
2.000€ - 3.000€

Abstract Advisory Information:
The vulnerability laboratory core research team discovered code execution vulnerability in the cWifi Hotspot Wireless Captive Portal.

Affected Product(s):
Product: cWifi Hotspot Wireless Captive Portal - (PHP) (Web-Application)

Vulnerability Disclosure Timeline:
2021-12-15: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Exploitation Technique:

Severity Level:

Authentication Type:
Restricted Authentication (Guest Privileges)

User Interaction:
No User Interaction

Disclosure Type:
Independent Security Research

Technical Details & Description:
A code execution vulnerability has been discovered in the official cWifi Hotspot wireless captive portal web-application.
The vulnerability is located in the login status post method request for the spot-cwifi. Remote attackers are able to inject own malicious ip and
mac adress credentials in the post method data request. that results in several different typ of vulnerabilities in connection to the phpsessionid.
Attackers are able to provoke client-side script code execution via mac or ip parameter in the status post method request. Thus allows the attacker
to gain access to the victims wifi connection and session credentials to access. The issue can be process by a full remote attacker after connecting
as guest or member to the wifi. The parameter in the post method request are no sanitized correctly and results in a client-side execution.

Request Method(s):
[+] POST

Vulnerable Module(s):
[+] /v2/
[+] /logout

Vulnerable File(s):
[+] status.php

Vulnerable Parameter(s):
[+] ip
[+] mac
[+] adress

Proof of Concept (PoC):
The critical code execution vulnerability can be exploited by remote attackers with guest access or by authenticated user accounts.
For security demonstration or to reproduce the web vulnerability follow the provided information and steps below to continue.

Vulnerable Source: status.php (v2/status.php -
<div class="container-fluid">
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form data-ajax="false" action='/v2/status.php?PHPSESSID=06u1m6qlhcp4tbuuapnq8du5c7' method="post">
<p><span class="zwischenh1gelb gelb bold">MAC-Adresse: <[MALICIOUS INJECTED CODE EXECUTION!]></span></span>
<span class="bold">IP Adresse:</span><[MALICIOUS INJECTED CODE PAYLOAD EXECUTION!]></p>
<p><span class="bold">Bytes up/down:</span>7.2 MiB/ 221.6 MiB</p>
<p><span class="bold">Session time:</span>7m56s</p>
<button name="ABMELDEN" type="submit" class="btn btn-primary btn-lg btn-block">abmelden</button>
<button name="DELETE" type="submit" class="btn btn-danger btn-lg btn-block">abmelden und Daten löschen</button>
<div class="col-md-4"></div>
</div> </div>
-- logout status
<td valign="middle" align="center">
<b>you have just logged out</b> <br><br>
<table class="tabula" border="1">
<tbody><tr><td align="right">user name</td><td><[MALICIOUS INJECTED CODE PAYLOAD EXECUTION!]></td></tr>
<tr><td align="right">IP address</td><td><[MALICIOUS INJECTED CODE PAYLOAD EXECUTION!]></td></tr>
<tr><td align="right">MAC address</td><td><[MALICIOUS INJECTED CODE PAYLOAD EXECUTION!]></td></tr>
<tr><td align="right">session time</td><td>4m12s</td></tr>
<tr><td align="right">time left</td><td>23h55m48s</td></tr>
<tr><td align="right">bytes up/down:</td><td>49.1 KiB / 169.2 KiB</td></tr>
<form action="" name="login" onsubmit="return openLogin()">
<input type="submit" value="log in">

--- PoC Session Logs (POST) ---
POST /v2/status.php HTTP/1.1
Content-Length: 1129
Cache-Control: max-age=0
Sec-Ch-Ua: "Chromium";v="93", " Not;A Brand";v="99"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Upgrade-Insecure-Requests: 1
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/93.0.4577.82 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Connection: close
-<[MALICIOUS INJECTED CODE!]>%3A80&ssl-login=no
&domain=&interface-name=2_HotSpotA&ip=<[MALICIOUS INJECTED CODE!]>&logged-in=yes&mac=<[MALICIOUS INJECTED CODE!]>&trial=no&username=90%3ACC%3ADF%3A96%3AF6%3A59
&host-ip=<[MALICIOUS INJECTED CODE!]>&idle-timeout=5h&idle-timeout-secs=18000&limit-bytes-in=&limit-bytes-out=&refresh-timeout=1m&refresh-timeout-secs=60
HTTP/1.1 200 OK
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: PHPSESSID=06u1m6qlhcp4tbuuapnq8du5c7; path=/
Cache-Control: no-store, no-cache, must-revalidate
Vary: Accept-Encoding
Content-Length: 2137
Connection: close
Content-Type: text/html; charset=UTF-8
-- via Login
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 1078
Connection: keep-alive
Cookie: PHPSESSID=tvpvp06jktbs8hvgm8efh1eh33
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
phone=&<[MALICIOUS INJECTED CODE!]>:80&ssl-login=no&server-name=Client2822_HotSpot
&link-orig=&domain=&interface-name=2_HotSpotA&ip=<[MALICIOUS INJECTED CODE!]>&logged-in=no&mac=<[MALICIOUS INJECTED CODE!]>&trial=no&username=
&host-ip=<[MALICIOUS INJECTED CODE!]>&idle-timeout=&idle-timeout-secs=0
&uptime=0s&uptime-secs=0&bytes-in=0&bytes-in-nice=0 B&bytes-out=0&bytes-out-nice=0 B&packets-in=0&packets-out=0&remain-bytes-in=&remain-bytes-out=&session-id=
POST: HTTP/1.1 200 OK
Server: Apache/2.4.18 (Ubuntu)
Cache-Control: no-store, no-cache, must-revalidate
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 334
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

Security Risk:
The security risk of the code execution web vulnerability that allows to attack by multiple vectors to compromise the wifi is estimated as high.

Credits & Authors:
Vulnerability-Lab [[email protected]] -

Disclaimer & Information:
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab
or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits
or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do
not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.
We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data.

Domains: ; ;

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other
information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list, modify, use or
edit our material contact (admin@ or research@) to get a ask permission.

Copyright © 2021 | Vulnerability Laboratory - [Evolution Security GmbH]™


Related Posts