Critical UniFi OS Exploit Chain Grants Unauthenticated Root Access to Network Management Consoles — No Credentials Required

Three chained vulnerabilities in Ubiquiti UniFi OS Server allow attackers to bypass authentication, execute commands, and escalate to root with no credentials or user interaction — granting full control over network infrastructure, surveillance cameras, and door access systems.

Share
Critical UniFi OS Exploit Chain Grants Unauthenticated Root Access to Network Management Consoles — No Credentials Required

Bishop Fox researchers have validated a complete unauthenticated remote code execution chain against Ubiquiti UniFi OS Server 5.0.6 and earlier, combining three vulnerabilities to achieve root access with no credentials, no user interaction, and no prior access to the target system. The vulnerabilities have been patched in version 5.0.8, but the severity of the chain and the breadth of what a compromised UniFi console controls makes this a high-priority remediation target.

The three vulnerabilities — CVE-2026-34908 (improper access control), CVE-2026-34909 (path traversal), and CVE-2026-34910 (command injection) — each received maximum severity ratings individually. However, Ubiquiti's advisory did not mention that the three flaws could be chained together for unauthenticated remote code execution, significantly understating the real-world impact.

The attack chain exploits a mismatch between how UniFi OS validates and routes incoming requests. The authentication component evaluates the raw request URI, while Nginx routes requests based on a normalized version of the same URI. By crafting requests that appear to target an authentication-exempt endpoint in their raw form but resolve to protected internal routes after normalization, attackers bypass authentication entirely and reach backend services that should not be publicly accessible.

Once past authentication, the attacker targets a package-update endpoint where CVE-2026-34910 allows unvalidated user input to be passed directly into a shell command. The injected commands execute under a highly privileged service account with passwordless sudo access to several system binaries, making the jump from command execution to full root access trivial.

What makes this chain particularly dangerous is what root access on a UniFi console means. A UniFi OS Server is not a generic Linux box — it is the management plane for an organization's entire network infrastructure. Depending on the deployment, that includes network switches, wireless access points, physical access door controllers, surveillance cameras, and the identity systems tied to them. Root on the console is administrative control over everything it governs.

The attack also leaves minimal forensic evidence. Because no authentication is required, there is no failed-login trail to investigate. Bishop Fox warns that identifying previous exploitation may be challenging given the absence of authentication artifacts.

Bishop Fox has released a free detection script that safely probes whether an instance is vulnerable to the chain without executing any dangerous commands. The script classifies targets as vulnerable, patched, unaffected, or inconclusive. However, it does not detect whether exploitation has already occurred or whether persistence mechanisms are present.

Defenders can also monitor for requests containing /api/auth/validate-sso/, watch for requests to ucs/update/latest_package, look for suspicious child processes under ucs-update, and flag unexpected sudo commands.

Action Items:

Upgrade to UniFi OS Server 5.0.8 or later immediately. Before upgrading, confirm the system has not already been compromised — patching a backdoored console does not remove an attacker who already has root. Run Bishop Fox's detection script against all UniFi OS instances to identify vulnerable deployments. Audit network logs for the request patterns described above. Organizations running UniFi consoles that manage physical access controls and surveillance cameras should treat this with the same urgency as a domain controller compromise — root on the console is root on the physical security infrastructure.

Read more