RCE Security Advisory https://www.rcesecurity.com 1. ADVISORY INFORMATION ----------------------- Product: Ubiquiti Networks UniFi Vendor URL: www.ubnt.com Type: Cross-Site Request Forgery [CWE-353] Date found: 2015-03-19 Date published: 2016-02-23 CVSSv3 Score: 6.3 (AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L) CVE: - 2. CREDITS ---------- This vulnerability was discovered and researched by Julien Ahrens from RCE Security. 3. VERSIONS AFFECTED -------------------- UniFi v3.2.10 older versions may be affected too. 4. INTRODUCTION --------------- The UniFiĀ® Controller software is a powerful, enterprise wireless software engine ideal for high-density client deployments requiring low latency and high uptime performance. A single UniFi Controller running in the cloud can manage multiple sites: multiple, distributed deployments and multi-tenancy for managed service providers. (from the vendor's homepage) 5. VULNERABILITY DESCRIPTION ---------------------------- A generic Cross-Site Request Forgery protection bypass vulnerability was identified in UniFi v3.2.10 and prior. The application uses a CSRF protection, which is based on verifying the Referer header, but does not catch the case where the Referer header is completely missing. This leads to a generic CSRF protection bypass, resulting in all application specific functionalities becoming vulnerable. An attacker needs to trick the victim to visit an arbitrary website in order to exploit the vulnerability. Successful exploits can allow the attacker to compromise the whole application including connected devices, e.g. by changing passwords of users, adding new users, changing device usernames and passwords or by creating new WLAN configurations. 6. PROOF-OF-CONCEPT ------------------- The following PoC changes the password of the user "admin" to "csrfpwd":