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

silentpayments: return 0 instead of `ARG_CHECK`ing for empty inputs/outputs

Public commit record

What the developer wrote

Authored by Sebastian Falbesoner

78/100 · Adequate
silentpayments: return 0 instead of `ARG_CHECK`ing for empty inputs/outputs

secp256k1_silentpayments_recipient_prevouts_summary_create and
secp256k1_silentpayments_recipient_scan_outputs treated a transaction
without eligible inputs or without taproot outputs as an illegal
argument, which calls abort() by default. The API documentation says
they return 0 if the transaction is not a Silent Payments transaction,
and callers scanning a block would have to special-case such
transactions.

With no public keys, the sum in prevouts_summary_create is the point at
infinity, so the existing check already returns 0. scan_outputs returns
0 after argument validation and before the scan key is loaded.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-25O0CNV8.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This change fixes two functions in the Silent Payments module so they return a normal failure value (0) instead of triggering an internal abort when given a transaction with no eligible inputs or no taproot outputs. Previously, callers scanning many transactions could have their program crash if they passed such a transaction to these functions. The patch aligns behavior with the documented API and prevents denial-of-service crashes in normal scanning workflows.

Recommended action

Upgrade to a release containing this commit if you use the Silent Payments scanning API with untrusted transaction data. Until then, callers should pre-filter transactions to ensure at least one eligible input and one taproot output before invoking these functions, or install a non-aborting illegal callback.

Security signals we found

01

ARG_CHECK default behavior is abort(), turning an expected non-Silent-Payments transaction into a potential DoS crash

02

API contract promised return 0 for non-Silent-Payments transactions, but implementation violated it for empty input/output edge cases

03

Callers scanning blocks would need special-case handling before the fix to avoid crashes

04

No cryptographic weakness introduced; change is purely defensive API hardening

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.