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

Merge rust-bitcoin/rust-bitcoin#6851: units: Remove amount parsing limit

Public commit record

What the developer wrote

Authored by Andrew Poelstra

96/100 · Strong
Merge rust-bitcoin/rust-bitcoin#6851: units: Remove amount parsing limit

76a18b1c104e9f1fe2a839364b7b015910241ee4 units: Remove amount parsing limit (Tobin C. Harding)

Pull request description:

The limit is somewhat arbitrary. It was introduced as a DoS protection. This sort of attack vector is not really our concern.

Fix: #6828


ACKs for top commit:
apoelstra:
ACK 76a18b1c104e9f1fe2a839364b7b015910241ee4; successfully ran local tests
Kixunil:
ACK 76a18b1c104e9f1fe2a839364b7b015910241ee4


Tree-SHA512: 5ba260435f7018b1eef2ecf3fc6a66543d7514c3d7e65542e834522537fef4f3801f1868c70311f0c4bc508c2e8f8f91fe16a92bea918d2fc468f6e525933dfe
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit removes a 50-character limit on strings that can be parsed as Bitcoin amounts. The limit was originally added as a basic defense against denial-of-service (DoS) attacks using very long inputs. The maintainers decided the limit was arbitrary and that DoS protection is not this library's responsibility. The change means slightly longer strings can now be parsed, but the actual numeric range checks remain in place, so extremely large values still produce an out-of-range error.

Recommended action

Review whether downstream callers rely on rust-bitcoin to enforce input length limits. If the library is used to parse untrusted input directly, consider adding an application-level length cap or timeout, since the library no longer provides one. No immediate patch is required unless a concrete DoS vector is demonstrated.

Security signals we found

01

Removal of an explicit input-length DoS guard

02

Maintainer statement that the removed limit was intended as DoS protection

03

No replacement length limit or mitigation introduced in the diff

04

Numeric out-of-range checks remain, limiting accepted monetary values

Risk score

Why this scored 25/100

Our methodology →
Potential impact 3/30
Exploitability 4/25
Stealth signal 2/15
Affected reach 5/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.