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

api/payment_request: serialize ETH value as little endian

Public commit record

What the developer wrote

Authored by Marko Bencun

73/100 · Adequate
api/payment_request: serialize ETH value as little endian

SLIP-24:

> amount (coinType-dependent length): fixed-length encoding of the amount of the requested output in little-endian byte order, expressed in the smallest unit of the given cryptocurrency (satoshis, wei, etc.). The length of the encoding is equal to the length used natively for the given coinType to encode amounts, e.g. 8 bytes for Bitcoin-like coins and 32 bytes for EVM assets.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a serialization bug in the BitBox02 firmware's payment request validation for Ethereum transactions. Previously, Ethereum payment amounts were encoded as big-endian (most-significant-byte-first), but the SLIP-24 standard requires them to be little-endian (least-significant-byte-first). Because the device signs the payment request using one byte order but the validation code used another, a payment request could be generated that the device would accept even if the actual transaction amount did not match what the user saw on screen. The fix changes the code to serialize Ethereum amounts as 32-byte little-endian values, matching the standard and preventing amount mismatches.

Recommended action

Treat this as a security-relevant bug fix. Verify that all payment-request signing and validation paths for EVM assets now use consistent little-endian 32-byte amount encoding. Review related UTXO-coin and other asset implementations for similar endianness mismatches. If prior firmware versions with the big-endian behavior were released, consider whether a security advisory or recall of affected payment-request workflows is warranted.

Security signals we found

01

Payment-request amount encoding mismatch between signing and validation paths

02

Non-compliance with SLIP-24 little-endian requirement for EVM asset amounts

03

Potential acceptance of a payment request whose on-chain amount differs from user-approved amount

04

Fix is localized to Ethereum payment-request validation and test expectations

Risk score

Why this scored 60/100

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