hw plugins: coldcard: fix compat with ckcc-protocol v1.5.0
What changed, and why it matters
This is a small compatibility fix for Electrum's Coldcard hardware wallet plugin. A newer version of the underlying Coldcard communication library (ckcc-protocol v1.5.0) renamed a constant used to locate the Coldcard simulator. Electrum now tries the new name first and falls back to the old name, so the plugin works with both old and new library versions. There is no indication this is a security vulnerability or that it introduces one.
No security action needed; treat as a normal compatibility fix. Users relying on Coldcard simulator functionality should update to a version including this patch when using ckcc-protocol v1.5.0 or later.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates the import of CKCC_SIMULATOR_PATH in electrum/plugins/coldcard/coldcard.py. In ckcc-protocol >= v1.5.0 the symbol was renamed from CKCC_SIMULATOR_PATH to DEFAULT_SIM_SOCKET. The change uses a try/except block to import the new symbol if available, otherwise fall back to the old one. This is purely a compatibility/import fix; no cryptographic, transaction parsing, or device communication logic is changed.
Changed components
electrum/plugins/coldcard/coldcard.pyInspect captured patch +6 / −1
diff --git a/electrum/plugins/coldcard/coldcard.py b/electrum/plugins/coldcard/coldcard.py
index 46d3c5f..a9f74ec 100644
--- a/electrum/plugins/coldcard/coldcard.py
+++ b/electrum/plugins/coldcard/coldcard.py
@@ -34,7 +34,12 @@ try:
from ckcc.constants import (MAX_MSG_LEN, MAX_BLK_LEN, MSG_SIGNING_MAX_LENGTH, MAX_TXN_LEN,
AF_CLASSIC, AF_P2SH, AF_P2WPKH, AF_P2WSH, AF_P2WPKH_P2SH, AF_P2WSH_P2SH)
- from ckcc.client import ColdcardDevice, COINKITE_VID, CKCC_PID, CKCC_SIMULATOR_PATH
+ from ckcc.client import ColdcardDevice, COINKITE_VID, CKCC_PID
+
+ try: # >= v1.5.0
+ from ckcc.client import DEFAULT_SIM_SOCKET as CKCC_SIMULATOR_PATH
+ except ImportError: # <= v1.4.x
+ from ckcc.client import CKCC_SIMULATOR_PATH
requirements_ok = True
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.