Skip to content

fix(security): Ledger Live peer pin matches current metadata (#831) - #833

Open
graciangabriel8 wants to merge 3 commits into
mainfrom
fix/831-ledger-live-peer-pin
Open

fix(security): Ledger Live peer pin matches current metadata (#831)#833
graciangabriel8 wants to merge 3 commits into
mainfrom
fix/831-ledger-live-peer-pin

Conversation

@graciangabriel8

@graciangabriel8 graciangabriel8 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The WalletConnect peer pin's name (exact "Ledger Live") and icon-host (*.ledger.com) checks were failing on every genuine Ledger Live pairing — current Ledger Live advertises name "Ledger Wallet" and its sole icon from avatars.githubusercontent.com, so only url ever passed. This re-scopes the pin so url host (ledger.com/subdomain) is the load-bearing anchor, name widens to a small allowlist ("Ledger Live", "Ledger Wallet") as a warning contributor rather than a sole trigger, and the icon-host check is dropped (a GitHub avatar URL isn't a Ledger-controlled identifier). Mismatch messages now name the exact field(s) that disagreed.

Empty url is tolerated, but only when name is already allowlisted. Neither the pre-#831 code's unevidenced "Ledger Live mobile sometimes omits url" claim nor a hard url requirement is something we could verify here, so this reading is safe under either: if the mobile claim is true, an unconditional url requirement would cry wolf on every mobile pairing (the #831 defect class); if it's false, gating the tolerance on nameOk means it buys nothing against the pin's actual threat (accidental wrong-wallet pairing) since a mis-scanned MetaMask isn't self-reported as "Ledger Wallet" either way.

This is signing-path code and is not self-certified — it needs maintainer security review, in particular the empty-url tolerance and the icon check removal.

Closes #831

graciangabriel8 and others added 3 commits August 16, 2026 13:51
Real Ledger Live now advertises name "Ledger Wallet" and its sole icon
from avatars.githubusercontent.com, so the old exact-name + icon-host
checks failed on every genuine pairing. Re-scope the pin: `url` host
(ledger.com/subdomain, no empty-url exception) is now the load-bearing
anchor since all three fields are equally peer-self-reported; `name`
widens to a small allowlist ("Ledger Live", "Ledger Wallet") and stays
a warning contributor rather than a sole trigger; the icon-host check
is dropped since a GitHub avatar URL isn't a Ledger-controlled
identifier. Mismatch messages now name the exact field(s) that failed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
#831)

Per PR #833 review: restore a narrow empty-url exception, but gate it
on `name` already being allowlisted — the pre-#831 "mobile omits url"
claim and a hard url requirement are both unevidenced, so this stays
safe under either reading (no cry-wolf on mobile if the claim is
true; no benefit-of-the-doubt for an unrecognized wallet if it's
false). Mismatch messages distinguish "empty and untolerated" from
"non-empty and wrong host". Also: drop the unevidenced "Ledger Live
always advertises name and url" claim from the missing-metadata
message; add near-miss url fixtures (evil-ledger.com,
ledger.com.evil.tld) pinning the suffix-match property; invert the
empty-url test to cover both directions of the narrowed contract;
label the non-Ledger-url control test as a control, not a falsifier,
in its title.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…bled reference

Review nit: the comment said 'unrecognized' where the rule gates on the name
being recognized — prose describing the opposite of the code beside it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Peer pin rejects real Ledger Live: name "Ledger Wallet" + non-ledger.com icon host

1 participant