Z-Wave JS checks that messages establishing an S2 secure connection come from the device being paired. Another node can no longer satisfy those waiting steps by supplying key-exchange or completion commands.

The driver also rejects invalid public keys, retrieves only the keys both requested and granted, and verifies that the final completion message uses the temporary pairing key.