UniFi OS Server — Unauthenticated Root RCE Chain (CVE-2026-34908 / 34909 / 34910)

Three chained CVSS-10.0 flaws in the UniFi OS Server auth gateway + package-update service → unauthenticated root command execution via a single crafted HTTP request. Active exploitation reported; forged sessions persist after patching.
Threat
UniFi OS Server <= 5.0.6 (Ubiquiti SAB-064)
Severity
EXPLOITED ITW · 3× CVSS 10.0
Type
Auth bypass + path traversal + command injection → root
Access
Unauthenticated, remote, no user interaction
Version
v0.2 · 2026-06-22
Author
HuntPack
Confidence
High (vendor advisory + Bishop Fox PoC + press ITW)
01

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.

02

Source Review & Web Hunter Notes

TierSourceKey FindingCarry Forward
1 · VendorUbiquiti 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 · ResearchBishop Fox — Popping Root on UniFi OS ServerFull 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 · ResearchBishopFox/CVE-2026-34908-check (GitHub)Safe, non-exploitative vuln checker for reachable UniFi OS Servers. Use for exposure inventory.Yes
2 · PressBleepingComputerCritical UniFi OS bug lets hackers gain root without authentication; active exploitation (June 2026).Yes
2 · PressGBHackers / CyberPress / ThreatAftAuth-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.

03

Hunt Brief & Attack Chain

Hypotheses (ordered by fidelity)

  1. H1 (high): A UniFi OS / package-update process (parent unifi-core, node, ulp-go, or the updater, running as ucs-update) spawned a shell or interpreter (sh/bash/dash/python/perl) → command-injection exploitation of CVE-2026-34910. Lowest FP, highest fidelity.
  2. 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.
  3. H3 (medium): A UniFi/web-gateway process spawned a download tool (curl/wget) → ingress tool transfer / second-stage pull (T1105).
  4. 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.
  5. 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.
  6. H6 (low): A process executed from a writable/temp/package-staging path under the UniFi tree (second-stage tooling staged via the injection).
  7. 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

StepTelemetryHunt 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 dpkgProcessRollup2 (CommandLine, UserName=ucs-update)H2 — sudo dpkg/chmod/systemctl from service acct
4 · Ingress tool transfer / second stageProcessRollup2 (curl/wget); NetworkConnectIP4H3 / H4 — download tools + new-IP egress
5 · Staged tooling executesProcessRollup2 / 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
04

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.

TypeValueConfidenceActionContext
behaviorunifi-core / node / updater (ucs-update) spawns sh/bash/python/perlhighdetectCommand-injection exploitation (H1)
behaviorucs-update runs sudo dpkg / chmod / systemctl / passwdhighdetectRoot escalation via passwordless sudo (H2)
uri/api/auth/validate-sso/ prefix + ..%2f / ..%2e traversalmediumhuntAuth-gateway bypass request (H5)
uri/ucs/update/latest_package with shell metacharactersmediumhuntCommand-injection request (H5)
portTCP 11443 (UniFi OS Server default listener)mediumenrichInternet-exposed mgmt plane = attack surface
sha256REPLACE_WITH_SECONDSTAGE_SHA256mediumhuntConfirmed second-stage payload (perishable)
ipv4REPLACE_WITH_SCANNER_OR_C2_IPlowenrichSource of exploit request / reverse-shell peer
05

Affected Surface & Telemetry Matrix

SurfaceRequired TelemetryPriorityGap Risk
Linux hosts running UniFi OS Server <= 5.0.6 (self-hosted)Falcon sensor for Linux — ProcessRollup2CriticalLow
Package-staging / writable / temp dirsFileCreateInfo / NewExecutableWritten / ElfFileWrittenHighMed — file telemetry coverage varies
Server-initiated egress from the applianceNetworkConnectIP4, DnsRequestMediumLow
UniFi gateway / reverse-proxy access logs (TCP 11443)HTTP logs forwarded to NGSIEM (non-sensor)MediumHigh — only if logs are shipped
Hardware appliances (Cloud Gateway, Dream Machine, NVR)Vendor advisory + console patch state (no Falcon sensor)HighHigh — 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.

06

ATT&CK Mapping

TacticTechniqueObserved BehaviorQuery / Control
Initial AccessT1190 — Exploit Public-Facing ApplicationAuth-gateway bypass + command injection chainQ5 · Patch (S12)
ExecutionT1059 — Command and Scripting InterpreterUniFi service spawns sh/bash/python/perlQ1 · Q3
Privilege EscalationT1543 / T1548 — Service / Sudo abuseucs-update sudo dpkg → rootQ2
Command & ControlT1105 — Ingress Tool Transfercurl/wget pull; outbound to new IPQ3 · Q4
Persistence / Defense EvasionT1556 / T1078 — Forged sessions / Valid AccountsForged admin token works after patch; SSH/root changeQ6 · Rotate (S14)
Command & ControlT1071 — Application Layer ProtocolAppliance beacons to rare external hostQ4
07

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-check tool 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_package carrying shell metacharacters.
  • Service-account behavior: review process/audit history for the ucs-update account spawning shells or running sudo 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.
08

CrowdStrike LogScale CQL Hunt Queries

Pick your tenant's cloud first — every "Open in Falcon" button below uses this selection.
Q1 · UniFi OS / updater process spawns a shell / interpreter
CONF HIGHFP LOWCOST LOW

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)
Q2 · ucs-update service account escalates via sudo dpkg / chmod / systemctl
CONF HIGHFP LOWCOST LOW

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)
Q3 · Download tooling executed by the UniFi process tree
CONF MEDFP MEDCOST LOW

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)
Q4 · Outbound connection from the UniFi process tree to a rare external IP
CONF MEDFP MEDCOST MED

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)
Q5 · Auth-bypass / command-injection request in gateway access logs
CONF MEDFP MEDCOST MED

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)
Q6 · Process executes from a writable / package-staging path
CONF MEDFP LOWCOST LOW

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)
Q7 · SSH enable / root-password change (forged-session persistence)
CONF MEDFP MEDCOST LOW

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)
09

CrowdStrike Custom IOA Recommendations

Promotion candidates from the hunt queries above (Linux platform, Process Create rule type):

IOA NamePatternExclusionsAction / Deployment
UniFi Service Spawns Shell (RCE chain)Parent ImageFileName unifi-core|node|ulp-go|package-update → Child sh|bash|dash|python|perlKnown-good updater command lines (post-baseline)Detect → Block after 1–2 wk baseline (from Q1)
ucs-update Privilege EscalationUserName ucs-update runs sudo|dpkg|chmod|systemctl|passwd with a shell ancestorScheduled package-update windowDetect (from Q2)
UniFi Tree Downloads ToolingUniFi process tree → curl|wget with http(s):// to non-Ubiquiti hostKnown ui.com / CDN update endpointsDetect (from Q3)
Exec From Writable/Staging PathImageFileName under /tmp, /var/tmp, /dev/shm, stagingUpdater staging path during real updateDetect (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.

10

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.

Falcon IOC Management CSVbulk import
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
Behavioral Signatureshunt logic
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
Named Tooling / Artifactsreference
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
Patch / Exposure Auditverify
# 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'
11

Detection Validation Gates

GateCheckPass Criteria
1 · Telemetry readyFalcon for Linux deployed on all self-hosted UniFi OS Server hosts; ProcessRollup2 and network events flowingEvents seen from every UniFi host in last 24h
2 · Benign baselineRun Q1–Q4 over 7–14 days; catalog legitimate updater shell/curl/dpkg activity and Ubiquiti cloud egressKnown-good command lines & cloud peers enumerated & excluded
3 · Positive testIn a lab UniFi host, have the ucs-update user run id via a shell, and execute a binary from /tmpQ1 and Q6 both fire on the test action
4 · PromotionQ1/Q2 FP rate acceptable after tuningPromote Q1+Q2 to blocking IOA; keep Q3–Q7 as investigate-only
12

Hardening — Tiered

Immediate (this week — no compat risk)
  • 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.)
Near term (1–4 weeks — pilot first)
  • 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.)
Strategic (1–3 months)
  • 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.)
13

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'
14

Containment Runbook

PhaseActionsOwnerEvidence
IsolateNetwork-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 / IRFalcon containment record; snapshot ID
EradicateKill 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 adminProcess tree, file hashes, removed-artifact inventory
Patch & rotateUpgrade 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 adminVersion readout; key-rotation + session-revocation log
RecoverWhere 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 adminRebuild record; downstream-device review
ReportDocument root cause, dwell time, and data/credentials accessed. Confirm signing-key rotation and downstream secret rotation are complete and verified.IR leadTimeline; secret-rotation attestation
15

Detection Coverage Map

TechniqueBehaviorCQLIOACoverage
T1190Auth-gateway bypass + command-injection requestQ5 (log-dependent)Partial — needs shipped gateway logs
T1059UniFi service spawns shell/interpreterQ1, Q3Q1 (block candidate)Good
T1548 / T1543ucs-update sudo dpkg → rootQ2Q2 (block candidate)Good
T1105 / T1071Ingress tool transfer / rare-IP egressQ3, Q4Q3Good
T1059 / stagingExec from writable/staging pathQ6Q6 pathGood
T1556 / T1078Forged-session persistence (post-patch)Q7Partial — needs identity/auth correlation
Hardware appliances (UDM/UCG/NVR)Same chain, no Falcon sensorGAP — 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.

16

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
17

Changelog

v0.22026-07-24CQL correctness pass. All 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.
v0.12026-06-22Initial HuntPack — 7 CQL hunts (Q1–Q7), 4 IOA candidates, tiered hardening, deployable playbooks, containment runbook, coverage map. Built from Ubiquiti advisory SAB-064 (~2026-05-21), Bishop Fox detection-analysis writeup, and BleepingComputer active-exploitation reporting for the UniFi OS Server unauthenticated root RCE chain (CVE-2026-34908 / 34909 / 34910).
18

References

TierSourceUsed ForAccess Date
1 · VendorUbiquiti — Security Advisory Bulletin 064 (SAB-064)CVE list, affected/fixed versions, advisory date2026-06-22
1 · ResearchBishop Fox — Popping Root on UniFi OS Server: Unauth RCE Chain Detection AnalysisFull chain, raw/normalized bypass, ucs-update escalation, forged-token persistence, detection indicators2026-06-22
1 · ResearchBishopFox/CVE-2026-34908-check (GitHub)Safe, non-exploitative vulnerability checker for exposure inventory2026-06-22
2 · PressBleepingComputer — Critical UniFi OS bug lets hackers gain root without authenticationActive exploitation, severity, impact summary2026-06-22
2 · PressGBHackers — Critical UniFi OS Auth Bypass Flaws Lead to Unauthenticated Root RCEChain summary, single-request RCE, downstream Access/Protect risk2026-06-22