Summary
Electrum before 4.7.2 contains a spending limit bypass vulnerability in the Nostr Wallet Connect plugin that allows malicious NWC clients to exceed daily_limit_sat by exploiting non-atomic budget checks and millisatoshi truncation. Attackers can send concurrent pay_invoice requests that pass budget_allows_spend() before add_to_budget() runs, or repeatedly pay msat amounts that are floored to whole satoshis, to drain funds beyond the limit.
Remediation
References
- Patchhttps://github.com/spesmilo/electrum/commit/5222374046d2a92da371d46c79ce0e61e7e2a42d
- Patchhttps://github.com/spesmilo/electrum/commit/3956bff0684f6060fbe8c823c3ee921928cdcaa5
- Advisoryhttps://github.com/spesmilo/electrum/security/advisories/GHSA-q7m2-785w-r585
- Advisoryhttps://www.vulncheck.com/advisories/electrum-before-4.7.2-nostr-wallet-connect-plugin-daily-spending-limit-bypass