Ubiquiti's UniFi Network Application ships a guest captive portal that hospitality and SMB networks use to gate their WiFi. The portal has a branding feature: the operator turns on portal_customized: true for the site and the splash page renders their logo, their colors, their terms of service instead of Ubiquiti's defaults. The setting is the configuration any hotel, café, or retail captive portal ends up with.
The same setting decides where the portal's resource loader reads from. With customization off, the loader resolves template paths inside the controller's JAR. With customization on, the loader resolves them against the on-disk portal directory under the controller's data tree. The renderer does not know which backend it is talking to.
CVE-2026-22557 is path traversal on the renderer that serves the portal's failure page. The renderer reads the page_error query parameter, prepends nothing, hands the literal string to the loader. With customization off, the traversal walks the JAR, bounded by whatever Ubiquiti chose to bundle. With customization on, the traversal walks the filesystem, bounded by the unix permissions of the user the controller runs as. That user can read the keystore.
The sandbox was the JAR. The customization feature was the toggle.
The endpoint legitimate clients reach by POST
The vulnerable URL is /guest/s/<site>/wechat/sign. The handler is UniFi's WeChat-login signature callback, the place where a guest who picked "Sign in with WeChat" lands after Tencent redirects them back. Legitimate clients reach it via POST carrying WeChat's signed assertion. The dispatcher routes POST into the WeChat handler. It also accepts GET on the same path, and on a GET it falls through to the failure-page renderer instead.
The failure-page renderer is the code that tells a guest "your sign-in failed, please try again." Captive portals have a long list of failure modes (timeout, declined terms, expired session, missing WeChat field, declined gateway), and the renderer is parameterised by a page_error query parameter that names the error template. Operators with customized portals can ship their own error pages; the failure-page renderer is the loader that finds them.
The exploit is one request:
GET /guest/s/default/wechat/sign?page_error=../../../../system.properties HTTP/1.1
Host: target:8443
Accept: application/octet-stream
No POST body. No authentication. No session cookie. The dispatcher sees GET, routes to the failure-page renderer, the renderer takes page_error as the template name, hands the literal ../../../../system.properties to the resource loader, and the loader returns whatever it finds. If portal_customized: true is set on the queried site, the loader is reading from disk. The bytes come back in the HTTP response.
NVD's record for this CVE describes the consequence as a path traversal that "could be manipulated to access an underlying account." That sentence covers the controller's admin password. It does not cover the seven other categories of secret the same primitive returns.
The two backends behind one resolver
Bishop Fox's detection tool, BishopFox/CVE-2026-22557-check, makes the two-backend structure explicit by probing the backends separately. The script's stage-2 calibration uses system.properties, a small configuration file that exists in BOTH the JAR's bundled defaults AND on the controller's disk as the runtime config the operator's edits are written into. A successful read of system.properties at depth N means the traversal fires AT all, regardless of which backend is active. The script's comment names this distinction:
# Stage-2 depth-calibration anchor. A small configuration file readable from
# both the disk branch and the JAR classpath fallback, so it serves only as
# a depth oracle (not as a branch oracle).
CALIBRATION_FILE = ("system.properties", b"system.properties")
Stage-3 asks a different question: is the disk branch active right now on this site? The tool reads firmware.json or uidb.json, runtime catalog files populated by the controller at runtime and never bundled into the JAR. The script's comment, lightly repunctuated:
# Stage-3 branch-confirmation probe. Runtime-populated catalog files that
# exist on disk but are not bundled in any JAR. A 200 here positively
# confirms the filesystem branch is active.
FS_PROBES: tuple[tuple[str, bytes | None], ...] = (
("firmware.json", b'"version"'),
("uidb.json", b'"name"'),
)
A 200 on either probe means the loader walked the actual filesystem. That is the precondition for arbitrary file read.
The structure of the tool is the structure of the bug. Bishop Fox is treating the controller as a black box and using the difference in file availability between the two backends as an oracle for which backend is wired in. They built a two-stage probe because the application has two backends. They calibrated separately because the safety property of each backend is separate. The tool's three verdicts (VULNERABLE, PARTIALLY EXPOSED, NOT VULNERABLE) map directly to "disk branch active," "vulnerable build but JAR branch active on this site," and "patched build."
PARTIALLY EXPOSED is the verdict that gives the design away. It says: on this site, today, the traversal is still reachable, but the loader is bounded by what Ubiquiti happened to bundle in the JAR. The same controller is one portal_customized: true flip on any of its sites away from VULNERABLE. The application binary is not safe; this site's backend just happens to be the bounded one.
What customization meant
The README does not euphemise the deployment shape. Quote:
When portal_customized: true is set on the queried site (the configuration any branded captive portal, such as a hotel, retail, or café deployment, ends up with), the loader resolves that path against the on-disk portal directory, and the path can escape it.
Every UniFi controller serving a captive portal with the operator's brand on it has portal_customized set on at least one site. That is the deployment shape across hospitality, retail, education, and small commercial property. Conference centers. Hotel chains. Café franchises. Coworking. Multi-tenant retail. Every public WiFi splash page that is not Ubiquiti's default is a candidate.
And it is per-site. A controller with multiple sites is exploitable as soon as ANY one site has the customization flag set, because the renderer's backend choice is per-site, and an unauthenticated attacker picks the site they want to probe in the URL. The detection tool re-runs per site for exactly this reason. An attacker probing a controller scans the same way: enumerate sites, try the traversal at each one, the first hit is enough.
The product team at Ubiquiti described customization as a UX feature. The marketing page describes it as a UX feature. The operator turned it on for a UX reason. The setting's effect on the resource loader was not in any of the descriptions the operator read.
What the renderer can now read
Bishop Fox's tool prints, on a VULNERABLE result, the list of credentials the operator now has to rotate:
After patching, rotate credentials that may have been
exposed: admin passwords, the SSH credential the controller
pushes to managed devices, the controller's TLS keystore,
RADIUS / VPN / WireGuard secrets, SMTP relay passwords,
and any payment-gateway keys.
Read that list as the answer to "what is on the disk the failure-page renderer now walks." The administrator password for the controller's web UI. The SSH credential the controller pushes to every UniFi device it adopts, which means every access point, every switch, every gateway, every Dream Machine on the network. The TLS keystore including the private key the controller presents in its own TLS handshake. RADIUS shared secrets used to authenticate wireless clients on the operator's network. VPN and WireGuard keys for any tunnels the controller terminates. SSL-inspection CA material if the operator is doing TLS interception. SMTP relay passwords for the controller's alert mail. Payment-gateway keys if the captive portal takes payment for WiFi (hospitality hot-spot paywalls, some hotel chains).
NVD's record describes the consequence as "could be manipulated to access an underlying account." That clause captures the first item. It silently drops the other seven.
A hotel's controller is one unauthenticated GET away from leaking the credential its access points use to phone home. Whoever holds that credential is inside the L2 of the hotel's network as far as those devices are concerned.
Same code. Two security properties.
The bug Ubiquiti shipped is not that they forgot to validate page_error. The bug is that they shipped a resource loader whose safety came from the storage backend, and then shipped a feature that toggles the backend.
When the loader's backend was the JAR, ../ in the user-controlled template name was a partial primitive: an attacker could walk Ubiquiti's bundled resource tree, bounded by whatever Ubiquiti chose to ship. Annoying. Possibly useful for fingerprinting the build. Not arbitrary file read. The code's apparent safety was not in the code. It was a property of the underlying URL the loader was holding (jar:file:...), and of the resource-resolution semantics of the layer reading that URL. The call site looked harmless because the call site's behaviour was bounded by what existed at the other end.
When customization was added, the loader's backend became the filesystem. The same call site now resolved through file: URLs against a real directory under the controller's data tree. The code did not change. Its safety did. Walking up ../ past the portal directory now reaches the configuration tree, the keystore, the SSH key Ubiquiti's adoption protocol uses, the RADIUS shared secret. The renderer that printed "your sign-in failed, please try again" is now an oracle for the controller's secret material.
This is the shape that produces a Design Debt Driver. The customization feature is the substrate. The path-traversal in the failure-page renderer is one instance the substrate produced. The patch in SAB-062 closes the renderer's specific traversal. The substrate, a design where a per-site configuration flag swaps the resource backend the renderer walks, remains. The next exploit primitive in this codebase lives wherever the next user-controlled string flows into a resolver whose safety came from the storage layer.
The endpoint that branded your guest WiFi reads your keystore
Hospitality networks turned on portal_customized so the captive portal would say "Welcome to The Plaza" instead of "Welcome to UniFi." Retail networks turned it on so the splash page would offer a coupon for the store. Cafés turned it on so guests would see the café's logo. The branding feature was the visible thing. Ubiquiti's product documentation describes it as a UX feature. The operator who turned it on did so for a UX reason.
The same flag, on the same site, in the same line of YAML, is what made the failure-page renderer reach the keystore.
PoC: BishopFox/CVE-2026-22557-check
The patch closes this CVE. The customization feature still decides which backend the renderer walks.