exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Teltonika RUT9XX Reflected Cross Site Scripting

Teltonika RUT9XX Reflected Cross Site Scripting
Posted Oct 12, 2018
Authored by David Gnedt | Site sba-research.org

Teltonika RUT9XX routers with firmware before 00.05.01.1 are prone to cross site scripting vulnerabilities in hotspotlogin.cgi due to insufficient user input sanitization.

tags | exploit, cgi, vulnerability, xss
advisories | CVE-2018-17533
SHA-256 | 4cce626d1539e2d1d2f295b036e17ec9f4779d6658a6a91f1e7574c7c10e9d5d

Teltonika RUT9XX Reflected Cross Site Scripting

Change Mirror Download
# Teltonika RUT9XX Reflected Cross-Site Scripting (XSS) #

Link: https://github.com/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180410-01_Teltonika_Cross_Site_Scripting

## Vulnerability Overview ##

Teltonika RUT9XX routers with firmware before 00.05.01.1 are prone to
cross-site scripting vulnerabilities in `hotspotlogin.cgi` due to
insufficient user input sanitization.

* **Identifier** : SBA-ADV-20180410-01
* **Type of Vulnerability** : Cross Site Scripting
* **Software/Product Name** : [Teltonika RUT955](https://teltonika.lt/product/rut955/)
* **Vendor** : [Teltonika](https://teltonika.lt/)
* **Affected Versions** : Firmware RUT9XX_R_00.05.00.5 and probably prior
* **Fixed in Version** : RUT9XX_R_00.05.01.1
* **CVE ID** : CVE-2018-17533
* **CVSSv3 Vector** : CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
* **CVSSv3 Base Score** : 8.2 (High)

## Vendor Description ##

> RUT955 is a highly reliable and secure LTE router with I/O, GNSS and
> RS232/RS485 for professional applications. Router delivers high
> performance, mission-critical cellular communication and GPS location
> capabilities.

Source: <https://teltonika.lt/product/rut955/>

## Impact ##

By exploiting the documented vulnerabilities, an attacker can execute
JavaScript code in a user's browser within the origin of the router.
The attacker might take over existing or future administrative web
management sessions and gain access to the device.

We recommend upgrading to version RUT9XX_R_00.05.01.1 or newer, which
includes fixes for the vulnerabilities described in this advisory.

## Vulnerability Description ##

Several parameters of the script `hotspotlogin.cgi` are affected by
reflected cross-site scripting vulnerabilities. The scripts are part of
the coova-chilli captive portal. However, in firmware versions before
RUT9XX_R_00.04.233 the vulnerabilities are exploitable regardless of
the device configuration, even if no captive portal is configured.

More concretely, the following parameters are vulnerable:

* `/cgi-bin/hotspotlogin.cgi`
* *If* res=failed or res=notyet
* challenge
* uamip
* uamport
* userurl

The affected script outputs these input parameters in an HTML context
without proper output encoding.

The vulnerabilities are located in `hotspotlogin.cgi`:

```lua
[...]
elseif result == 2 or result == 5 then
replace_tags.formHeader = [[<form name="myForm" method="post" action="]] .. loginpath .. [[">
<INPUT TYPE="hidden" NAME="challenge" VALUE="]] .. challenge .. [[">
<INPUT TYPE="hidden" NAME="]] .. names["uamip"] .. [[" VALUE="]] .. uamip .. [[">
<INPUT TYPE="hidden" NAME="]] .. names["uamport"] .. [[" VALUE="]] .. uamport .. [[">
<INPUT TYPE="hidden" NAME="]] .. names["userurl"] .. [[" VALUE="]] ..userurldecode .. [[">
<INPUT TYPE="hidden" NAME="res" VALUE="]] .. res .. [[">]]
replace_tags.formFooter = [[</form>]]
[...]
```

As the above code snippet shows, the parameter `userurl` contains user
input and is output without performing any HTML escaping.

## Proof-of-Concept ##

An attacker can exploit this vulnerability by manipulating the `userurl`
query parameter:

```text
http://<IP>/cgi-bin/hotspotlogin.cgi?res=failed&userurl="><script>alert(1)</script><span
```

An attacker can exploit the other parameters (e.g. challenge) via POST
requests:

```html
<form action="http://<IP>/cgi-bin/hotspotlogin.cgi" method="post" enctype="text/plain">
<input type="hidden" name="res" value="failed&challenge="><script>alert(1)</script><span"">
<input type="submit" value="challenge">
</form>
```

## Timeline ##

* `2018-04-10` identification of vulnerability in version RUT9XX_R_00.04.161
* `2018-04-16` re-test of version RUT9XX_R_00.04.172
* `2018-04-16` initial vendor contact through public address
* `2018-04-18` vendor response with security contact
* `2018-04-19` disclosed vulnerability to vendor security contact
* `2018-04-26` vendor released fix in version RUT9XX_R_00.04.233
* `2018-07-09` notify vendor about incomplete fix in version RUT9XX_R_00.05.00.5
* `2018-07-19` vendor released fix in version RUT9XX_R_00.05.01.1
* `2018-07-25` re-test of version RUT9XX_R_00.05.01.2
* `2018-09-25` request CVE from MITRE
* `2018-09-26` MITRE assigned CVE-2018-17533
* `2018-10-11` public disclosure

## References ##

* Firmware Changelog: <https://wiki.teltonika.lt/index.php?title=RUT9xx_Firmware>

## Credits ##

* David Gnedt ([SBA Research](https://www.sba-research.org/))

Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    14 Files
  • 15
    Oct 15th
    49 Files
  • 16
    Oct 16th
    28 Files
  • 17
    Oct 17th
    23 Files
  • 18
    Oct 18th
    10 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    5 Files
  • 22
    Oct 22nd
    12 Files
  • 23
    Oct 23rd
    23 Files
  • 24
    Oct 24th
    9 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close