Skip to content
Path traversal Write-up Intermediate

Looting UniFi Controllers: Detecting and Weaponizing CVE-2026-22557

An unauthenticated path traversal in the UniFi Network Application's guest captive portal lets an attacker read arbitrary files from the controller's data directory, including automatic backups that contain cleartext device SSH credentials and other secrets. An attacker could use those secrets to take over managed network devices and the controller itself.

bishopfox.com

Published on bishopfox.com

On March 18, 2026, Ubiquiti published Security Advisory Bulletin 062 (SAB-062) covering three vulnerabilities in the UniFi Network Application. The most severe, CVE-2026-22557, carries a CVSS score of 10.0 and is described by the vendor as a path traversal that "could be manipulated to access an underlying account."…

The author, on bishopfox.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The failure-page renderer passes the attacker-controlled page_error request parameter directly to a file loader that concatenates it onto the portal directory without canonicalisation or a prefix check, so '../' segments escape the intended directory.

Impact

An unauthenticated attacker could read the controller's backup and obtain cleartext device SSH credentials, VPN keys, Wi-Fi passphrases and other secrets, potentially taking over all managed devices; the file read only works on sites with a customised guest portal, and the keystore-based interception additionally requires the attacker to be positioned on the network path.

What the attacker needed

Vulnerable version (before 10.1.89/10.2.97/9.0.118); customised guest portal on at least one site; network access to a connector GuestServlet accepts; no authentication required

The fix

The vulnerability was fixed in versions 10.1.89, 10.2.97 and 9.0.118, and operators who cannot patch immediately should block external access to the guest-portal and admin connectors and rotate every secret that lived in a backup.

How it was found

  1. Send a GET request to the WeChat sign-in handler to make the portal throw an exception and populate the error attribute.
  2. Include a page_error parameter containing traversal segments pointing at a file outside the portal directory.
  3. Calibrate the traversal depth using system.properties, which answers in both the classpath and filesystem branches.
  4. Confirm the filesystem branch with a disk-only file such as firmware.json.
  5. Read autobackup_meta.json to learn the current backup filename, then read that backup file.
  6. Decrypt the backup with the static key and IV compiled into the application to obtain cleartext credentials.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The guest Wi-Fi splash page on a UniFi controller takes a file name from the web request and reads that file from disk without checking where the name points. By putting '..' segments in the name, an attacker can step outside the portal folder and read any file the controller process can access, such as its own backup. The backup is encrypted with a key that ships inside the product, so it can be decrypted and yields device passwords.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.