CVE-2026-117603 in Electrum
Summary
by MITRE • 10/27/2026
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.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 10/27/2026
The vulnerability identified in Electrum versions prior to 4.7.2 represents a critical flaw within its Nostr Wallet Connect plugin architecture, specifically targeting the implementation of spending limits designed to protect user funds from unauthorized or excessive transactions. This security issue stems from two distinct but related technical failures: non-atomic budget checks and integer truncation errors involving millisatoshi values. The core function responsible for enforcing these limits, known as budget_allows_spend(), operates by checking if the requested amount is within the remaining daily allowance before proceeding with the transaction. However, this check is not performed atomically alongside the subsequent update to the spending ledger via add_to_budget(). This lack of atomicity creates a race condition window where multiple concurrent requests can be processed simultaneously. In such scenarios, each request may individually pass the budget_allows_spend() validation because they all see the same pre-existing balance before any single transaction has updated the total spent amount through add_to_budget(). Consequently, an attacker leveraging this concurrency flaw can execute parallel pay_invoice requests that collectively exceed the configured daily_limit_sat, effectively bypassing the intended spending cap.
Beyond the race condition aspect, a secondary vulnerability exists in how fractional satoshi amounts are handled during payment processing. The Lightning Network protocol operates with millisatoshi precision, allowing for payments smaller than one whole satoshi. However, Electrum's internal accounting and budget tracking mechanisms appear to truncate or floor these values when converting them back to whole satoshis for storage or limit calculation purposes. This truncation creates a discrepancy between the actual amount deducted from the user's balance on the Lightning Network and the amount recorded in Electrum’s local spending ledger. By repeatedly initiating payments with amounts that result in negligible millisatoshi deductions which are then floored to zero or minimal values in the budget tracker, an attacker can drain funds far beyond what the daily_limit_sat would normally permit. The system believes very little has been spent because of the truncation error, while significant value is actually transferred out of the wallet through the underlying protocol layer.
From a classification perspective, this vulnerability aligns with CWE-362, which describes concurrent execution using shared resources without proper synchronization, specifically manifesting as a race condition in the budget checking logic. Additionally, the exploitation technique involving integer truncation and loss of precision falls under CWE-190, an integer overflow or wraparound issue that leads to unexpected behavior due to incorrect arithmetic operations on numeric data types. In terms of offensive security frameworks such as MITRE ATT&CK for Cloud Infrastructure, this vulnerability facilitates unauthorized access and privilege escalation by allowing malicious clients to bypass configured resource limits, which can be categorized under techniques related to abuse of cloud services or misconfigured permissions that lead to financial loss. The impact is severe, resulting in direct financial theft where users lose funds beyond their intended daily spending thresholds due to software logic errors rather than external network exploits.
Mitigation for this vulnerability requires an immediate upgrade to Electrum version 4.7.2 or later, which addresses both the atomicity of budget checks and the handling of millisatoshi values in the Nostr Wallet Connect plugin. For organizations still running older versions, it is imperative to disable the NWC plugin entirely until an update can be applied, as there are no effective workarounds for race conditions inherent in the code structure other than preventing concurrent access or disabling the feature altogether. Users should also monitor their transaction history closely after any future updates to ensure that spending limits are being enforced correctly and that no residual truncation issues remain. Security auditors reviewing similar implementations of wallet plugins should prioritize atomic operations when modifying shared state variables like budgets and ensure that all numeric conversions preserve precision throughout the entire payment lifecycle, from request initiation through ledger update.