EL
← All projectsElectrum

Electrum

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

BitcoinSoftware walletsNormal
Repository coverage

935 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.

67security candidates208second-pass queue929AI analyses
61commits · 30 days
115commits · 60 days
465commits · 180 days
931commits · 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.

65/100 average clarity
194Strong · 80–100
415Adequate · 60–79
287Thin · 40–59
39Opaque · 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.
ThomasV73272156
SomberNight35226350063
f321x37121371070
Sander van Grieken991098057
user323062
Roman Zeyde515053
Sasha Zykov414076
Aaron Fiore414068
ghost43312068
Róbert Nagy111098
Ferdinando Ametrano111096
Felix302074
Analysis record

Published AI watches

Last scanned 41 minutes ago

Informational 15 AI analysisMessage 63 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10816 from accumulator/qml_auth_log_improvement

This commit is a minor logging cleanup in the mobile/QML authentication helper. It changes the wording and placement of debug/error log messages so they reveal the function name only after safely retrieving it, and avoids logging a raw tup…

8dddae68by ghost43+4−41 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10798 from SomberNight/202608_base43

This commit fixes a performance weakness in Electrum's handling of large Bitcoin transactions encoded in 'base43'. The base43 encoding and decoding functions run in quadratic time, meaning the work grows much faster than the input size. An…

Quadratic-time base43 encode/decode can be triggered on attacker-controlled inputDenial-of-service via CPU exhaustion / UI freeze on large transaction stringsInput-length cap added as a defensive guard, not a full algorithmic fix
0e9f1a0dby Felix+25−92 files
No security note in commit
Low 41 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10799 from SomberNight/202608_android_secure_window

This update tightens a privacy feature on Electrum's Android app that prevents the screen from being captured while sensitive Bitcoin private keys or seed phrases are visible. Before, the protection could be accidentally turned off when mu…

Adds visibility-gated secureWindow bindings to protect WIF keys and seed phrasesPrevents secureWindow from being cleared when multiple sensitive dialogs are stackedTargets Android screenshot/recents-thumbnail protection surface
4622390cby accumulator+17−05 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 98 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

docs: add Coldcard Mk3 seed-entropy security notice to plugin README (#10805)

This commit only adds a documentation warning to Electrum's Coldcard plugin README. It does not change any executable code, cryptographic logic, or wallet behavior. The warning tells users that Coldcard/Coinkite disclosed a firmware bug in…

Documentation-only changeReferences an external hardware-wallet firmware advisoryNo code, cryptography, or plugin behavior modified
2c2a40b6by Róbert Nagy+4−01 file
Vendor flagged security relevance
Low 48 AI analysisMessage 81 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

qml/android: protect WIF keys from screenshots in more places

This commit tightens screen-shot protection for private Bitcoin wallet keys (WIF keys and seed phrases) in Electrum's Android/QML user interface. It also fixes a bug where one screen (AddressDetails) was leaving the 'secure window' flag pe…

Adds FLAG_SECURE-style screenshot protection to additional private-key dialogsFixes a bug where secureWindow was never unset in AddressDetailsUses QML Binding 'when' with restoreMode semantics to handle stacked secure dialogs safely
739cba5dby SomberNight+17−05 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 92 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

lnpeer: chan_reest: ctn overflow: force-close instead of disconnect

This commit fixes a bug in Electrum's Lightning Network code. Previously, if a malicious or malfunctioning peer sent a channel re-establishment message with extremely large commitment numbers (over 2^48), the local program would hit an int…

Addition of explicit overflow check on untrusted peer-supplied commitment countersReplacement of assertion-failure/disconnect behavior with force-close on misbehaviorNew test cases for ctn overflow in both next_local_ctn and oldest_unrevoked_remote_ctn
b3e441f8by SomberNight+22−32 files
No security note in commit
Informational 18 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10791 from SomberNight/202608_wallet_sign_message2

This change moves the trimming of leading/trailing spaces in message-signing fields from the user-interface code into the shared wallet code. For the graphical interfaces (Qt and QML), spaces are still stripped automatically for convenienc…

Behavior change in message signing/verification input handlingCLI now preserves whitespace, which could affect signature validity for messages that intentionally contain leading or trailing whitespaceNo memory-safety, cryptographic, or authentication flaw visible in the diff
b1aa52d7by ghost43+27−185 files
No security note in commit
Informational 19 AI analysisMessage 96 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

wallet: sign_message: strip whitespaces in GUIs, do not strip in CLI

This commit tidies up how Electrum handles extra spaces around Bitcoin addresses, messages, and signatures when signing or verifying messages. Previously, different parts of the program (desktop GUI, mobile-style GUI, command line) behaved…

Behavior normalization across GUI and CLI interfacesNo cryptographic primitive changedNo privilege boundary crossed
4c3064f5by SomberNight+27−185 files
No security note in commit
Informational 22 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: decrypt_message: nicer error msg if pubkey is unrelated

This commit improves the error handling in Electrum's message decryption feature. Previously, if a user tried to decrypt a message using a public key that did not belong to their wallet, the code could proceed and likely fail with a confus…

Input validation added for public key before cryptographic operationUser-facing exception replaces potential internal failureDefensive check prevents use of unrelated key material
92e938f4by SomberNight+5−01 file
No security note in commit
Informational 16 AI analysisMessage 83 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

qt: main_window: use TaskThread for each of sign/verify/encrypt/decrypt

This commit moves four message-crypto operations (sign, verify, encrypt, decrypt) in Electrum's Qt wallet window onto a background worker thread so they all behave the same way. It also lets the background thread surface user-facing errors…

Moved blocking wallet crypto calls off the GUI thread, reducing UI freeze / DoS surfaceRemoved local exception swallowing for encrypt_message; errors now propagate through the window's on_error handlerAdded defensive RuntimeError guard for deleted Qt widget in async callback
4a9a199fby SomberNight+28−151 file
No security note in commit
Low 29 AI analysisMessage 35 · Opaque
EL ElectrumElectrum BitcoinSoftware wallets

wallet: sign_message: force kwargs

This commit changes how Electrum's message-signing function is called so that callers must explicitly name each argument (address, message, password) rather than passing them by position. The main practical effect is to prevent accidental …

API hardening: keyword-only arguments prevent positional argument swapNo explicit security bug fix or vulnerability disclosure in commit message or diffNo changes to cryptographic logic, password handling, or message parsing
e1eb2a34by SomberNight+9−44 files
No security note in commit
Low 39 AI analysisMessage 45 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: sign_message: consolidate checks from UIs

This commit moves input-validation checks for signing, verifying, encrypting, and decrypting messages out of the user-interface code and into the shared wallet logic. It also adds type checks so that non-text inputs are rejected earlier. T…

Input validation moved from UI controllers into core wallet logicType checks added at the CLI command entry points for message-crypto operationsUserFacingException used consistently for address, wallet, script-type, and key-format errors
48893760by SomberNight+89−396 files
No security note in commit
Low 27 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: decrypt_message: consolidate checks from UIs

This commit moves input-validation and wallet-type checks for message decryption out of the user-interface and command-line layers and into the core wallet code. It also removes a faster, separate decryption path for imported wallets so al…

Input validation consolidated into a single core methodWatching-only wallet check moved from UI to wallet layerMultisig wallet unsupported-operation check moved from UI to wallet layer
9a0cc0d6by SomberNight+25−173 files
No security note in commit
Informational 15 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: refactor: add encrypt_message method, consolidated from UIs

This commit is a simple code cleanup: it moves the message-encryption logic from two separate places (the command-line tool and the Qt graphical interface) into a single shared method on the wallet class. The actual encryption behavior is …

No change to cryptographic primitives or parametersNo change to trust boundaries or input sourcesPure refactor consolidating duplicate code
5e9c8df0by SomberNight+26−183 files
No security note in commit
Informational 13 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: refactor: add verify_message method, consolidated from UIs

This commit is a routine code cleanup: it moves message-signature verification out of three user-interface files into a single shared helper method in the wallet module. There is no security-relevant behavior change visible in the diff. Th…

No security-relevant functional changeRefactoring only: code deduplicationException handling broadened safely (ValueError covers binascii.Error and unicode errors)
ff5bbb04by SomberNight+26−304 files
No security note in commit
Informational 15 AI analysisMessage 60 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

qt: main_window: add type hints to sign/verify, encrypt/decrypt

This commit only adds Python type hints and renames some function parameters for clarity in the Electrum desktop wallet's sign/verify and encrypt/decrypt message dialogs. It does not change what the code actually does, how it processes use…

0906fc20by SomberNight+45−181 file
No security note in commit
Informational 18 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

coldcard: fix get_soft_device_id() discarding its return value

This is a tiny one-line bug fix in Electrum's Coldcard hardware wallet plugin. A helper method that is supposed to fetch a software-based device identifier was calling the parent implementation but accidentally throwing away the result ins…

Missing return value causes method to always return NoneAffects hardware wallet device identification onlyNo change to signing, encryption, or authentication code
d7500508by Felipe Micaroni Lalli+1−11 file
No security note in commit
Informational 19 AI analysisMessage 96 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

qml: strip whitespace from message before signing, as in qt gui

This commit fixes a minor consistency bug in Electrum's newer QML (mobile-style) user interface. When signing a message, the app now removes accidental spaces at the start or end of the message and address, just like the older desktop Qt i…

Behavioral inconsistency between GUI implementations could cause user confusion or failed verificationNo cryptographic weakness introduced; change is input normalizationNo memory-unsafe code, no privilege changes, no network changes
72507328by Ferdinando Ametrano+3−01 file
No security note in commit
Low 48 AI analysisMessage 85 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

config: don't save "hidden wallet" paths in CURRENT_WALLET cv

This commit fixes a privacy leak in the Electrum wallet app. Previously, if a user opened a 'hidden wallet' (one whose filename starts with a dot, like a secret file), Electrum would remember it as the last-used wallet and could reopen it …

Privacy leak: hidden wallet filename persisted in config and could be auto-reopenedInformation disclosure: hidden wallet path exposed in recently-opened listBehavioral fix: setter silently drops sensitive value rather than persisting it
c43cf8e4by SomberNight+14−23 files
No security note in commit
Low 28 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

lnrouter: liquidity hints: add extra penalty if amt near cannot_send

This commit tweaks how Electrum's Lightning Network payment routing avoids channels where a previous payment attempt already failed. Previously, the router would treat a channel almost at its known failure limit almost the same as a channe…

Routing/liquidity-hint logic changed to penalize amounts close to a known cannot_send thresholdAdds defensive assertions on num_inflight_htlcs type and rangeSelf-described by author as a 'completely naive bandaid' / heuristic improvement
ee75ea31by SomberNight+12−21 file
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-priorityswaps: cleanup data after swap gets failedby f321x · c623cca6 · Aug 21, 2025 · 2 filesMessage 68 · AdequateLow 42Details
Commit message · f321x

swaps: cleanup data after swap gets failed

Removes the persisted payment info from lnworker once a swap got failed.
Stops persisting the OnionRoutingFailure as it is sufficient to delete
the payment info to fail potential incoming htlcs.
Deletes stored swap leftovers in lnworker and SwapManager

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

This commit cleans up leftover data after a failed Lightning submarine swap in the Electrum wallet. Previously, failed swaps could leave stale payment information, routing-failure records, and internal index entries behind. The patch removes those leftovers so they cannot accidentally be reused or misinterpreted later. It is a defensive hardening change rather than a fix for a known active attack.

Lower-prioritytrivial follow-up: add more type-hintsby SomberNight · e5930dd5 · Aug 21, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · SomberNight

trivial follow-up: add more type-hints

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

This commit only adds Python type-hints and renames a loop variable from 'v' to 'sweep_info' for clarity. It does not change any program behavior, logic, or security properties.

Lower-priorityreverse swaps: in the CLI, replace 'server_mining_fee' with 'prepayment', which corresponds to the trusted part of the lightning payment.by ThomasV · 864932c7 · Aug 21, 2025 · 6 filesMessage 73 · AdequateLow 28Details
Commit message · ThomasV

reverse swaps: in the CLI, replace 'server_mining_fee' with
'prepayment', which corresponds to the trusted part of the
lightning payment.

We use 2*sm.mining_fee, where 'mining_fee' is the flat part of
the server fee. However, future protocol should probably allow
to set a value that does not depend on 'mining_fee'.
(note that LND uses a hardcoded amount).

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 28/100

This commit renames and doubles a fee parameter used when doing reverse submarine swaps (a way to move funds from Lightning back to on-chain Bitcoin) in the Electrum wallet. The old name suggested it was just the swap provider's mining fee; the new name, 'prepayment', reflects that the user must pay this amount upfront over Lightning and trust the provider to return it if the swap fails. The change is mostly a terminology and parameter refactor, but it also adjusts the safety check so the allowed prepayment equals twice the mining fee rather than twice the prepayment. There is no direct evidence in the commit that this fixes an active security vulnerability.

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.