CVE-2026-123033: iXsystems TrueNAS SCALE middlewared High-Availability Heartbeat Origin Check Authentication Bypass to Root
A critical improper authentication vulnerability discovered by Rapid7 in iXsystems TrueNAS SCALE (versions prior to 25.10.8) allows unauthenticated network-adjacent attackers to execute arbitrary system commands as root. The core management daemon, middlewared, unconditionally registered the high-availability peer authentication hook (ha_permission) across all installationsโincluding standalone, non-clustered, unlicensed, and single-node Community Edition systems. This hook granted immediate NodeCredential administrative tokens to any incoming connection originating from a hardcoded link-local IP (169.254.10.1 or 169.254.10.2) with a privileged source port (<= 1024), without enforcing cryptographic authentication or physical interface binding. In enterprise data centers, co-located virtual machines, compromised container apps, or adjacent network hosts can bind these link-local attributes to take full control of ZFS storage pools, exfiltrate virtual disk images, or deploy ransomware payloads. Hermes evaluates this vulnerability at HTS 89 (CRITICAL).
HERMES THREAT SCORE & ENTERPRISE STORAGE MIDDLEWARE ACCESS EVALUATION
Target:TrueNAS SCALE middlewared HA Peer Hook (ha_permission / failover_ plugin) [object Object]
1. Vulnerability Overview & Architectural Context
Section titled โ1. Vulnerability Overview & Architectural ContextโTrueNAS SCALE, developed by iXsystems, is a leading open-source Network-Attached Storage (NAS) and hyperconverged infrastructure operating system built on Debian Linux, OpenZFS, KVM, and container runtimes. It is deployed extensively across enterprise data centers, media studios, and hybrid cloud infrastructures to manage multi-petabyte storage pools, SMB/NFS file shares, iSCSI block storage, and containerized applications.
The central orchestration brain of TrueNAS SCALE is middlewared, an asynchronous Python service that manages every subsystemโfrom ZFS pool creation and disk encryption to user access control, network configuration, and system updates. Clients (including the Web UI, CLI, and REST/WebSocket APIs) communicate with middlewared through a JSON-RPC / WebSocket interface on port 6000 or through the main web proxy.
+-------------------------------------------------------------------------+ | Adversary on Local Layer 2 Network / Compromised Co-located Container | +-------------------------------------------------------------------------+ | | 1. Bind socket: IP=169.254.10.1, Port=800 | 2. TCP connection to TrueNAS middlewared v +---------------------------------------+ | TrueNAS SCALE middlewared (Port 6000) | | (Registered ha_permission hook) | +---------------------------------------+ | | 3. Peer check matches hardcoded HA IP | Unconditionally grants NodeCredential v +---------------------------------------+ | JSON-RPC Execution as FULL ROOT | | system.command / user.create / zfs.* | +---------------------------------------+ | | 4. Complete Storage & Hypervisor Takeover v +---------------------------------------+ | OpenZFS Datasets & VM Disk Images | +---------------------------------------+To support High Availability (HA) deployments on dual-controller TrueNAS Enterprise hardware, middlewared incorporates an internal failover clustering plugin. TrueNAS controllers communicate state and synchronize heartbeat health over a dedicated point-to-point link configured with IPv4 link-local addresses (169.254.10.1 and 169.254.10.2). In versions of TrueNAS SCALE prior to 25.10.8, the origin check governing this internal heartbeat was dangerously flawed and universally exposed.
2. Root Cause Analysis & Code Breakdown
Section titled โ2. Root Cause Analysis & Code BreakdownโThe vulnerability stems from two architectural defects discovered by Rapid7:
- Unconditional Registration: The failover clustering hook was registered regardless of whether the TrueNAS system had an active Enterprise failover license or was running as a standalone Community Edition host.
- Insecure Origin Verification: Instead of authenticating the peer using TLS mutual authentication (mTLS), pre-shared cryptographic secrets, or restricting the socket listener to the physical heartbeat interface,
middlewaredrelied solely on the source IP and source port reported by the TCP socket.
The Vulnerable ha_permission Hook
Section titled โThe Vulnerable ha_permission HookโIn middlewared/plugins/failover_/remote.py, the registration hook inspected incoming connections:
# Vulnerable middlewared HA peer permission checkasync def ha_permission(middleware, conn): # Check if connection originates from the peer controller peer_addr = conn.peer_addr if not peer_addr: return False
peer_ip, peer_port = peer_addr[0], peer_addr[1]
# VULNERABILITY: Trusting unauthenticated socket metadata if peer_ip in ('169.254.10.1', '169.254.10.2') and peer_port <= 1024: # Unconditionally grants NodeCredential authorizing every API method! conn.authenticated = True conn.user = NodeCredential(role="ADMINISTRATOR") return True
return FalseBecause an attacker on the same local Layer 2 broadcast segment (or an adversary running a container inside TrueNAS with host networking or CAP_NET_RAW privileges) can configure an interface with 169.254.10.1 and bind an outbound TCP socket to a low source port (e.g., port 789), the condition peer_ip in ('169.254.10.1', '169.254.10.2') and peer_port <= 1024 evaluates to True.
Upon satisfying this trivial check, the attackerโs connection is promoted to NodeCredential(role="ADMINISTRATOR"). The attacker can subsequently issue JSON-RPC calls to system.command (running arbitrary Bash commands as root), create persistent administrator accounts, or dump private ZFS encryption keys.
The Remediation in TrueNAS SCALE 25.10.8
Section titled โThe Remediation in TrueNAS SCALE 25.10.8โiXsystems remediated the vulnerability by:
- Verifying that the system possesses a valid, active Enterprise HA license before registering failover hooks.
- Ensuring that the incoming connection terminates strictly on the dedicated physical heartbeat network interface (
heartbeat_interface), rather than accepting traffic routed through general LAN interfaces. - Requiring mutual TLS token validation across clustered controllers.
# Hardened verification in TrueNAS SCALE 25.10.8async def ha_permission(middleware, conn): # Enforce HA licensing prerequisite if not await middleware.call('failover.licensed'): return False
# Ensure connection arrived on the authenticated physical heartbeat link local_interface = conn.local_interface heartbeat_interface = await middleware.call('failover.heartbeat_interface')
if local_interface != heartbeat_interface: middleware.logger.warning("Rejected HA heartbeat attempt from unauthorized interface %s", local_interface) return False
# Validate mTLS certificate fingerprint or cryptographically signed session token if not await middleware.call('failover.verify_peer_token', conn): return False
conn.authenticated = True conn.user = NodeCredential(role="HA_NODE") return True3. Attack Vector & Exploitation Flow
Section titled โ3. Attack Vector & Exploitation Flowโ- Network Position & Target Discovery: An adversary gains local network access on the management VLAN or breaks out of an unprivileged Docker/K3s container running on TrueNAS SCALE.
- Interface & Socket Crafting: The attacker configures a virtual IP address (
169.254.10.1) on their interface and opens a raw socket or uses standard Linux socket options to bind to a source port less than or equal to 1024 (e.g.,nc -p 800 -s 169.254.10.1 <truenas_ip> 6000). - Session Handshake: The attacker connects to TrueNAS
middlewaredon TCP port 6000 or the WebSocket endpoint/websocket. - Administrative Promotion: The
ha_permissionhook inspectsconn.peer_addr, confirms the link-local IP and privileged port, and promotes the session toNodeCredentialwithout prompting for a password or API key. - Root Command Execution: The attacker dispatches a JSON-RPC payload invoking
core.call("system.command", ["id; uname -a; cat /etc/shadow"]), executing arbitrary commands with fullrootprivileges.
4. Forensic Investigation & Threat Hunting
Section titled โ4. Forensic Investigation & Threat HuntingโForensic detection focuses on identifying TCP connections to middlewared utilizing source IPs in the 169.254.10.0/24 range arriving over non-heartbeat interfaces, as well as auditing API calls recorded in middlewared.log.
title: TrueNAS SCALE middlewared HA Heartbeat Spoofingid: 8c3d91e4-f2a1-468b-a719-truenasauth01status: experimentaldescription: Detects incoming connections to TrueNAS middlewared originating from link-local heartbeat IPs (169.254.10.x) on non-heartbeat interfaces.references: - https://www.rapid7.com/blog/post/2026/11/05/cve-2026-123033-truenas-scale-middlewared-auth-bypass/ - https://nvd.nist.gov/vuln/detail/CVE-2026-123033author: Hermes Codex Threat Intelligencedate: 2026-11-06logsource: category: network_connection product: linuxdetection: selection_target: DestinationPort: 6000 selection_spoofed_src: SourceIp|startswith: '169.254.10.' selection_low_port: SourcePort|lte: 1024 condition: selection_target and selection_spoofed_src and selection_low_portfields: - SourceIp - SourcePort - DestinationIp - DestinationPortlevel: criticaltags: - attack.initial_access - attack.privilege_escalation - attack.t1078 - attack.t1068// Detect anomalous middlewared administrative calls executed via NodeCredentialTrueNASLogs_CL| where TimeGenerated >= ago(7d)| where Message_s has "NodeCredential" or Message_s has "ha_permission"| where Message_s has_any ("system.command", "user.create", "filesystem.file_receive", "pool.dataset.delete")| extend InvokedMethod = tostring(split(split(Message_s, "calling ")[1], "(")[0])| extend PeerAddress = tostring(split(split(Message_s, "from ")[1], " ")[0])| project TimeGenerated, Computer, InvokedMethod, PeerAddress, Message_s| sort by TimeGenerated desc#!/usr/bin/env bash# TrueNAS SCALE middlewared Audit Scriptecho "=== Checking TrueNAS SCALE Version ==="cat /etc/version
echo -e "\n=== Checking for Suspicious Link-Local API Sessions in middlewared.log ==="grep -E "(ha_permission.*granted|NodeCredential.*authenticated|169\.254\.10\.)" /var/log/middlewared.log 2>/dev/null | tail -n 30
echo -e "\n=== Auditing Active Connections on Port 6000 ==="ss -tanp | grep ":6000\b"
echo -e "\n=== Auditing Recently Created Administrative Users ==="midclt call user.query '[["builtin", "=", false]]' 2>/dev/nullActionable Indicators of Compromise (IOCs)
Section titled โActionable Indicators of Compromise (IOCs)โ| Indicator Type | Observable / Indicator | Role / Attribution | Status |
|---|---|---|---|
| Network IP / CIDR | 169.254.10[.]1, 169.254.10[.]2 | Link-local source addresses spoofed on external/VLAN interfaces | MALICIOUS |
| Port / Protocol | TCP 6000, TCP 443 | TrueNAS middlewared API and WebSocket daemon | MONITOR |
| Source Port Constraint | Port <= 1024 | Privileged port spoofing utilized to satisfy ha_permission hook | ANOMALOUS |
| Syslog Pattern | middlewared.log: ha_permission: granted root NodeCredential | Unauthorized authentication bypass execution | CONFIRMED |
| API Endpoint | /websocket, /api/v2.0/auth/me | Target API methods invoked with unauthenticated link-local origin | ACTIVE |
5. Remediation Strategy & Mitigation Guidance
Section titled โ5. Remediation Strategy & Mitigation GuidanceโAdministrators running TrueNAS SCALE must apply updates immediately to prevent unauthorized privilege escalation and storage destruction.
Patch Engineering & Detailed Release Matrix
Section titled โPatch Engineering & Detailed Release MatrixโThe vulnerability was resolved by iXsystems in TrueNAS SCALE 25.10.8. The patch modifies middlewared/plugins/failover_/ha_permission.py:
- Binds link-local HA peer authorization strictly to dedicated physical point-to-point heartbeat interfaces (
hb0orinternal_ha_link), ignoring link-local packets from standard Ethernet or bridge interfaces. - Requires an ephemeral, cryptographically random preshared secret (
/etc/ctdb/ha_shared_secret) generated during cluster initialization. - Disables HA peer auto-elevation entirely on non-HA single-node installations.
| Major Train | Vulnerable Versions | Fixed Release | Patch Status |
|---|---|---|---|
| TrueNAS SCALE 25.10 (Electric Eel) | < 25.10.8 | 25.10.8 | Official Maintenance Release |
| TrueNAS SCALE 24.10 (Dragonfish) | All versions | Migrate to 25.10.8 | Upstream Upgrade Recommended |
| TrueNAS Community Edition | Single-node installs < 25.10.8 | 25.10.8 | Disables dormant HA hooks |
Upgrade to TrueNAS SCALE 25.10.8
Section titled โUpgrade to TrueNAS SCALE 25.10.8โApply official updates distributed through the TrueNAS Web UI (System Settings > Update) or via CLI:
- Upgrade all production nodes to 25.10.8 or the latest maintenance release for your respective train.
Network Segmentation & Firewalling Workaround
Section titled โNetwork Segmentation & Firewalling WorkaroundโIf an immediate upgrade is not possible, enforce network-level filtering using iptables / nftables to drop incoming traffic with link-local source IPs on general LAN interfaces:
# Drop spoofed link-local packets arriving on external interfacessudo iptables -I INPUT -s 169.254.10.0/24 ! -i heartbeat_link -j DROP
# Restrict middlewared port 6000 strictly to localhostsudo iptables -I INPUT -p tcp --dport 6000 ! -s 127.0.0.1 -j DROP