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

psbt: validate pubkeys in MuSig2 pubnonce/partial sig deserialization

Public commit record

What the developer wrote

Authored by tboy1337

100/100 · Strong
psbt: validate pubkeys in MuSig2 pubnonce/partial sig deserialization

Add validation for pubkeys in MuSig2 pubnonce and partial signature deserialization to prevent crashes with invalid curve points.

- Validate aggregate and participant pubkeys in PSBT MuSig2 fields

- Add comprehensive test coverage for invalid pubkey rejection

- Ensure proper error handling during PSBT deserialization
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a bug in Bitcoin Core's handling of partially signed Bitcoin transactions (PSBTs) that use the MuSig2 multi-signature scheme. Previously, when reading certain MuSig2 fields, the code accepted invalid public keys (points that are not valid on the Bitcoin elliptic curve). The fix adds checks that reject these invalid keys during deserialization, turning potential crashes or undefined behavior into clean error messages. The commit also adds test cases with deliberately bad keys to confirm they are rejected.

Recommended action

Apply the patch. Ensure all nodes or services that process untrusted PSBTs are upgraded, since malformed MuSig2 fields could previously reach code paths that assume valid public keys. Review any other MuSig2 deserialization sites for similar missing validity checks.

Security signals we found

01

Input validation gap in deserialization of cryptographic public keys

02

Potential crash or undefined behavior from invalid secp256k1 curve points

03

MuSig2 PSBT fields previously deserialized without full validity checks

04

Patch adds explicit CPubKey::IsFullyValid() checks and throws on failure

05

New negative test vectors added for invalid aggregate and participant pubkeys

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.