EL
← All projectsElectrum

Electrum

Long-running lightweight Bitcoin wallet for desktop and mobile platforms.

BitcoinSoftware walletsNormal
Repository coverage

1153 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

92security candidates261second-pass queue1007AI analyses
127commits · 30 days
262commits · 60 days
545commits · 180 days
1002commits · 365 days
Backfill bands
Aug 5 → Feb 6470 seen11 candidatesComplete
Feb 6 → Jun 6346 seen10 candidatesComplete
Jun 6 → Jul 653 seen2 candidatesComplete
Jul 6 → Aug 554 seen3 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

66/100 average clarity
220Strong · 80–100
549Adequate · 60–79
340Thin · 40–59
44Opaque · 0–39
2security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
ThomasV137891162
SomberNight39330362063
f321x40325387070
Sander van Grieken10910101057
ghost4342517069
Felix25410072
user323062
ekzyis222053
accumulator613071
Roman Zeyde515053
Sasha Zykov515075
Aaron Fiore414068
Analysis record

Published AI watches

Last scanned 4 minutes ago

Low 29 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10992 from f321x/dedup_is_seed_wizard

This commit simplifies the seed-validation logic in Electrum's Qt wallet wizard by replacing a local copy of the rules with a call to an existing shared validation method. The change appears to be a code-cleanup refactor that removes dupli…

Refactor of seed-validation logic in wallet creation wizardRemoval of duplicated seed-type checks in favor of centralized validationAdded assertion constraining seed type to 'electrum'
554daca6by ghost43+2−81 file
No security note in commit
Low 29 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10982 from spesmilo/wizard_2fa_seed_redirect

This commit changes Electrum's wallet creation wizard so that if a user tries to restore a normal 'standard' wallet but pastes a seed phrase that actually belongs to a two-factor authentication (2FA) wallet, the wizard automatically redire…

UX-level safety fix preventing wallet-type/seed mismatchState mutation: wizard_data['wallet_type'] changed from 'standard' to '2fa' based on seed typeNo cryptographic, network, or privilege changes
310c9dd0by Felix+102−133 files
No security note in commit
Informational 12 AI analysisMessage 68 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

qt: wizard: dedup seed validation rules

This commit is a small code cleanup in Electrum's wallet setup wizard. It removes a duplicate copy of the rules used to check whether a recovery seed is valid and instead reuses an existing method. There is no indication this fixes a secur…

89d0de06by f321x+2−81 file
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

tests: wizard: cover standard -> 2fa redirection

This commit only adds and reorganizes automated test code for Electrum's wallet creation wizard. It does not change any production wallet logic, cryptography, or network handling. The tests verify that when a user tries to restore a 'stand…

70b4d27cby f321x+68−91 file
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10988 from f321x/update_security_review_ci_model

This commit updates Electrum's internal CI (continuous integration) script that runs an automated security review using Anthropic's Claude Code tool. It changes the AI model version used for reviews from 'claude-opus-5' to 'claude-opus-5-5…

CI hardening: detects and reports AI model downgrades during automated security reviewNo changes to application code, cryptography, network protocol, or build artifactsNo privilege escalation, injection, or data-exfiltration vectors introduced by the diff
638fbba8by Felix+75−111 file
No security note in commit
Informational 12 AI analysisMessage 90 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

ci: security review: warn if the model got downgraded

This commit updates Electrum's own CI security-review script. It adds detection and warnings when the automated code reviewer (Claude Code) silently falls back to a different AI model, for example after a content-policy refusal. It does no…

CI-only changeNo modification of wallet, crypto, networking, or build artifactsAdds detection for AI model fallback/downgrade in automated security review
ace2ca7aby f321x+74−101 file
No security note in commit
Low 44 AI analysisMessage 68 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10987 from spesmilo/fix_10986

This commit fixes a bug where Electrum failed to recognize certain already-signed Bitcoin transactions as complete. Specifically, for native SegWit inputs, Bitcoin Core can produce a finalized PSBT with a valid witness but an empty scriptS…

Logic error in transaction completeness detectionNative SegWit witness handling edge casePSBT interoperability issue with Bitcoin Core
bef80421by ghost43+11−02 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

transaction: treat native segwit input with non-empty witness as complete

This commit fixes a bug where Electrum incorrectly treated finalized Bitcoin transactions as incomplete. Some wallet software (like Bitcoin Core and Sparrow) creates native SegWit transactions that omit an empty placeholder field Electrum …

Logic error in transaction completeness detectionPotential denial of service / user funds stuck due to refusal to broadcast valid finalized transactionInteroperability failure with Bitcoin Core and Sparrow PSBT output
e9bb42e6by ThomasV+11−02 files
No security note in commit
Moderate 68 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10981 from spesmilo/do_not_sign_txin_with_witness

This change prevents Electrum from re-signing Bitcoin transaction inputs that already contain a witness (the data proving the input was authorized). The patch fixes a bug where Electrum could incorrectly sign a non-SegWit input as if it we…

Incorrect signature algorithm selection for non-SegWit inputs when witness data is presentPSBT handling edge case where pre-existing witness data influences signing pathPotential invalid signature production during transaction signing
9da4c342by ThomasV+10−21 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10974 from SomberNight/202609_nostr_psbt_xpub

This commit only adds a long code comment explaining a design choice in Electrum's PSBT-over-Nostr plugin. It does not change any program behavior. The comment documents that the plugin derives each cosigner's Nostr secret key from their B…

Documentation-only changeExplicit design tradeoff disclosure: cosigners can derive each other's Nostr secret keys from shared xpubsNo functional code change
46408a78by ThomasV+13−01 file
No security note in commit
Low 42 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10980 from spesmilo/add_input_from_network_do_not_ignore_exceptions

This is a one-line bugfix in Electrum's transaction handling. Previously, the code accidentally swallowed (hid) almost all exceptions when fetching extra transaction data from the network, only re-raising errors that were both network-rela…

Exception swallowing bug fixedNetwork/transaction input enrichment logic changedSilent failure mode removed
bb9d3280by ghost43+1−11 file
No security note in commit
Moderate 60 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10970 from f321x/fix_bolt11_bugs_2

This commit fixes several bugs in Electrum's handling of BOLT11 Lightning invoices. The most user-visible fixes are: stricter validation of invoice amounts (rejecting zero, negative, sub-millisatoshi, and leading-zero amounts), correct pad…

Stricter BOLT11 amount validation prevents acceptance of zero, negative, sub-millisatoshi, and leading-zero amountsFixed int_to_data5 padding bug that corrupted small timestamp values during invoice round-tripMalformed 'r' routing tags now raise exceptions instead of being silently skipped
4b92c0f2by ghost43+82−939 files
No security note in commit
Moderate 61 AI analysisMessage 80 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

add_info_from_network: do not swallow exceptions

Electrum's transaction builder had a bug where it would ignore certain consistency errors when fetching extra transaction data from the network. A malicious or misbehaving server could supply a wrong input amount, and Electrum would silent…

Swallowed exception leading to use of attacker-controlled input valuePSBT input consistency check bypassedPotential malicious Electrum server influence on transaction signing
3f67b21bby ThomasV+1−11 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 60 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

bolt11: remove tag arg from get_routing_info

This is a small code cleanup change. A function that reads routing hints from Lightning invoices no longer takes a tag argument because only one type of routing hint ('r') is now supported. All callers are updated accordingly. There is no …

e78fba28by f321x+12−127 files
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10940 from accumulator/fix_10937

This commit tightens how Electrum parses Bitcoin payment requests (BOLT11 lightning invoices and BIP21 URIs). It turns previously uncaught internal errors into proper validation failures, rejects malformed invoice fields that used to be si…

Stricter input validation for externally supplied BOLT11 invoices and BIP21 URIsPreviously uncaught exceptions (ValueError, UnicodeDecodeError, ecc errors) are now wrapped in domain-specific decode exceptionsMalformed fallback addresses are skipped rather than aborting or crashing
a57ef6e7by Felix+707−9610 files
No security note in commit
Low 40 AI analysisMessage 36 · Opaque
EL ElectrumElectrum BitcoinSoftware wallets

bolt11: followup #10940

This commit tightens how Electrum parses BOLT11 Lightning invoices. It now rejects duplicate 'n' (node pubkey) tags instead of silently keeping only the first one, and it rejects invoice timestamps that are negative or too far in the futur…

Stricter validation of invoice timestamp boundsDuplicate 'n' tag now raises an exception instead of being silently droppedFollow-up to prior PR #10940, indicating a recent area of security-sensitive review
3026fbdbby f321x+14−232 files
No security note in commit
Low 32 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10737 from sashazykov/hw-close-wallet-thread-leak

This commit fixes a shutdown bug in Electrum's hardware wallet support. Previously, if disconnecting from a hardware wallet failed, the cleanup thread could keep running, which could crash the application when closing. The fix stops the th…

Process abort/crash at shutdown due to leaked QThreadException during cleanup not handled, potentially causing abnormal terminationHardware wallet client close made best-effort with error logging
5b77ca46by Felix+9−22 files
No security note in commit
Informational 23 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10958 from SomberNight/202609_deps

This commit is a routine dependency update for the Electrum Bitcoin wallet. It bumps versions of Python, OpenSSL, secp256k1, and various Python packages used in builds and runtime. The commit itself does not fix any known security bug in E…

Dependency version bumps for cryptographic libraries (OpenSSL, libsecp256k1, electrum-ecc)Routine maintenance commit with no explicit security claimHash-only changes in deterministic requirements files
8bd8c3fbby ghost43+57−5612 files
No security note in commit
Informational 21 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10965 from SomberNight/202609_header_checkpoints

This commit only adds new Bitcoin block header checkpoints to Electrum's built-in chain data files. Checkpoints are hardcoded reference points that help the wallet verify it is following the real blockchain and not a fake one. Updating the…

Hardcoded blockchain checkpoints extended for all supported networksNo executable code or cryptographic logic changedNo bug fix, privilege change, or input validation change present
9e0b7e64by ghost43+276−04 files
No security note in commit
Informational 15 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

update block header checkpoints

This commit simply refreshes Electrum's built-in list of Bitcoin blockchain checkpoints. Checkpoints are known-good block hashes that help the wallet verify it is following the real chain. The update adds newer checkpoints for mainnet, sig…

e11c579bby SomberNight+276−04 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-prioritytxbatcher: to_sweep_now should be a listby ThomasV · 08ea8212 · Aug 21, 2025 · 1 fileMessage 45 · ThinInformational 23Details
Commit message · ThomasV

txbatcher: to_sweep_now should be a list

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 23/100

This commit is a small internal cleanup in Electrum's transaction batching code. It changes how sweep inputs are tracked—from using string-based keys to using proper transaction-outpoint objects and lists. The change appears to prevent a potential mismatch or bug where the wrong input could be removed from a batch, but it is not a clear, exploitable security vulnerability on its own. It is more likely a correctness/robustness fix.

Lower-prioritylnworker: (trivial) get_payment_bundle to not return Noneby SomberNight · c1d2fc2b · Aug 21, 2025 · 1 fileMessage 50 · ThinLow 29Details
Commit message · SomberNight

lnworker: (trivial) get_payment_bundle to not return None

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 29/100

This is a tiny one-line fix in Electrum's Lightning code. A helper function that looks up groups of related payments now returns an empty list instead of 'None' when nothing is found. This mainly prevents other code that expects a list from mishandling the result, which could reduce bugs or minor errors but is not a clear security vulnerability on its own.

Lower-prioritycommands: use format_satoshis consistently. don't use sci-notationby SomberNight · 74cd2b4a · Aug 21, 2025 · 3 filesMessage 65 · AdequateInformational 23Details
Commit message · SomberNight

commands: use format_satoshis consistently. don't use sci-notation

old behaviour:
```
>>> from electrum.commands import format_satoshis
>>> format_satoshis(1)
'1E-8'
```

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 23/100

This commit fixes a formatting bug in Electrum's command-line output where very small bitcoin amounts were displayed in scientific notation (like '1E-8' instead of '0.00000001'). This is a usability and correctness fix that makes wallet balances and transaction values display consistently. It is not a direct security vulnerability, but scientific notation in financial outputs could theoretically confuse users or downstream scripts that parse amounts.

AI review queuedtxbatcher: add comment to _to_pay_afterby SomberNight · 6d99717d · Aug 21, 2025 · 3 filesMessage 45 · ThinInformational 15Details
Commit message · SomberNight

txbatcher: add comment to _to_pay_after

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a minor code-quality change. It adds a clarifying comment to a payment-batching helper, makes a type annotation more specific, and adds a hash method to a transaction output class so outputs can be used in sets or as dictionary keys. There is no security fix or behavior change visible in the diff.

Lower-priorityswaps: stop sending whole req exception to clientby f321x · aa661da9 · Aug 21, 2025 · 1 fileMessage 45 · ThinLow 42Details
Commit message · f321x

swaps: stop sending whole req exception to client

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 42/100

This commit changes how Electrum's submarine swap server reports errors back to clients over Nostr. Previously, the server sent the first 100 characters of the actual exception message, which could leak internal details such as file paths, variable names, or other server-side information. Now it only sends the exception type (for example, 'ValueError') with a generic 'Internal Server Error' label. This is a hardening fix that reduces information disclosure but does not by itself stop an attacker from exploiting the underlying bug that caused the exception.

Lower-priorityswaps: rate limit swapserver requestsby f321x · 9086f1af · Aug 21, 2025 · 1 fileMessage 45 · ThinLow 46Details
Commit message · f321x

swaps: rate limit swapserver requests

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 46/100

This commit adds a speed bump to Electrum's submarine swap server. Previously, every incoming Nostr swap request was handled immediately in the message-reading loop, which could let an attacker flood the server with requests and potentially exhaust resources or cause errors. Now requests are placed in a small queue (max 5) and processed only once every 5 seconds, with extra requests dropped. This is a defensive rate-limiting patch, but the commit message does not call it a security fix and no external advisory is provided.

Lower-prioritytests: regtest: add swapserver mining fee argumentby f321x · 990a56b9 · Aug 21, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · f321x

tests: regtest: add swapserver mining fee argument

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only updates a test script for Electrum's regression testing. It changes how a test command calls the reverse-swap feature by adding an explicit provider mining fee argument taken from a prior dry-run. There is no change to production wallet code, no user-facing behavior change, and no security fix or vulnerability evident.

Lower-prioritytests: unittest get_submarine_swap_providers cliby f321x · 8c8d1423 · Aug 21, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · f321x

tests: unittest get_submarine_swap_providers cli

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds a new automated test for an existing command in Electrum. It does not change any production code, fix a bug, or alter behavior visible to users. There is no security relevance.

Lower-prioritycommands: add command to fetch nostr swap providersby f321x · 5bb9b71b · Aug 21, 2025 · 1 fileMessage 50 · ThinInformational 19Details
Commit message · f321x

commands: add command to fetch nostr swap providers

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 19/100

This commit adds a new Electrum command that lets users discover submarine swap providers over the Nostr peer-to-peer network. It also adds safety checks so users must configure a provider before performing swaps, and replaces an indefinite wait with a 15-second timeout. There is no obvious vulnerability in the diff itself; it is a feature addition with minor hardening.

Lower-prioritytxbatcher: be careful when removing local transactionsby ThomasV · 5f30f2a0 · Aug 21, 2025 · 2 filesMessage 85 · StrongModerate 69Details
Commit message · ThomasV

txbatcher: be careful when removing local transactions

1. Do not remove local transaction in find_base_tx.

This logic was intended to cleanup claim transactions that are
never broadcast (for example, if the counterparty gets a refund)
(see 1bf1de36cbbab3ef9bd06bf5009074f11f0d456d)

However, this code is too unspecific and may result in fund loss,
because the transaction being removed may contain outgoing payments.
For example, if the electrum server is not responsive, the tx will
be seen as local and deleted. In that case, another payment will
be attempted, thus paying twice.

2. Do not remove tx after try_broadcasting returns False.

The server might be lying to us. We can only remove the local tx
if there is a base_tx, because the next tx we create will try to
spend the same output.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Moderate 69/100

This commit fixes a bug in Electrum's transaction batching code that could accidentally delete a transaction that had already been sent to the Bitcoin network. If the Electrum server was slow, unresponsive, or dishonest, the wallet could think a payment was never broadcast, remove it from local records, and then create and send a second payment for the same thing—effectively paying twice and losing funds. The fix stops the wallet from automatically removing 'local' transactions in two risky situations and instead tries to rebroadcast them safely.

Lower-prioritylogging: add config.LOGS_MAX_TOTAL_SIZE_BYTES: to limit size on diskby SomberNight · 7046a7e7 · Aug 20, 2025 · 2 filesMessage 50 · ThinInformational 18Details
Commit message · SomberNight

logging: add config.LOGS_MAX_TOTAL_SIZE_BYTES: to limit size on disk

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 18/100

This commit adds a disk-space cap for Electrum's debug log files. It changes how old logs are cleaned up on startup and switches the active log file to a rotating handler so individual files cannot grow without bound. There is no direct security vulnerability being fixed; it is a hardening/operational improvement to prevent logs from filling up the disk.

Lower-prioritycommands: reverse_swap: don't require provider_mining_fee in dryrunby SomberNight · 2f1e3730 · Aug 20, 2025 · 1 fileMessage 50 · ThinInformational 18Details
Commit message · SomberNight

commands: reverse_swap: don't require provider_mining_fee in dryrun

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 18/100

This commit fixes a small user-interface bug in Electrum's command-line reverse-swap command. It makes the provider_mining_fee argument optional during a 'dryrun' preview, and corrects a typo in an error message. There is no direct evidence this is a security vulnerability.

Lower-priorityswaps: add sanity check to reverse swap mining feeby f321x · 71c71a96 · Aug 20, 2025 · 4 filesMessage 50 · ThinModerate 59Details
Commit message · f321x

swaps: add sanity check to reverse swap mining fee

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Moderate 59/100

This commit tightens how Electrum handles reverse submarine swaps (a way to move funds from Lightning back to on-chain Bitcoin). Previously, the swap code relied on the current provider fee stored in memory, which could change between the moment the user saw a quote and the moment the swap was executed. The patch makes the GUI and command-line pass the exact mining fee the user was shown into the swap logic, and adds a sanity check that the provider cannot charge more than twice that shown fee. This reduces the risk of a malicious or misconfigured swap provider surprising the user with unexpectedly high fees right before the swap completes.

Lower-priorityswaps: add sanity-check for total swap costsby SomberNight · bb39ca55 · Aug 20, 2025 · 2 filesMessage 45 · ThinLow 49Details
Commit message · SomberNight

swaps: add sanity-check for total swap costs

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 49/100

This commit adds a safety guard for Electrum's submarine swaps. Before finalizing a swap, the wallet now checks whether the fees/costs look wildly unreasonable (for example, losing more than 25% of the amount, or over 1 million satoshi in absolute terms). If the costs look insane, the wallet stops and shows the user an error instead of proceeding. The change is defensive and does not appear to fix a known exploited bug, but it reduces the risk of a malicious or misconfigured swap server causing the user to lose funds.

Lower-priorityswaps: improve prepayment invoice handlingby f321x · 04b0aca8 · Aug 20, 2025 · 1 fileMessage 45 · ThinLow 47Details
Commit message · f321x

swaps: improve prepayment invoice handling

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 47/100

This commit tightens how Electrum handles upfront 'prepayment' invoices for submarine swaps (a way to exchange on-chain and Lightning bitcoin). Previously the client calculated the prepayment using a local transaction-batcher fee estimate and had no check on what the swap server actually charged in its fee invoice. The patch switches the prepayment calculation to a known 'mining_fee' value and, crucially, rejects the swap if the server's fee invoice exceeds twice that announced mining fee. This closes a path where a malicious or buggy swap server could demand a larger prepayment than the user expected.

Lower-prioritylnworker: limit max number of incoming channel-less peersby SomberNight · df96f87e · Aug 19, 2025 · 1 fileMessage 50 · ThinModerate 62Details
Commit message · SomberNight

lnworker: limit max number of incoming channel-less peers

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Moderate 62/100

This commit adds a cap on how many incoming Lightning Network peers without channels can connect to an Electrum node at once. Before this change, an attacker could potentially open unlimited incoming peer connections, consuming memory, CPU, and network resources and possibly disrupting normal operation. The fix limits such peers to 100 and closes new connections once that limit is reached. It also fixes a related bug where an existing initialized peer connection was not being closed when a duplicate arrived.

AI review queuedlnpeer: rate-limit ordered_message_queuesby SomberNight · 1380ed4b · Aug 19, 2025 · 1 fileMessage 35 · OpaqueModerate 63Details
Commit message · SomberNight

lnpeer: rate-limit ordered_message_queues

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Moderate 63/100

This commit tightens how Electrum's Lightning peer handler accepts and queues certain ordered messages. It caps per-channel message queues at 10 entries, rejects ordered messages for unknown channels, and limits a temporary-channel tracking dictionary that previously grew without cleanup. These changes reduce the risk that a malicious or misbehaving peer could exhaust memory or fill queues to disrupt the node.

AI review queuedlnpeer: rate-limit reply_channel_rangeby SomberNight · b8d989e1 · Aug 19, 2025 · 1 fileMessage 35 · OpaqueLow 46Details
Commit message · SomberNight

lnpeer: rate-limit reply_channel_range

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Low 46/100

This commit adds a rate limit to how many unsolicited or rapid 'reply_channel_range' messages Electrum will accept from a Lightning peer. Previously, the queue that stores these replies was always created when the peer object was set up, so a remote peer could keep sending replies even when Electrum never asked for them, potentially filling memory or causing the program to fall behind. Now the queue is only created while Electrum is actively waiting for a reply, and if too many replies pile up the code slows the peer down. This looks like a hardening fix against a denial-of-service or memory-pressure issue, but the commit message does not call it a security fix.

Lower-prioritylnpeer: slow down peers sending too much gossipby SomberNight · 65d04dfb · Aug 19, 2025 · 1 fileMessage 45 · ThinModerate 55Details
Commit message · SomberNight

lnpeer: slow down peers sending too much gossip

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Moderate 55/100

This commit adds a speed limit and queue cap for Lightning network gossip messages received from peers. Before the change, a malicious or misconfigured peer could flood an Electrum node with unbounded gossip traffic, potentially consuming memory and CPU and slowing or crashing the program. The patch bounds the queue size, slows processing when the queue grows, and disconnects peers that overflow it. It also clarifies whether gossip was requested by us versus sent unsolicited by the peer.

Lower-priorityswaps: nostr: add sanity checks for repliesby SomberNight · 93e0e8a7 · Aug 19, 2025 · 1 fileMessage 45 · ThinModerate 57Details
Commit message · SomberNight

swaps: nostr: add sanity checks for replies

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Moderate 57/100

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.

Lower-prioritysubmarine_swaps: use dict instead of defaultdict for dm_repliesby ThomasV · eae6ddd7 · Aug 19, 2025 · 1 fileMessage 50 · ThinLow 40Details
Commit message · ThomasV

submarine_swaps: use dict instead of defaultdict for dm_replies

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 40/100

This commit changes how Electrum's submarine swap feature tracks expected direct-message replies from Nostr relays. Previously, accessing any unknown reply ID would automatically create a placeholder 'Future' object. Now, only the client creates a Future for a specific request it sent, and only the client resolves replies, with checks that the reply ID is known. This prevents a potential issue where a malicious or buggy relay/server could create or manipulate placeholder reply entries by sending crafted messages.

AI review queuedswaps: more robust parsingby SomberNight · 81be0554 · Aug 19, 2025 · 3 filesMessage 35 · OpaqueModerate 58Details
Commit message · SomberNight

swaps: more robust parsing

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: opaque commit messagesecond-pass: security-sensitive path
AI analysis · Moderate 58/100

This commit hardens how Electrum parses data received from external swap servers and Nostr direct messages. It adds type checks so that fields that should be dictionaries, integers, or valid Bitcoin addresses are rejected if malformed. Without these checks, a malicious or compromised swap server could send unexpected data types (for example, a string where a number is expected, or a non-address string as a lockup address) that might cause crashes, incorrect transaction construction, or potentially trick the wallet into sending funds to the wrong place. The commit does not fix a single known exploit; it is a broad defensive-hardening patch.

Lower-priorityswaps: handle timeouts in send_direct_messageby f321x · 37614e90 · Aug 19, 2025 · 1 fileMessage 68 · AdequateLow 32Details
Commit message · f321x

swaps: handle timeouts in send_direct_message

Adds logic to retry sending a direct message in
`NostrTransport.send_direct_message()` on `TimeoutError`.
Handles `TimeoutError` exception more gracefully by catching it and
returning `None`.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 32/100

This commit improves how Electrum's submarine-swap feature handles network timeouts when sending direct messages over Nostr. Previously, a timeout while publishing a swap offer or sending an encrypted request could crash or hang the process. Now the code catches the timeout, logs a warning, optionally retries, and returns None if it still fails. Callers are updated to raise a proper SwapServerError instead of hanging. This is a robustness fix rather than a fix for a clear exploitable vulnerability.

Lower-priorityfee_policy: use FEERATE_PRECISION for .. precisionby Sander van Grieken · e90534be · Aug 19, 2025 · 1 fileMessage 50 · ThinInformational 17Details
Commit message · Sander van Grieken

fee_policy: use FEERATE_PRECISION for .. precision

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 17/100

This is a tiny code cleanup in Electrum's fee-estimation logic. It replaces a hard-coded number (100) with a named constant (FEERATE_PRECISION) when rounding Bitcoin transaction fee rates. The math stays the same because the constant value is 2, so 10**2 equals 100. There is no obvious security issue here; it is a maintainability/refactoring change.

Lower-prioritylnwatcher: early return in sweep_commitment_transaction if chan.need_to_subscribe returns Falseby ThomasV · 6ffaa558 · Aug 19, 2025 · 1 fileMessage 50 · ThinLow 35Details
Commit message · ThomasV

lnwatcher: early return in sweep_commitment_transaction if chan.need_to_subscribe returns False

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 35/100

This commit adds an early exit in Electrum's Lightning watchtower code so it stops trying to sweep a closed channel if the channel reports it no longer needs monitoring. Without this guard, the watcher could continue running sweep logic on a channel that has already been settled or is otherwise inactive, potentially causing unnecessary on-chain transactions, wasted fees, or confusion in recovery flows. The change is small and defensive.