
Simulates a Matter commissioning code brute-force attack (CVE-2026-23005) using Python to demonstrate missing rate limiting and lockout on 8-digit setup codes.
# matter_commissioning_sim.py
import random
real_code = random.randint(10000000, 99999999)
def attempt_join(code_attempt):
# Simulate joining: no delay, no lockout
if code_attempt == real_code:
print("Joined successfully!")
return True
return False
# Brute-force all 8-digit codes (10^8)
for code in range(10000000, 100000000):
if attempt_join(code):
break
A Matter device accepts commissioning attempts with an 8‑digit setup code but imposes no rate‑limiting or lockout after failed attempts. An attacker in proximity can brute‑force the entire code space within a few hours and join the network without physical access to the device.
Run the simulation (it will take time, but conceptually):
python matter_commissioning_sim.py
It eventually finds the correct code.