AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
High 75 Monero

Merge pull request #1480 from cypherstack/verify-inputs

Public commit record

What the developer wrote

Authored by Julian

68/100 · Adequate
Merge pull request #1480 from cypherstack/verify-inputs

verify legacy inputs
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds cryptographic verification to stop a malicious or compromised ElectrumX server from lying to the wallet. Before this change, the wallet trusted the server for transaction sizes, UTXO values, and unconfirmed transaction details. A dishonest server could trick the user into overpaying fees, accepting fake payments, or trying to spend coins that do not exist. The patch makes the wallet fetch raw transaction bytes, check that they hash to the claimed transaction ID, verify that the wallet itself signed the inputs, and, for older P2PKH coins, confirm the spent amounts against the parent transaction. If verification fails, the wallet drops or blocks the suspicious transaction or coin.

Recommended action

Reviewers should confirm that all ElectrumX-based wallets call verifyPendingSpend for unconfirmed outgoing transactions and authenticatedP2pkhOutput for P2PKH UTXOs, not just Litecoin, Namecoin, and Paynym. Check that network errors are not swallowed as UnauthenticatedTransaction, that the MWEB flag handling is correct, and that the new replacement fee logic does not overpay or loop indefinitely. Run the new tests and consider adding integration tests against a malicious ElectrumX mock.

Security signals we found

01

Server-supplied transaction sizes are now verified against locally checked raw bytes before RBF/fee bumping

02

Server-supplied UTXO values for P2PKH outputs are cross-checked with the authenticated parent transaction

03

Unverified pending spends are dropped from local history instead of being trusted

04

Signature validation requires SIGHASH_ALL and that every input is wallet-owned

05

Raw transactions are cached only after sufficient confirmations to avoid caching replaceable/unconfirmed forgeries

06

New BIP-125 replacement fee helper ensures the replacement pays at least old fee plus incremental relay fee for its own size

Risk score

Why this scored 75/100

Our methodology →
Potential impact 22/30
Exploitability 15/25
Stealth signal 12/15
Affected reach 14/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.