Right now, if you have a UniFi OS Server console reachable from the internet and haven’t patched past 5.0.8, a Mirai or Gaafgyt bot can find it, send it one crafted HTTP request, and get a root shell back — no login, no user interaction, no exploit chain sophistication beyond “curl with the right encoding.” CISA put that chain (CVE-2026-34908/09/10) on the Known Exploited Vulnerabilities catalog on June 23 with a three-day remediation clock for federal agencies. That would be a bad enough week for any vendor on its own.

It’s not Ubiquiti’s worst week of 2026. It’s not even its worst month. Since October 2025, Ubiquiti has published six security advisory bulletins covering the UniFi product line — SAB-056, 058, 062, 064, 065, and 066 — averaging one every five to six weeks. Five of those six contain at least one vulnerability scored 9.9 or 10.0 on CVSS. The most recent, published July 2, disclosed 25 vulnerabilities in a single advisory. And when you line the bulletins up chronologically, the bugs aren’t a random walk through the CWE index. They’re the same two mistakes, made repeatedly, by different teams, in different products, sitting on the same shared platform.

That’s the actual story here, and it’s bigger than any single vendor. UniFi OS is a shared base layer — one Nginx gateway, one authentication service, one update/package subsystem — that every product in the line sits on top of: Network, Protect (cameras), Access (physical door locks), Talk (VoIP), Connect. That architecture is efficient to build and pleasant to administer from one console. It also means a bug in the gateway’s auth logic, or in a helper library that shells out to the OS, doesn’t stay contained to one product. It becomes every product’s bug simultaneously. This piece reconstructs the technical anatomy of the worst chain in that run, then walks the timeline to show why “patch and move on” undersells what’s actually going wrong.

The chain that’s being exploited right now

The CVE-2026-34908/34909/34910 chain, disclosed in SAB-064 on May 21 and confirmed under active Mirai/Gaafgyt exploitation by the time CISA added it to KEV a month later, is the cleanest illustration of the pattern because Bishop Fox — who found and reported it — published a full technical walkthrough alongside a safe detection scanner.

Stage 1 — the gateway trusts the wrong string. UniFi OS Server’s Nginx layer decides whether a request needs authentication by inspecting the raw, percent-encoded request URI. It exempts a specific prefix, /api/auth/validate-sso/, from the auth check — reasonable, since that endpoint has to be reachable pre-login. But the proxy’s upstream routing decision operates on the normalized URI, after percent-decoding and dot-segment collapse. That’s the entire bug. A request path like:

1
GET /api/auth/validate-sso/..%2f..%2fapi/internal/some-authenticated-route HTTP/1.1

reads, in raw form, as beginning with the exempt prefix — so the auth gate waves it through. But by the time it reaches the routing logic, %2f has decoded to / and the .. segments have collapsed, and what actually gets proxied to the backend is the fully-qualified authenticated internal route, received by a service that assumes anything reaching it already cleared auth. This is a textbook instance of a well-documented vulnerability class — front-end and back-end disagreeing about what a URL means — the same shape of bug that’s bitten Tomcat-behind-Nginx deployments, ChatGPT’s own infrastructure, and a long list of reverse-proxy configurations over the last several years. It is not exotic. It is a known failure mode that a differential test between raw-URI and normalized-URI routing would have caught in code review.

Stage 2 — the backend shells out with a string. Past the gate, the attacker reaches a package-update endpoint that accepts a caller-supplied package name and — instead of validating it against an allowlist or passing it as an argument vector — concatenates it directly into a shell command string. Injecting ; or backticks into the package name field turns “update this package” into “run this arbitrary command.” The service account executing that command has sudo NOPASSWD rights, so the injected command runs as root without a second privilege-escalation step. One HTTP request, unauthenticated, root shell.

For detection, Bishop Fox’s CVE-2026-34908-check tool safely probes for the discrepancy without triggering the full chain, and is worth running against any UniFi OS Server console you administer even if you believe it’s already patched — “patched” and “verified patched” are different claims when an update requires a console reboot that may not have completed everywhere.

If you were internet-exposed before patching to 5.0.8, don’t stop at applying the update. Hunt for the artifacts Mirai and Gaafgyt variants typically leave: unfamiliar binaries or scripts in /tmp or /var/tmp, cron entries you didn’t create, processes with generic or randomized names holding open sockets, and outbound connections to IPs with no Ubiquiti or your-organization association. A quick sudoers audit is also cheap insurance:

1
grep -rn NOPASSWD /etc/sudoers /etc/sudoers.d/ 2>/dev/null

on any UniFi OS box you can get a shell on — not to fix Ubiquiti’s service account configuration, which you don’t control, but to understand what a future bug in any service running there inherits for free.

The same bug, seven months earlier, in a different product

Here’s the part that turns this from “one bad chain” into “a pattern.” In October 2025, Ubiquiti shipped SAB-056 for CVE-2025-52665: an unauthenticated RCE in the UniFi backup orchestration API. The vulnerable endpoint, /api/ucore/backup/export, was designed to be reachable only on loopback — but was found externally accessible via port 9780. The dir parameter it accepted was interpolated directly into a chain of shell commands (mktemp, chmod, tar) with no sanitization or escaping. An attacker who reached the endpoint could inject arbitrary commands through the directory path. Because the backup service’s blast radius extends into UniFi Access, the exploited RCE bridged into physical door control and NFC credential management — a web-app bug becoming a “can this attacker unlock the building” bug.

Set that next to CVE-2026-34910 from May 2026: unauthenticated command injection via unsanitized user input concatenated into a shell command, in a different UniFi OS service, on a different product surface, seven months later. Same root cause — string-concatenation shell-out instead of argument-vector exec — shipped twice by (presumably) different engineering teams working on different services that both happen to sit on UniFi OS. That’s not two unrelated bugs. That’s a coding pattern that exists somewhere in Ubiquiti’s shared libraries or internal engineering culture and hasn’t been eliminated by static analysis, code review, or the first CVE teaching the lesson.

The auth-bypass side of the ledger tells the same story. SAB-062 (March 2026) disclosed CVE-2026-22557, a CVSS 10.0 path traversal in the UniFi Network Application enabling unauthenticated account takeover — the third maximum-severity flaw in the UniFi line within a year at the time it was reported, before the two chains covered above even existed. SAB-065 (June 2026) added CVE-2026-47368, another path traversal, this one letting a low-privileged network attacker read arbitrary configuration and log files. SAB-066 (July 2026) explicitly calls out CVE-2026-54403 — an 8.6-severity path traversal — as chainable with other bugs in the same bulletin to remove their low-privilege precondition entirely, which is Ubiquiti’s own advisory language admitting that a “medium-ish” bug in isolation becomes a de facto unauthenticated primitive once you account for what else is reachable behind the gateway. Four separate instances of “the boundary that’s supposed to require identity or privilege doesn’t actually hold” in sixteen months, disclosed by the vendor itself, is not bad luck. It’s a boundary-enforcement architecture — check identity once, at the edge, and trust it downstream — that keeps failing in new places because the checking keeps happening in the wrong layer.

Why “one console, every product” makes this worse than a normal vendor CVE

Compare Ubiquiti’s situation to a single-purpose appliance vendor shipping a bug in one product line. When Fortinet or Ivanti ships a critical SSO bypass, it’s bad, but it’s scoped to whatever that specific product does. UniFi’s pitch is the opposite of scoped: one console, one login, one gateway, managing your Wi-Fi, your switches, your VPN gateway, your security cameras, and — for a growing number of deployments — your physical door locks and VoIP. That’s genuinely useful for a lean IT team. It also means the attack surface for “compromise the network” and the attack surface for “compromise the building” are the same HTTP endpoint fronted by the same Nginx process.

CVE-2025-52665 already proved this isn’t hypothetical: a backup-API bug in what looks like a boring administrative feature turned into door-control compromise because UniFi Access shares the platform. CVE-2026-50748 in July’s bulletin — command injection specifically in UniFi Access — means physical access control has now had a critical remote-code-execution-class bug disclosed in back-to-back bulletins roughly eight months apart. If you’re running UniFi Access for a facility and treating it as “just another network appliance to patch when convenient,” that calculus needs to change. A missed patch window on a door controller is a different risk category than a missed patch window on a switch.

The Censys exposure numbers make the aggregate risk concrete rather than theoretical: roughly 100,000 UniFi OS endpoints are directly reachable from the public internet as of the July bulletin, a figure that’s stayed in the same range across multiple bulletins going back to at least the CVE-2026-22557 disclosure in March. That population isn’t shrinking as bulletins accumulate, which tells you the “just don’t expose the console to WAN” advice — correct, and repeated in every one of Ubiquiti’s own advisories — isn’t reaching the people running these boxes, or isn’t practical for how they’re deployed (remote-management convenience for MSPs and small sites without a VPN concentrator is a real and common tradeoff, not just negligence).

What to actually do about it

If you operate UniFi infrastructure:

  1. Get every console off the public internet, full stop. This single control neutralizes the entire bulletin history above, regardless of patch cadence — every one of these bugs requires network reachability to the admin console or its API. Put remote management behind a VPN or restrict source IPs at the WAN firewall. If a client insists on direct WAN exposure for convenience, that’s the conversation to have before the next bulletin, not after.
  2. Patch on disclosure, not on your normal appliance cadence. Given five bulletins with critical-severity flaws in the last ten months, treat UniFi OS updates like browser updates, not like firmware you batch quarterly. Subscribe to Ubiquiti’s community bulletin feed directly rather than relying on aggregator delay.
  3. Prioritize UniFi Access and Protect patches above Network/Talk when triaging a multi-CVE bulletin like SAB-066. A command-injection bug in door control or a privilege-escalation path through video infrastructure has consequences that outlast a config rollback.
  4. Run Bishop Fox’s detection tooling and equivalent checks for other disclosed chains against your fleet, even on consoles you believe are patched, and hunt for Mirai/Gaafgyt artifacts on anything that was WAN-exposed before you patched.
  5. Audit what’s actually bridged behind your console. If UniFi Access or Protect shares a login and gateway with your general network management, know that a bug in the network side has a plausible path to the physical-security side, and design your incident response runbook accordingly.

If you build or operate any reverse-proxy-fronted platform — and this is the part that generalizes past Ubiquiti entirely:

  • Never let the auth decision and the routing decision look at different representations of the same URI. If your edge gateway decides auth-exemption based on the raw path, your upstream routing needs to make the identical decision on the identical representation, not a normalized one. Better: enforce authorization again at the service layer, so a gateway bypass degrades to “reached an unauthenticated internal call” instead of “full compromise.”
  • Never build a shell command by string concatenation from user input, ever, even for an internal or authenticated-only endpoint. Use an argument-vector exec API. This is decades-old advice that keeps getting relearned one CVE at a time because “it’s just an internal admin feature, no untrusted input reaches it” is a claim that’s true right up until an auth bypass makes it false.
  • Treat a shared OS/gateway layer across product lines as a single trust domain in your threat model, not as an implementation detail. If a bug in your update service can be reached from your camera product’s attack surface, your camera product’s security review needs to include your update service.

Ubiquiti will keep shipping bulletins — the cadence over the last ten months makes that close to a certainty, not a prediction. The useful takeaway isn’t “avoid UniFi.” It’s that the same shared-platform economics that make one console convenient to administer make one bug class expensive to eliminate, and the fix is architectural — separate trust enforcement per layer, argument-vector exec everywhere, and a WAN-facing posture that assumes the next bulletin is coming — not a faster patch cycle for the bulletin after this one.