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

fix(core): Avoid raising IndexError during cash address decoding

Public commit record

What the developer wrote

Authored by Fabien

100/100 · Strong
fix(core): Avoid raising IndexError during cash address decoding

It is possible to craft an invalid cash address that would raise an IndexError and return a confusing error message.

Fill the gap and add tests to ensure a proper ValueError is returned.

Fixes #7749.

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in how Trezor hardware wallets decode Bitcoin Cash-style 'cashaddr' addresses. Previously, a malformed address could cause the device to hit an internal 'IndexError' and show a confusing message. The fix ensures the address is properly validated and returns a clear 'invalid address' error instead. There is no direct evidence in the commit that this could be used to steal funds, but it improves robustness against bad or maliciously crafted addresses.

Recommended action

Treat as a defensive hardening fix. Review whether the previous IndexError could be triggered from untrusted user input paths (e.g., transaction signing UI, QR scans, or USB messages) and ensure the fix is included in the next firmware release. No emergency response is indicated by the diff alone.

Security signals we found

01

Input validation hardening for address parsing

02

Exception handling improvement to prevent confusing internal errors

03

Adds explicit length and checksum checks to cashaddr decoder

04

Fixes reported issue #7749

Risk score

Why this scored 39/100

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