AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 57 Bitcoin

swaps: nostr: add sanity checks for replies

Public commit record

What the developer wrote

Authored by SomberNight

45/100 · Thin
swaps: nostr: add sanity checks for replies
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit tightens how Electrum's submarine-swap client matches Nostr direct-message replies to the requests it sent out. Previously, the client keyed pending replies only by the original event ID. That could let a malicious or misconfigured relay/peer inject a reply from a different swap server and have it accepted. The patch now also checks the reply author's public key, so replies are only accepted from the server that was actually asked. It is a defensive hardening fix rather than a complete exploit chain.

Recommended action

Treat as a low-to-moderate security hardening patch. Users running submarine swaps over Nostr should upgrade to a version containing this commit. Review whether additional authentication (e.g., signed response envelopes, replay protection, timeout/cleanup of stale dm_replies entries) is warranted, because the patch only binds replies to the intended server pubkey.

Security signals we found

01

key lookup widened from single identifier to composite (pubkey, event_id)

02

prevents cross-pubkey reply confusion / injection

03

sanity-check style hardening in P2P messaging layer

04

no explicit CVE or security advisory referenced in commit

Risk score

Why this scored 57/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 8/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.