UniFi OS Server — Unauthenticated Root RCE Chain (CVE-2026-34908 / 34909 / 34910)
Executive Summary
Ubiquiti advisory SAB-064 (~2026-05-21) discloses three chained, maximum-severity (CVSS 3.1 = 10.0) vulnerabilities in UniFi OS Server, the self-hosted UniFi management application that runs on Linux. CVE-2026-34908 is an improper access-control flaw in the authentication gateway; CVE-2026-34909 is a path-traversal flaw in the same gateway that exposes underlying OS files; and CVE-2026-34910 is a command-injection flaw in the package-update service. Chained, they yield unauthenticated root command execution from a single crafted HTTP request with no user interaction.
The auth-bypass works by exploiting a divergence between the raw and normalized interpretation of a request URI: a request can be crafted so its raw form begins with the auth-exempt /api/auth/validate-sso/ prefix while the normalized form resolves to an authenticated route, defeating the gateway. The command injection then lands in the package-update route, which passes unsanitized package names to shell execution. Execution occurs under the ucs-update service account, which holds passwordless sudo to /usr/bin/dpkg — trivially escalated to root. Affected: UniFi OS Server <= 5.0.6 (unifi-core 5.0.126); fixed in 5.0.8 (unifi-core 5.0.153). Bishop Fox demonstrated the full end-to-end root shell on 5.0.6 and published a detection-analysis writeup; BleepingComputer reported active exploitation in June 2026.
The highest-fidelity defensive angle is behavioral: the UniFi OS process tree (unifi-core / node / the package updater, running as ucs-update) is not supposed to spawn an interactive shell, an interpreter, or a download tool. That single telemetry event — UniFi service process to sh/bash/python/perl — is the spine of this hunt and survives the payload/IP rotation that automated exploitation churns through.
Defender priority: Patch UniFi OS Server to >= 5.0.8 immediately and pull the management plane off the internet. Critically, patching does NOT evict an attacker — a recovered JWT signing key yields forged owner/admin tokens that work against patched consoles too. Treat any pre-patch internet-exposed instance as root-compromised: rotate the signing key (reboot), rotate all secrets, and rebuild from a known-good image where exploitation is confirmed.
Source Review & Web Hunter Notes
| Tier | Source | Key Finding | Carry Forward |
|---|---|---|---|
| 1 · Vendor | Ubiquiti SAB-064 (community.ui.com) | Three CVSS 10.0 flaws: improper access control, path traversal, command injection. Affects UniFi OS Server <= 5.0.6; fixed 5.0.8. | Yes |
| 1 · Research | Bishop Fox — Popping Root on UniFi OS Server | Full unauth root chain on 5.0.6; raw-vs-normalized URI bypass via /api/auth/validate-sso/; ucs-update + passwordless sudo dpkg; forged-token persistence after patch. | Yes |
| 1 · Research | BishopFox/CVE-2026-34908-check (GitHub) | Safe, non-exploitative vuln checker for reachable UniFi OS Servers. Use for exposure inventory. | Yes |
| 2 · Press | BleepingComputer | Critical UniFi OS bug lets hackers gain root without authentication; active exploitation (June 2026). | Yes |
| 2 · Press | GBHackers / CyberPress / ThreatAft | Auth-bypass flaws lead to unauthenticated root RCE; single crafted HTTP request; downstream risk to Access/Protect. | Partial |
Web-hunter note: Atomic IOCs (specific payload hashes, C2 IPs) are not durably published — exploitation is automated and infrastructure rotates. The pack therefore leads with behavioral detection on the UniFi process tree and treats any published file/IP indicators as perishable hunt/enrich values. The most consequential intel is that forged sessions survive patching — coverage must extend past patch verification to credential/session invalidation.
Hunt Brief & Attack Chain
Hypotheses (ordered by fidelity)
- H1 (high): A UniFi OS / package-update process (parent
unifi-core,node,ulp-go, or the updater, running asucs-update) spawned a shell or interpreter (sh/bash/dash/python/perl) → command-injection exploitation of CVE-2026-34910. Lowest FP, highest fidelity. - H2 (high): The UniFi service account (
ucs-update) invoked privilege-escalation primitives —sudo dpkg,chmod,systemctl, or a passwd/SSH change — indicating root escalation after injection. - H3 (medium): A UniFi/web-gateway process spawned a download tool (
curl/wget) → ingress tool transfer / second-stage pull (T1105). - H4 (medium): The UniFi process tree made outbound connections to new/rare external IPs (reverse shell / C2), i.e. server-initiated egress atypical for an appliance.
- H5 (medium): Web/access logs show requests combining the
/api/auth/validate-sso/prefix with encoded traversal (..%2f,..%2e) or shell metacharacters against.../ucs/update/latest_package— the exploit request itself. - H6 (low): A process executed from a writable/temp/package-staging path under the UniFi tree (second-stage tooling staged via the injection).
- H7 (medium, persistence): Forged-session / auth anomalies — owner/admin tokens used without a preceding interactive login, or new SSH/root-password changes — indicating forged-token access that persists after patch (T1556/T1078).
Attack chain
| Step | Telemetry | Hunt Angle |
|---|---|---|
| 1 · Auth-gateway bypass (CVE-2026-34908 / 34909) | Web/access logs (raw vs normalized URI, traversal seq.) | H5 — native log review of gateway requests |
| 2 · Command injection in package-update (CVE-2026-34910) | ProcessRollup2 (ParentBaseFileName + ImageFileName) | H1 — UniFi service spawns shell/interpreter |
| 3 · Root escalation via passwordless sudo dpkg | ProcessRollup2 (CommandLine, UserName=ucs-update) | H2 — sudo dpkg/chmod/systemctl from service acct |
| 4 · Ingress tool transfer / second stage | ProcessRollup2 (curl/wget); NetworkConnectIP4 | H3 / H4 — download tools + new-IP egress |
| 5 · Staged tooling executes | ProcessRollup2 / ElfFileWritten (ImageFileName path) | H6 — exec from writable/staging path |
| 6 · Forged-session persistence (post-patch) | Auth/admin logs; ProcessRollup2 (sshd/passwd) | H7 — admin token / SSH change without login |
Consolidated IOC Table
Exploitation is automated and infrastructure rotates; few durable atomic IOCs are published. The values below are behavioral and contextual. Replace REPLACE_WITH_* placeholders with indicators confirmed in your own telemetry before promoting to a block.
| Type | Value | Confidence | Action | Context |
|---|---|---|---|---|
| behavior | unifi-core / node / updater (ucs-update) spawns sh/bash/python/perl | high | detect | Command-injection exploitation (H1) |
| behavior | ucs-update runs sudo dpkg / chmod / systemctl / passwd | high | detect | Root escalation via passwordless sudo (H2) |
| uri | /api/auth/validate-sso/ prefix + ..%2f / ..%2e traversal | medium | hunt | Auth-gateway bypass request (H5) |
| uri | /ucs/update/latest_package with shell metacharacters | medium | hunt | Command-injection request (H5) |
| port | TCP 11443 (UniFi OS Server default listener) | medium | enrich | Internet-exposed mgmt plane = attack surface |
| sha256 | REPLACE_WITH_SECONDSTAGE_SHA256 | medium | hunt | Confirmed second-stage payload (perishable) |
| ipv4 | REPLACE_WITH_SCANNER_OR_C2_IP | low | enrich | Source of exploit request / reverse-shell peer |
Affected Surface & Telemetry Matrix
| Surface | Required Telemetry | Priority | Gap Risk |
|---|---|---|---|
| Linux hosts running UniFi OS Server <= 5.0.6 (self-hosted) | Falcon sensor for Linux — ProcessRollup2 | Critical | Low |
| Package-staging / writable / temp dirs | FileCreateInfo / NewExecutableWritten / ElfFileWritten | High | Med — file telemetry coverage varies |
| Server-initiated egress from the appliance | NetworkConnectIP4, DnsRequest | Medium | Low |
| UniFi gateway / reverse-proxy access logs (TCP 11443) | HTTP logs forwarded to NGSIEM (non-sensor) | Medium | High — only if logs are shipped |
| Hardware appliances (Cloud Gateway, Dream Machine, NVR) | Vendor advisory + console patch state (no Falcon sensor) | High | High — no EDR; patch/inventory only |
Scope note: Falcon for Linux only covers self-hosted UniFi OS Server instances on managed Linux hosts. Embedded hardware appliances (UDM/UCG/NVR) carry the same chain but have no EDR telemetry — cover them via patch inventory (SAB-064), the Bishop Fox checker, and network/egress controls.
ATT&CK Mapping
| Tactic | Technique | Observed Behavior | Query / Control |
|---|---|---|---|
| Initial Access | T1190 — Exploit Public-Facing Application | Auth-gateway bypass + command injection chain | Q5 · Patch (S12) |
| Execution | T1059 — Command and Scripting Interpreter | UniFi service spawns sh/bash/python/perl | Q1 · Q3 |
| Privilege Escalation | T1543 / T1548 — Service / Sudo abuse | ucs-update sudo dpkg → root | Q2 |
| Command & Control | T1105 — Ingress Tool Transfer | curl/wget pull; outbound to new IP | Q3 · Q4 |
| Persistence / Defense Evasion | T1556 / T1078 — Forged sessions / Valid Accounts | Forged admin token works after patch; SSH/root change | Q6 · Rotate (S14) |
| Command & Control | T1071 — Application Layer Protocol | Appliance beacons to rare external host | Q4 |
Native Audit-Log Hunts (non-CQL)
Checks that do not require Falcon process telemetry — run these directly on the host or against shipped logs:
- Version inventory: confirm UniFi OS Server is >= 5.0.8 (unifi-core 5.0.153). Any host <= 5.0.6 (unifi-core 5.0.126) is presumed exposed. For hardware, verify the model-specific fixed UniFi OS build per SAB-064.
- Safe exposure check: run the Bishop Fox
CVE-2026-34908-checktool against every reachable UniFi OS Server (default listener TCP 11443) to confirm vulnerable status without exploiting. - Access-log review: grep gateway/reverse-proxy logs for requests whose path contains
/api/auth/validate-sso/together with traversal sequences (..%2f,..%2e) or for hits on.../ucs/update/latest_packagecarrying shell metacharacters. - Service-account behavior: review process/audit history for the
ucs-updateaccount spawning shells or runningsudo dpkg/chmod/systemctl— these are not normal interactive operations. - Persistence check: exploitation is unauthenticated, so a forged admin token leaves no preceding login. Look for admin/owner actions, SSH enablement, or root-password changes with no corresponding interactive auth event — and confirm the JWT signing key has been rotated post-patch.
CrowdStrike LogScale CQL Hunt Queries
Looks for: a UniFi OS / package-update parent process (unifi-core, node, ulp-go, or the updater) directly spawning an interactive shell or interpreter — the core command-injection signal (H1). FP: rare; legitimate updater hooks may call sh briefly — baseline per host and exclude known maintenance command lines.
// HUNT: UniFi OS / updater process spawns shell/interpreter (CVE-2026-34910 cmd injection) // MITRE: T1190, T1059 // CONF: high FP: low COST: low | REQUIRES: Falcon for Linux ProcessRollup2 // FALSE POSITIVES: legitimate updater hooks invoking sh during a real package update // TUNING: exclude known-good updater CommandLine after baselining; scope to UniFi hosts #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ParentBaseFileName=/^(unifi-core|node|ulp-go|package-update|ucs-update.*|unifi-os.*)$/i | ImageFileName=/\/(sh|bash|dash|zsh|ksh|python\d?|perl|ruby|nc|ncat)$/i | table([@timestamp, ComputerName, aid, ParentBaseFileName, ImageFileName, CommandLine, UserName], limit=200)
Looks for: the UniFi service account (ucs-update) invoking privilege-escalation primitives — sudo dpkg, chmod, systemctl, passwd, or SSH enablement (H2). The chain escalates to root through passwordless sudo /usr/bin/dpkg. FP: a genuine package update legitimately runs dpkg — correlate timing with Q1 and exclude the scheduled-update window.
// HUNT: ucs-update service account runs sudo dpkg/chmod/systemctl/passwd (root escalation) // MITRE: T1548, T1543 // CONF: high FP: low COST: low | REQUIRES: ProcessRollup2 // FALSE POSITIVES: legitimate scheduled package updates invoking dpkg // TUNING: exclude known maintenance windows; require an immediate-prior shell from Q1 to confirm #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | UserName=/ucs-update/i | ImageFileName=/\/(sudo|dpkg|chmod|chown|systemctl|passwd|usermod|ssh-keygen)$/i | table([@timestamp, ComputerName, aid, UserName, ParentBaseFileName, ImageFileName, CommandLine], limit=200)
Looks for: download utilities (curl/wget/fetch/tftp) executed under the UniFi/web-gateway tree, used to pull second-stage tooling (H3 / T1105). FP: the updater itself fetches packages from Ubiquiti CDNs and the cloud backend — exclude known update/CDN hosts and scope to UniFi hosts.
// HUNT: Download tooling executed by the UniFi process tree (ingress tool transfer) // MITRE: T1105 // CONF: medium FP: medium COST: low | REQUIRES: ProcessRollup2 // FALSE POSITIVES: updater pulling packages from Ubiquiti CDN / cloud backend // TUNING: exclude CommandLine matching known ui.com / CDN update hosts; restrict to UniFi hosts #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ParentBaseFileName=/^(unifi-core|node|ulp-go|package-update|ucs-update.*|sh|bash|dash|python\d?)$/i | ImageFileName=/\/(curl|wget|fetch|tftp)$/i | CommandLine=/https?:\/\//i | CommandLine!=/(ui\.com|ubnt\.com|ubiquiti)/i | table([@timestamp, ComputerName, aid, ParentBaseFileName, ImageFileName, CommandLine, UserName], limit=200)
Looks for: server-initiated egress from the UniFi tree to non-RFC1918 destinations (reverse shell / C2, H4 / T1071). FP: legitimate cloud-backend and update connectivity; exclude Ubiquiti cloud ranges and known CDN ASNs, then triage the rare remainder. Aggregates by destination to surface low-prevalence peers.
// HUNT: UniFi process tree egress to rare external IP (reverse shell / C2) // MITRE: T1071, T1105 // CONF: medium FP: medium COST: medium | REQUIRES: NetworkConnectIP4 // FALSE POSITIVES: Ubiquiti cloud backend, NTP, update/CDN connectivity // TUNING: exclude known Ubiquiti cloud ranges/ASNs; investigate low-count RemoteAddressIP4 peers #event_simpleName=NetworkConnectIP4 | ContextBaseFileName=/^(unifi-core|node|ulp-go|package-update|ucs-update.*)$/i | RemoteAddressIP4!=/^(10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.|127\.|169\.254\.)/ | groupBy([RemoteAddressIP4, RemotePort, ContextBaseFileName], function=([count(aid, distinct=true, as=hosts), min(@timestamp, as=firstSeen)])) | sort(hosts, order=asc, limit=200) | table([RemoteAddressIP4, RemotePort, ContextBaseFileName, hosts, firstSeen], limit=200)
Looks for: HTTP requests combining the auth-exempt /api/auth/validate-sso/ prefix with encoded traversal, or hits on .../ucs/update/latest_package carrying shell metacharacters — the exploit request itself (H5). FP: low for the traversal/metachar combination; benign SSO validation is common, so the traversal/metachar predicate is what makes the hit. Requires gateway/reverse-proxy logs forwarded to NGSIEM (adjust field names to your parser).
// HUNT: UniFi auth-gateway bypass + command-injection request (CVE-2026-34908/909/910) // MITRE: T1190 // CONF: medium FP: medium COST: medium | REQUIRES: gateway/access logs in NGSIEM // FALSE POSITIVES: legitimate validate-sso traffic (filtered out by traversal/metachar predicate) // TUNING: adjust field names to your HTTP parser; alert on the traversal/metachar match, not the prefix alone #repo=* | url=/\/api\/auth\/validate-sso\/|\/ucs\/update\/latest_package/i | url=/(\.\.%2f|\.\.%2e|\.\.\/|[;|&`$]|%3b|%7c|%60)/i | table([@timestamp, src_ip, host, method, url, status, http_user_agent], limit=200)
Looks for: any binary or interpreter executing with an ImageFileName under a writable/temp/package-staging directory (H6) — second-stage tooling staged through the injection. FP: low; legitimate UniFi binaries run from /usr and /data, not /tmp or /dev/shm. Investigate every hit.
// HUNT: Process executing from a writable / package-staging / temp directory // MITRE: T1059, T1105 // CONF: medium FP: low COST: low | REQUIRES: ProcessRollup2 // FALSE POSITIVES: rare; some package builds stage to /tmp briefly during a real update // TUNING: exclude the updater's own staging path during a confirmed maintenance window #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ImageFileName=/^\/(tmp|var\/tmp|dev\/shm)\/|\/(staging|cache|uploads)\//i | table([@timestamp, ComputerName, aid, ImageFileName, ParentBaseFileName, CommandLine, UserName], limit=200)
Looks for: SSH service enablement, authorized_keys writes, or root-password changes on a UniFi host (H7 / T1556 / T1078). A forged owner token (recovered JWT signing key) can enable SSH and set a root password — and this persists after patching. FP: legitimate admin maintenance; correlate against your change calendar and confirm an interactive login preceded the change.
// HUNT: SSH enablement / authorized_keys write / root passwd change (forged-token persistence) // MITRE: T1556, T1078, T1098.004 // CONF: medium FP: medium COST: low | REQUIRES: ProcessRollup2 (+ FileCreateInfo for keys) // FALSE POSITIVES: legitimate admin maintenance / approved change window // TUNING: exclude approved change windows; require absence of a preceding interactive login #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | (ImageFileName=/\/(passwd|usermod|ssh-keygen)$/i OR (ImageFileName=/\/systemctl$/i AND CommandLine=/(enable|start)\s+ssh/i) OR CommandLine=/authorized_keys/i) | table([@timestamp, ComputerName, aid, UserName, ParentBaseFileName, ImageFileName, CommandLine], limit=200)
CrowdStrike Custom IOA Recommendations
Promotion candidates from the hunt queries above (Linux platform, Process Create rule type):
| IOA Name | Pattern | Exclusions | Action / Deployment |
|---|---|---|---|
| UniFi Service Spawns Shell (RCE chain) | Parent ImageFileName unifi-core|node|ulp-go|package-update → Child sh|bash|dash|python|perl | Known-good updater command lines (post-baseline) | Detect → Block after 1–2 wk baseline (from Q1) |
| ucs-update Privilege Escalation | UserName ucs-update runs sudo|dpkg|chmod|systemctl|passwd with a shell ancestor | Scheduled package-update window | Detect (from Q2) |
| UniFi Tree Downloads Tooling | UniFi process tree → curl|wget with http(s):// to non-Ubiquiti host | Known ui.com / CDN update endpoints | Detect (from Q3) |
| Exec From Writable/Staging Path | ImageFileName under /tmp, /var/tmp, /dev/shm, staging | Updater staging path during real update | Detect (from Q6) |
Q4 (rare-IP egress) and Q5 (access-log exploit request) are best deployed as scheduled-search detections rather than Process-Create IOAs, since they key on network and log telemetry, not process creation. Q7 (forged-session persistence) should be a scheduled search correlated against identity/auth events.
Machine-Readable IOC Appendix
One-click copy blocks for ingestion. Atomic indicators are perishable for this automated campaign — use placeholders until you confirm values in your own telemetry.
type,value,action,severity,expiration,description,tags sha256,REPLACE_WITH_SECONDSTAGE_SHA256,detect,critical,2026-12-22,UniFi OS RCE chain second-stage payload,campaign:UniFiOSRCE ipv4,REPLACE_WITH_SCANNER_OR_C2_IP,detect,high,2026-09-22,UniFi OS exploit source or C2,campaign:UniFiOSRCE domain,REPLACE_WITH_C2_DOMAIN,detect,high,2026-09-22,UniFi OS second-stage C2,campaign:UniFiOSRCE
parent_proc IN (unifi-core, node, ulp-go, package-update) AND child_proc IN (sh, bash, dash, python, perl) # cmd injection exec user = ucs-update AND proc IN (sudo, dpkg, chmod, systemctl, passwd) # root escalation proc_exec FROM (/tmp/, /var/tmp/, /dev/shm/, staging/) # staged tooling http_req: /api/auth/validate-sso/ + (..%2f | ..%2e) # auth-gateway bypass http_req: /ucs/update/latest_package + shell metachars # command injection
UniFi OS Server Unauth RCE Chain (Ubiquiti SAB-064, ~2026-05-21) CVE-2026-34908 improper access control (auth gateway) CVE-2026-34909 path traversal (auth gateway, OS file exposure) CVE-2026-34910 command injection (package-update service) Affected: UniFi OS Server <= 5.0.6 (unifi-core 5.0.126) Fixed: 5.0.8 (unifi-core 5.0.153) Bypass: raw-vs-normalized URI via /api/auth/validate-sso/ prefix Exec acct: ucs-update -> passwordless sudo /usr/bin/dpkg -> root Listener: TCP 11443 | Persistence: forged JWT tokens survive patch
# Confirm UniFi OS Server / unifi-core version (>= 5.0.8 / 5.0.153) dpkg -l | grep -i unifi-core 2>/dev/null cat /usr/lib/unifi-core/package.json 2>/dev/null | grep -i version # Safe vuln check (Bishop Fox, non-exploitative) against listener # git clone https://github.com/BishopFox/CVE-2026-34908-check # run per its README against host:11443 # Confirm mgmt listener is NOT internet-exposed ss -tlnp | grep ':11443'
Detection Validation Gates
| Gate | Check | Pass Criteria |
|---|---|---|
| 1 · Telemetry ready | Falcon for Linux deployed on all self-hosted UniFi OS Server hosts; ProcessRollup2 and network events flowing | Events seen from every UniFi host in last 24h |
| 2 · Benign baseline | Run Q1–Q4 over 7–14 days; catalog legitimate updater shell/curl/dpkg activity and Ubiquiti cloud egress | Known-good command lines & cloud peers enumerated & excluded |
| 3 · Positive test | In a lab UniFi host, have the ucs-update user run id via a shell, and execute a binary from /tmp | Q1 and Q6 both fire on the test action |
| 4 · Promotion | Q1/Q2 FP rate acceptable after tuning | Promote Q1+Q2 to blocking IOA; keep Q3–Q7 as investigate-only |
Hardening — Tiered
- Patch to UniFi OS Server >= 5.0.8 (unifi-core 5.0.153) on every self-hosted instance; apply the model-specific fixed UniFi OS build on hardware per SAB-064. Closes all three CVEs. (T1190 / MITRE M1051 — Update Software.)
- Pull the management plane off the internet: block inbound TCP 11443 from untrusted networks; restrict the UniFi OS Server console to a management VLAN/VPN. The exploit needs reachability — removing it stops the bleeding even before patching completes. (M1030 / M1035 — Network Segmentation / Limit Access to Resource Over Network.)
- Rotate the JWT signing key (reboot) + invalidate all sessions: patching does NOT evict an attacker holding a forged token. Rotate the signing key, invalidate sessions, and rotate every secret reachable pre-patch. (Because forged sessions persist — Bishop Fox.)
- Deploy Q1 + Q2 as detections on all UniFi hosts immediately, even before patching completes — they catch live exploitation and root escalation. (M1040 — Behavior Prevention on Endpoint.)
- Rotate all downstream secrets: a root-compromised console exposes stored secrets and can pivot to managed network gear, UniFi Access door controllers, and UniFi Protect cameras. Rotate device adoption keys, TLS keys, cloud tokens, and any shared credentials. (M1027 — Password Policies; M1026 — Privileged Account Management.)
- WAF / virtual patch the gateway: add a rule rejecting requests that combine the
/api/auth/validate-sso/prefix with traversal sequences, and any shell metacharacters against/ucs/update/latest_package. (M1050 — Exploit Protection.) - Egress filtering: default-deny outbound from the UniFi host; allow only Ubiquiti cloud/update endpoints. Breaks ingress tool transfer and reverse shells. (M1037 — Filter Network Traffic.)
- Rebuild confirmed-compromised consoles: where exploitation is confirmed, rebuild from a known-good image rather than trusting an in-place patch — forged tokens and planted SSH/root access survive patching. Review Access door and Protect camera logs for the dwell window.
- Appliance governance: inventory all UniFi OS Server / hardware consoles, subscribe to Ubiquiti security advisories, and set an SLA to patch internet-facing appliances within 48h of a CVSS-10 advisory. Segment all management appliances off user/internet zones by default. (M1051 / M1030.)
Deployable Playbooks
A · Restrict the management listener (host firewall)
Allow TCP 11443 only from the management subnet; drop everything else:
# nftables: only allow UniFi OS Server console from mgmt subnet 10.10.0.0/24 nft add rule inet filter input tcp dport 11443 ip saddr 10.10.0.0/24 accept nft add rule inet filter input tcp dport 11443 drop # (iptables equivalent) iptables -A INPUT -p tcp --dport 11443 -s 10.10.0.0/24 -j ACCEPT iptables -A INPUT -p tcp --dport 11443 -j DROP
B · WAF / reverse-proxy virtual patch (nginx)
# reject auth-gateway bypass + command-injection request shapes
location ~* ^/api/auth/validate-sso/ {
if ($request_uri ~* "(\.\.%2f|\.\.%2e|\.\./)") { return 403; }
proxy_pass https://127.0.0.1:11443;
}
location ~* ^/ucs/update/latest_package {
if ($args ~* "[;|&`$]|%3b|%7c|%60") { return 403; }
proxy_pass https://127.0.0.1:11443;
}
C · Rotate signing key + invalidate sessions (post-patch persistence eviction)
# 1) patch first, then rotate the JWT signing key (requires a reboot to take effect) # follow Ubiquiti SAB-064 / console docs for the key-rotation procedure # 2) force re-auth of all admins and revoke existing sessions from the console # 3) rotate downstream secrets reachable pre-patch # - device adoption / inform keys, TLS keys, cloud tokens, shared creds # 4) confirm SSH was not enabled and no root password was set by the attacker grep -E 'sshd|PermitRootLogin' /etc/ssh/sshd_config chage -l root ; cat /root/.ssh/authorized_keys 2>/dev/null
D · Patch & exposure verification
# confirm unifi-core is a fixed build (>= 5.0.153 / UniFi OS Server >= 5.0.8) dpkg -l | grep -i unifi-core # confirm the console listener is not internet-reachable ss -tlnp | grep ':11443'
Containment Runbook
| Phase | Actions | Owner | Evidence |
|---|---|---|---|
| Isolate | Network-contain the host in Falcon (or block at the firewall for hardware); preserve memory + disk; do not reboot before evidence capture. Snapshot if virtual. | SOC / IR | Falcon containment record; snapshot ID |
| Eradicate | Kill UniFi-spawned shells; identify second-stage tooling under writable/staging paths; remove planted SSH keys / reset root; rotate every secret readable by the console (adoption keys, TLS, cloud tokens, DB creds). | IR / UniFi admin | Process tree, file hashes, removed-artifact inventory |
| Patch & rotate | Upgrade to >= 5.0.8; rotate the JWT signing key (reboot) and invalidate all sessions — patching alone leaves forged tokens valid. Apply the WAF virtual patch + mgmt-listener restriction (S13) before returning to service. | UniFi admin | Version readout; key-rotation + session-revocation log |
| Recover | Where exploitation is confirmed, rebuild from a known-good image rather than trusting in-place patch. Review managed switches/APs, UniFi Access door logs, and UniFi Protect cameras for tampering during the dwell window. | SOC / UniFi admin | Rebuild record; downstream-device review |
| Report | Document root cause, dwell time, and data/credentials accessed. Confirm signing-key rotation and downstream secret rotation are complete and verified. | IR lead | Timeline; secret-rotation attestation |
Detection Coverage Map
| Technique | Behavior | CQL | IOA | Coverage |
|---|---|---|---|---|
| T1190 | Auth-gateway bypass + command-injection request | Q5 (log-dependent) | — | Partial — needs shipped gateway logs |
| T1059 | UniFi service spawns shell/interpreter | Q1, Q3 | Q1 (block candidate) | Good |
| T1548 / T1543 | ucs-update sudo dpkg → root | Q2 | Q2 (block candidate) | Good |
| T1105 / T1071 | Ingress tool transfer / rare-IP egress | Q3, Q4 | Q3 | Good |
| T1059 / staging | Exec from writable/staging path | Q6 | Q6 path | Good |
| T1556 / T1078 | Forged-session persistence (post-patch) | Q7 | — | Partial — needs identity/auth correlation |
| Hardware appliances (UDM/UCG/NVR) | Same chain, no Falcon sensor | — | — | GAP — patch inventory + network controls only |
Validation: Coverage of the exploitation spine (Q1 shell-spawn, Q2 root escalation) is strong and low-FP on self-hosted Linux instances. The exploit request (Q5) and forged-session persistence (Q7) are only covered where gateway/auth logs reach NGSIEM — confirm log shipping or accept the partial gap. Embedded hardware consoles have no EDR telemetry and are covered only by patch inventory, the Bishop Fox checker, and network/egress controls. Validate Q4 exclusion lists (Ubiquiti cloud ranges) and Q5 HTTP field names against your tenant before deploying.
Hunt Summary Ticket
TITLE: Hunt — UniFi OS Server Unauth RCE Chain (CVE-2026-34908/909/910) -> root
SEVERITY: Critical (3x CVSS 10.0, Ubiquiti SAB-064, exploited ITW)
SCOPE: Self-hosted UniFi OS Server <= 5.0.6 on Linux + hardware consoles (no EDR)
HYPOTHESIS: Auth-gateway bypass + package-update command injection -> unauth root;
UniFi process tree spawns shells / escalates via sudo dpkg / beacons out;
forged JWT tokens persist after patch.
QUERIES: Q1 unifi->shell | Q2 ucs-update sudo escalation | Q3 download tool |
Q4 rare-IP egress | Q5 gateway exploit req (log) | Q6 exec from staging |
Q7 SSH/root-change (forged-session persistence)
DO FIRST: 1) Inventory version; patch any host <= 5.0.6 to >= 5.0.8; block TCP 11443 inbound
2) Run Q1 + Q2 across all UniFi hosts; run Bishop Fox safe checker on reachables
3) Any hit = root compromise -> containment runbook (S14); ROTATE signing key + secrets
FINDINGS: <fill: hosts, process trees, ucs-update activity, source IPs, downstream impact>
GAPS: Q5/Q7 need gateway+auth logs in NGSIEM; hardware consoles have no EDR
ACTIONS: Patch; segment mgmt plane; rotate JWT key + all secrets; WAF virtual patch; egress filter
OWNER: HuntPack
VERSION: v0.2 · 2026-06-22
Changelog
table() calls now carry an explicit row limit: the default is 200 and truncation is silent, so a capped result was indistinguishable from a complete one. Atomic-IOC sweeps (filters over 5+ hashes or C2 IPs) use limit=max so a wide infection is never silently under-scoped; behavioural hunts use limit=200, where exceeding the cap indicates the query needs tuning. Where present, event names that do not exist in the Falcon data model were corrected (e.g. ServiceInstalled is a Sysmon concept, not a Falcon event; ElfFileWritten is ELFFileWritten) — such queries could never return a row. No detection logic, fields, or IOCs changed.References
| Tier | Source | Used For | Access Date |
|---|---|---|---|
| 1 · Vendor | Ubiquiti — Security Advisory Bulletin 064 (SAB-064) | CVE list, affected/fixed versions, advisory date | 2026-06-22 |
| 1 · Research | Bishop Fox — Popping Root on UniFi OS Server: Unauth RCE Chain Detection Analysis | Full chain, raw/normalized bypass, ucs-update escalation, forged-token persistence, detection indicators | 2026-06-22 |
| 1 · Research | BishopFox/CVE-2026-34908-check (GitHub) | Safe, non-exploitative vulnerability checker for exposure inventory | 2026-06-22 |
| 2 · Press | BleepingComputer — Critical UniFi OS bug lets hackers gain root without authentication | Active exploitation, severity, impact summary | 2026-06-22 |
| 2 · Press | GBHackers — Critical UniFi OS Auth Bypass Flaws Lead to Unauthenticated Root RCE | Chain summary, single-request RCE, downstream Access/Protect risk | 2026-06-22 |