CVE-2013-3572

MEDIUM6.1/ 10.0
Share:
Published: December 31, 2013 at 08:55 PM
Modified: April 11, 2025 at 12:51 AM
Source: cve@mitre.org

Vulnerability Description

Cross-site scripting (XSS) vulnerability in the administer interface in the UniFi Controller in Ubiquiti Networks UniFi 2.3.5 and earlier allows remote attackers to inject arbitrary web script or HTML via a crafted client hostname.

CVSS Metrics

Base Score
6.1
Severity
MEDIUM
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weaknesses (CWE)

Source: nvd@nist.gov

AI Security Analysis

01 // Technical Summary

Ubiquiti Networks UniFi Controller versions 2.3.5 and earlier are vulnerable to a cross-site scripting (XSS) attack. This vulnerability allows attackers to inject malicious scripts into the administrator interface, potentially leading to account compromise and system takeover by stealing administrator credentials or redirecting users to malicious websites.

02 // Vulnerability Mechanism

Step 1: Payload Delivery: An attacker crafts a malicious hostname containing a JavaScript payload (e.g., <script>alert('XSS')</script>). Step 2: Hostname Assignment: The attacker associates the malicious hostname with a client device, either by configuring the device directly or by manipulating DHCP settings. Step 3: Data Storage: The UniFi Controller stores the malicious hostname in its database without proper sanitization. Step 4: Administrator Access: An administrator logs into the UniFi Controller's web interface. Step 5: Information Retrieval: The administrator navigates to a page that displays client information, including the hostname. Step 6: Payload Execution: The UniFi Controller retrieves the malicious hostname from the database and renders it in the administrator's browser without proper encoding. The injected JavaScript payload executes within the administrator's browser context. Step 7: Exploitation: The injected JavaScript can perform various malicious actions, such as stealing the administrator's session cookies, redirecting the administrator to a phishing site, or executing arbitrary code within the administrator's browser.

03 // Deep Technical Analysis

The vulnerability stems from insufficient input validation and output encoding within the UniFi Controller's administer interface. Specifically, the software fails to properly sanitize the client hostname before displaying it within the web interface. This allows an attacker to inject malicious JavaScript code into the hostname field. When the administrator views the client's information, the injected script executes within the context of the administrator's browser, enabling the attacker to steal session cookies, redirect the administrator to a phishing site, or execute other malicious actions. The root cause is a lack of proper input validation and output encoding (e.g., HTML escaping) of the client hostname data when rendered in the administrator interface. This allows for the injection of arbitrary HTML and JavaScript.

CVE-2013-3572 - MEDIUM Severity (6.1) | Free CVE Database | 4nuxd