Zigbee and Thread mesh networks run lighting, sensors, locks, meters and HVAC controls in homes and commercial buildings, and their security depends almost entirely on how keys are handled when devices join. Both protocols use AES-128 on IEEE 802.15.4 radios and both are sound on paper, but a Zigbee network that still accepts the well-known default link key, or a Thread network commissioned with a guessable joining credential, can be joined by anyone in radio range. This guide explains the key hierarchy of each protocol, install codes and trust centre link keys in Zigbee, network keys, PSKc and joiner credentials in Thread, and the newer features in Zigbee PRO 2023 and Zigbee 4.0. It is written for building systems engineers, smart building integrators and IoT security teams; household advice sits in the Smart Home Security Guide.
Key takeaways
- Joining is the weak moment. Both protocols encrypt traffic with a shared network key, so the real question is how that key reaches a new device and who else can obtain it.
- Never rely on the default Zigbee link key. The well-known ZigBeeAlliance09 key should be used only briefly for initial joining, if at all; use install codes or Dynamic Link Keys and require each device to obtain a unique trust centre link key.
- Thread commissioning credentials are passwords. The joiner credential (PSKd) and the network passphrase that produces the PSKc must be unique per device or network, random and protected like any other secret.
- The hub is the crown jewel. The Zigbee trust centre and the Thread border router and commissioner hold every key in the mesh; compromise of the hub is compromise of the network.
- Plan key rotation and device removal. Network key updates, unique link keys and the ability to revoke a device are what keep a lost or replaced device from remaining a way in.
Zigbee and Thread compared
Both run on IEEE 802.15.4 radios at 2.4 GHz (Zigbee also supports sub-GHz bands, now branded Suzi by the Connectivity Standards Alliance), but they sit at different layers. Zigbee is a complete stack with its own application layer; Thread is an IPv6 mesh network that carries application protocols, most often Matter.
| Aspect | Zigbee 3.0 / PRO 2023 | Thread |
|---|---|---|
| Maintainer | Connectivity Standards Alliance (CSA) | Thread Group |
| Network layer | Zigbee network layer (not IP) | IPv6 over 802.15.4, routed through border routers |
| Traffic encryption | AES-128 network key shared by all devices; headers authenticated, payload encrypted, 4-byte MIC | AES-128 network key shared by all devices; all communication encrypted and devices authenticated |
| Joining credential | Preconfigured trust centre link key: global default, install code derived, or Dynamic Link Key (ECDH) | Joiner PSKd (per device) or PSKc (per network) used in DTLS with EC J-PAKE |
| Central authority | Trust centre (normally the coordinator or hub); distributed mode has none | Leader holds network data; commissioner authorises joiners |
| Replay protection | 32-bit frame counters, synchronised since R23 | Frame counters and MLE challenges |
| Key rotation | Trust centre broadcast or unicast network key update | Key sequence rotation; OpenThread default every 672 hours |
| Typical application | Lighting, sensors, Smart Energy meters | Matter devices, building sensors |
Zigbee security: trust centre, network key and link keys
Security model
Zigbee now defines a single mode, Standard Security; the older Residential and High Security modes are deprecated. Every device in a network shares one 128-bit network key with a sequence number from 0 to 255. Unicast application traffic can additionally be protected with link keys between a device and the trust centre.
- Centralised (trust centre) networks: a joining device is held in a provisional state until the trust centre decides to send the network key, order removal or ignore it; a parent removes a device that receives no key within about two seconds. This is the mode to use in buildings.
- Distributed networks: any router can admit joiners and all devices share one preconfigured link key. The choice is fixed when the network forms and is less secure, so avoid it outside small, isolated installations.
Link keys and install codes
| Joining method | How the joining key is established | Risk | Use when |
|---|---|---|---|
| Global default link key (ZigBeeAlliance09) | Publicly known key built into Zigbee 3.0 devices for interoperability | Anyone sniffing the join can decrypt the network key sent to the device | Only briefly, with joining open for minutes, and only if no better option exists |
| Install code | A 6, 8, 12 or 16 byte code plus CRC, printed on or shipped with the device, hashed with AES-MMO into a unique preconfigured link key; entered at the trust centre out of band with the device EUI64 | Codes must be captured and protected during installation | Commercial buildings and any Smart Energy device (mandatory there) |
| Dynamic Link Key (Zigbee PRO 2023 / R23) | Elliptic curve Diffie-Hellman between device and trust centre before the network key is sent | Requires R23 support on both sides | New deployments with R23 hubs and devices |
| Certificate-based key establishment (Smart Energy CBKE) | Certificates from a common CA replace the preconfigured key after joining | Crypto Suite 1 curve (sect163k1) gives only about 80-bit strength | Smart metering, preferring Crypto Suite 2 |
After joining, a Zigbee 3.0 device must request an updated trust centre link key, replacing the preconfigured one, when both device and trust centre support Zigbee 3.0. Confirm that your hub actually issues unique keys rather than one global key, because the specification allows unique, address-derived or global link keys. Silicon Labs' Zigbee security application note also advises the trust centre to silently ignore rejoin attempts that rely only on the well-known key.
Newer features: PRO 2023 and Zigbee 4.0
- Device Interview (PRO 2023): lets the trust centre query and filter devices before they are admitted, based on ecosystem requirements.
- Trust Center Swap-Out (PRO 2023): the hub can be replaced without recommissioning every device, which removes a common reason for weak re-joins.
- Frame counter synchronisation: R23 synchronises frame counters across the network to resist replay; Zigbee 4.0 (announced 18 November 2025) describes this as Advanced Frame Counter Synchronization.
- Zigbee 4.0 controls: cryptographic agility, Restricted Mode, Secured Channel, protection against unauthorised PAN ID changes, Unique Link Key Monitoring and Smart Energy Authentication Level Control.
- Zigbee Direct: Bluetooth Low Energy access to a Zigbee network from a phone. It adds a new attack surface at the edge of the mesh, so treat the Zigbee Direct device like a commissioning interface and restrict it.
Thread security: network key, PSKc and commissioning
Thread authenticates every device and encrypts all communication at the network layer with a 128-bit network key. Devices cannot attach using Mesh Link Establishment (MLE) until they hold the network credentials, and MLE exchanges include challenges to prevent replay. How devices receive the credentials is set by the commissioning method.
| Credential | What it is | Protection guidance |
|---|---|---|
| Network key | 16-byte key in the Active Operational Dataset that encrypts mesh traffic | Generate randomly per network; never reuse across sites; rotate if a commissioner or border router is compromised |
| PSKc | 16-byte pre-shared key for the commissioner, derived with PBKDF2 (16,384 iterations in OpenThread) from a passphrase, the network name and extended PAN ID | Use a long random passphrase; anyone with the PSKc can become a commissioner via the border agent |
| PSKd (joiner credential) | Per-device credential, at least six characters of digits and uppercase letters excluding I, O, Q and Z | Unique per device; ship on a label or in a secure record, never as a constant in firmware |
| Extended PAN ID and network name | Identifiers of the network, used with the PAN ID | Not secrets, but part of PSKc derivation |
- DTLS with EC J-PAKE: both commissioner and joiner sessions use DTLS with the EC J-PAKE cipher suite (ECJPAKE with AES-128-CCM-8 in OpenThread), which resists offline guessing of the password, but a short or shared PSKd can still be guessed online during an open joining window.
- Security policy flags: the dataset's security policy controls whether the network key can be obtained out of band, whether native commissioning with the PSKc is allowed, whether external commissioners are accepted and whether older Thread 1.1 routers are enabled. Disable what you do not use.
- Key rotation: OpenThread's default security policy rotates the key sequence every 672 hours (28 days) with a minimum of two hours; check what your border router vendor configures.
- Border routers: they bridge the Thread mesh to Wi-Fi or Ethernet IPv6 networks. Firewall them like any network edge and patch them; a compromised border router sees and can inject all traffic.
Thread and Matter
Most new Thread devices are Matter devices. Matter runs over Thread and Wi-Fi and uses Bluetooth Low Energy for commissioning, then the controller provisions the Thread credentials. Matter adds its own device attestation and multi-admin model; the Thread layer still needs the controls above. See the Device and IoT Identity Guide.
Decision guidance for buildings and homes
| Decision | Option A | Option B | Guidance |
|---|---|---|---|
| Zigbee joining | Install codes | Dynamic Link Key | Install codes work with any Zigbee 3.0 device but need a process for capturing codes; DLK removes that step where every device and the hub are R23 |
| Zigbee topology | Centralised trust centre | Distributed | Centralised for any building; distributed only for isolated, low-value deployments |
| Hub architecture | One large mesh | Several meshes per floor or system | Several meshes limit the blast radius of one network key and simplify rotation |
| Thread commissioning | Per-device PSKd via a commissioner | Matter controller provisioning | Matter devices follow the Matter flow; non-Matter Thread devices need unique PSKd values |
| Hub connectivity | Cloud-managed hub | Local-only hub | Cloud management adds account and API risk; local-only adds patching burden. Either way, put the hub on a segregated IoT network |
- Small sites: one hub, install codes or DLK, joining opened only while adding a device, and the hub on a guest or IoT VLAN.
- Large estates: inventory each mesh and its trust centre, keep install codes and PSKd values in a secrets store rather than spreadsheets, and segment hubs and border routers from the corporate network. See the Network Segmentation Guide.
Where identity fits
Every mesh device is a non-human identity whose credential is a link key, a joiner credential or a certificate. The keys that matter most are held by a few machines: the trust centre, the commissioner and the border router, plus the cloud accounts and API tokens of the platform that manages them. Treat the hub admin account and its API keys as privileged credentials, keep install codes and PSKd records in a vault, and remove devices from the trust centre or commissioner when they are decommissioned. See the Identity for IoT Fleets Guide and the Secrets Management Guide.
Implementation steps
- Inventory meshes: list every Zigbee and Thread network, its hub or border routers, firmware versions, device count and supported release (Zigbee 3.0, PRO 2023, Thread version).
- Check joining policy: confirm whether the trust centre still accepts the default link key for joins and rejoins, whether unique link keys are issued, and how long joining stays open.
- Switch to strong joining: enable install codes (or DLK on R23 networks) and per-device PSKd for Thread. Test on one floor or one room first, keeping the previous hub backup to restore if devices fail to rejoin.
- Segment the hubs: place hubs and border routers on an IoT network with firewall rules limited to the management platform and required services.
- Rotate keys: after cleanup, perform a network key update and confirm all devices follow it; schedule periodic updates.
- Monitor: use the hub's logs and, where justified, an 802.15.4 sniffer on the right channel to detect unexpected joins and PAN ID changes.
- Decommission properly: remove departing devices from the trust centre or commissioner and factory reset them before disposal.
Detection and measurement
- What to log: device joins and rejoins, trust centre decisions, network key updates, commissioner sessions and petition attempts, border router configuration changes and hub admin logins.
- What to alert on: joins outside change windows, rejoins using the default key, a new PAN on the same channel with your identifiers, repeated failed joiner sessions, and unknown commissioners.
Metrics
- Strong joining coverage: percentage of devices joined with install codes, DLK or unique PSKd rather than default keys.
- Unique link keys: percentage of Zigbee devices holding a unique trust centre link key.
- Joining exposure: total minutes per month that permit joining was open.
- Key age: days since the last network key update per mesh.
- Hub patch latency: days from hub or border router firmware release to deployment.
- Orphaned devices: devices in the trust centre or commissioner records with no matching asset.
Framework mapping
| Control | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | Other |
|---|---|---|---|
| Device authentication at join | IA-3 Device Identification and Authentication | PR.AA-03 | ETSI EN 303 645 provision 5.1 (no universal default passwords) |
| Mesh encryption and key rotation | SC-8, SC-12 Cryptographic Key Establishment and Management | PR.DS-02 | NIST IR 8259A data protection |
| Wireless access restriction | AC-18 Wireless Access | PR.IR-01 | ISO/IEC 27001:2022 A.8.20 |
| Inventory of meshes and devices | CM-8 | ID.AM-01 | CIS Controls v8.1 Control 1 |
| Hub and border router hardening | CM-6, SI-2 | PR.PS-01, PR.PS-02 | CIS Controls v8.1 Control 4 |
| Monitoring joins | SI-4 | DE.CM-01 | CIS Controls v8.1 Control 13 |
Common failure patterns
- Default key everywhere: hubs configured to accept ZigBeeAlliance09 for all joins and rejoins, so a radio capture during any join reveals the network key.
- Joining left open: permit joining enabled for hours during installation and forgotten, giving an attacker in range a long window.
- Shared joiner credentials: one PSKd for a whole product line, or install codes stored in an emailed spreadsheet.
- Hub on the corporate LAN: the trust centre or border router reachable from office PCs and the internet, with default admin credentials.
- No key rotation after compromise: replacing a stolen or faulty device without removing it and updating the network key.
- Distributed mode in buildings: forming networks in distributed mode for convenience, so any router can admit a device.
Practitioner checklist
- Inventory every Zigbee and Thread mesh with its hub, border routers and supported release.
- Disable default link key joins and rejoins on Zigbee trust centres.
- Use install codes or Dynamic Link Keys, and confirm unique trust centre link keys are issued.
- Use unique, random PSKd values and a long random PSKc passphrase for Thread.
- Open joining only while adding a device, and log every join.
- Put hubs and border routers on a segregated IoT network and patch them.
- Store install codes, PSKd values and hub credentials in a secrets manager.
- Update network keys on a schedule and after any device loss or hub compromise.
- Remove and reset devices at decommissioning.
Standards and references
- Connectivity Standards Alliance: Zigbee
- Connectivity Standards Alliance: Zigbee PRO 2023 Improves Overall Security
- Connectivity Standards Alliance: Zigbee 4.0 and Suzi Announcement
- Connectivity Standards Alliance: Zigbee Security and Privacy Fundamentals
- Thread Group: What is Thread
- OpenThread: Thread Primer
- OpenThread: Source Repository (MeshCoP and key manager)
- Silicon Labs: AN1233 Zigbee Security
Related NHI Mgmt Group resources: Smart Home Security Guide · IoT Security Guide · Bluetooth, RFID and NFC Security Guide · ETSI EN 303 645 Consumer IoT Guide · NIST IR 8259 IoT Device Cybersecurity Baseline Guide