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

cli: payto: fix feerate parsing

Public commit record

What the developer wrote

Authored by f321x

76/100 · Adequate
cli: payto: fix feerate parsing

Feerate is passed to `Commands._get_fee_policy()` as str which then
tried to multiply the string by 1000. Now it first casts the string to
`Decimal` and multiplies the decimal.

Fixes https://github.com/spesmilo/electrum/issues/10315
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's command-line 'payto' command where a transaction fee rate typed in as text (a string) was being incorrectly handled. The old code tried to multiply the text string by 1000, which in Python repeats the string instead of doing math, producing a wildly wrong fee policy. The fix converts the string to a number (Decimal) first, then multiplies. This could cause users who set a custom fee rate via the CLI to get an absurdly large or malformed fee value, potentially overpaying fees or having transaction creation fail.

Recommended action

Users relying on the Electrum CLI for payto/paytomany/sweep with custom --feerate should upgrade to the fixed version. Review any transactions created with string feerate values in prior versions for unexpectedly high fees. No immediate remote exploit, but the bug can cause financial loss via excessive fees.

Security signals we found

01

Incorrect string multiplication leading to malformed fee policy

02

CLI argument type confusion between str and numeric

03

Potential for unexpectedly high transaction fees or transaction creation failure

04

Regression test added for feerate string parsing

Risk score

Why this scored 45/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 7/15
Confidence 8/10
Evidence quality 4/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.