bugfix: fwd slash in multisig name caused export to yikes. Replace fwd slash with dash in export filenames
What changed, and why it matters
This update fixes a bug where giving a multisig wallet a name containing a forward slash (like '2/3 me/her/it') would crash the COLDCARD device when exporting wallet files to a microSD card. The slash is now replaced with a dash in the exported filename, preventing the crash. It is a reliability fix rather than a security vulnerability that could be exploited remotely.
Treat as a routine bugfix. No urgent security response is required. Users who create multisig wallets with '/' in the name should update to a firmware release containing this fix if they need to export wallet artifacts.
Security signals we found
Filename sanitization for filesystem-safe output
Crash (Yikes) triggered by user-controlled input in filename
Local-only trigger requiring physical device access and SD card export
No evidence of code execution, privilege escalation, or data leakage
Evidence from the diff
The MultisigWallet.make_fname() method in shared/multisig.py builds filenames for exported wallet artifacts using the wallet name. Previously it only replaced spaces with underscores. A forward slash in the wallet name was passed through unchanged, which caused a ‘Yikes’ crash (likely an unhandled exception or filesystem error) when writing to the FAT32 microSD card. The patch adds rv.replace('/', '-') so slashes are sanitized. A regression test was added in testing/test_multisig.py.
Changed components
shared/multisig.py: MultisigWallet.make_fname()COLDCARD multisig wallet export to microSD (Coldcard Export, Descriptors Export)Inspect captured patch +32 / −1
diff --git a/releases/Next-ChangeLog.md b/releases/Next-ChangeLog.md
index 9367453..140fc78 100644
--- a/releases/Next-ChangeLog.md
+++ b/releases/Next-ChangeLog.md
@@ -9,6 +9,7 @@ This lists the new changes that have not yet been published in a normal release.
- New Feature: Support for v3 transactions
- New Feature: Send keystrokes with all derived BIP-85 secrets
- Enhancement: CCC allow to reset block height
+- Bugfix: Replace `/` with `-` in exported file names of multisig wallet export artifacts
# Mk4 Specific Changes
diff --git a/shared/multisig.py b/shared/multisig.py
index 1934e76..42e5a97 100644
--- a/shared/multisig.py
+++ b/shared/multisig.py
@@ -865,7 +865,8 @@ class MultisigWallet(WalletABC):
def make_fname(self, prefix, suffix='txt'):
rv = '%s-%s.%s' % (prefix, self.name, suffix)
- return rv.replace(' ', '_')
+ rv = rv.replace(' ', '_')
+ return rv.replace('/', '-')
async def export_electrum(self):
# Generate and save an Electrum JSON file.
diff --git a/testing/test_multisig.py b/testing/test_multisig.py
index 49d87e3..a3f4ce3 100644
--- a/testing/test_multisig.py
+++ b/testing/test_multisig.py
@@ -4175,4 +4175,33 @@ def test_af_matching_convoluted_case(af, psbt_v2, clear_ms, fake_ms_txn, import_
assert len(po.inputs[0].part_sigs) == 0 # considered not ours
assert len(po.inputs[1].part_sigs) == 1 # signature added
+
+def test_fwd_slash_in_name(import_ms_wallet, clear_ms, pick_menu_item, need_keypress, cap_story,
+ press_cancel, garbage_collector, microsd_path):
+ clear_ms()
+ name = "2/3 me/her/it"
+ import_ms_wallet(2,3, "p2wsh", name=name, accept=True)
+ pick_menu_item("Settings")
+ pick_menu_item("Multisig Wallets")
+ pick_menu_item(f"2/3: {name}")
+ pick_menu_item("Coldcard Export")
+ need_keypress("1") # SD
+ time.sleep(.1)
+ title, story = cap_story()
+ fname = story.split("\n\n")[1]
+ garbage_collector.append(microsd_path(fname))
+ assert fname.strip().startswith("export-2-3_me-her-it")
+ press_cancel()
+ press_cancel()
+ pick_menu_item("Descriptors")
+ pick_menu_item("Export")
+ need_keypress("1") # SD
+ time.sleep(.1)
+ title, story = cap_story()
+ fname = story.split("\n\n")[1]
+ garbage_collector.append(microsd_path(fname))
+ assert fname.strip().startswith("desc-2-3_me-her-it")
+ press_cancel()
+ press_cancel()
+
# EOF
Why this scored 30/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.