BT
← All projectsbtcsuite

btcd

Alternative full-node Bitcoin implementation written in Go.

BitcoinNode implementationsNormal
Repository coverage

198 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

43security candidates20second-pass queue37AI analyses
31commits · 30 days
65commits · 60 days
177commits · 180 days
198commits · 365 days
Backfill bands
Aug 5 → Feb 621 seen1 candidatesComplete
Feb 6 → Jun 6112 seen7 candidatesComplete
Jun 6 → Jul 634 seen13 candidatesComplete
Jul 6 → Aug 530 seen7 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

68/100 average clarity
61Strong · 80–100
75Adequate · 60–79
57Thin · 40–59
5Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Lrifton92433186
Erick Cestari811177
Boris Nagaev461514060
Olaoluwa Osuntokun56119073
Oliver Gugger1344047
MPins332079
Drake Thomsen221091
Eric Grill311086
Julio Cesar111045
Jacob Schuler110088
Kim111045
Calvin Kim4300072
Analysis record

Published AI watches

Last scanned 42 minutes ago

Informational 12 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcclient: harden DisableAuth transport tests

This commit only changes tests and clarifies a public comment. It does not alter the actual authentication behavior of the btcd RPC client. The code already only suppresses the internally generated Basic auth header when DisableAuth is tru…

No functional code change; only tests and commentsComment clarification that DisableAuth only suppresses generated Basic auth, not caller-provided Authorization headersTests now cover WebSocket handshake, cookie bypass, and caller-provided headers
52d2fadeby Olaoluwa Osuntokun+186−1272 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcclient: add tests for DisableAuth header behavior

This commit only adds new unit tests for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that an existing option called DisableAuth correctl…

9b849c17by Drake Thomsen+109−01 file
No security note in commit
Low 48 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

v2transport: restore responder handshake progress

This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for …

BIP324 handshake deadlock avoidanceCPU admission lease split to prevent resource exhaustion / lock holding across network I/OResponder now sends key material before full initiator key is received
09717871by Olaoluwa Osuntokun+231−862 files
No security note in commit
Low 41 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

psbt: decode base64 packets incrementally

This commit changes how btcd reads base64-encoded PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the entire base64 input into memory before decoding, and it wrongly applied the Bitcoin P2P wire message size lim…

Removes an incorrect size bound that caused base64 PSBT parsing to reject valid large packets (denial-of-service / interoperability issue)Switches from full in-memory base64 decode to incremental streaming, reducing peak memory for large base64 PSBTsRetains strict base64 alphabet checks and rejects trailing data after the PSBT packet
e333817dby Olaoluwa Osuntokun+129−602 files
No security note in commit
Moderate 60 AI analysisMessage 68 · Adequate
BT btcsuitebtcd BitcoinNode implementations

psbt: reject nil taproot pointer fields

This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying t…

nil-pointer dereference / panic prevention in Taproot PSBT finalizernil-pointer dereference / panic prevention in PSBT serializationinput validation added before sort.Slice and pointer dereference
1ead5ba3by Olaoluwa Osuntokun+171−165 files
Vendor flagged security relevance
Moderate 64 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

psbt: avoid blocking reads and unbounded allocations in NewFromRawBytes

This commit fixes two problems in the way btcd reads Partially Signed Bitcoin Transactions (PSBTs). First, the parser could hang forever when reading from a network connection or pipe because it tried to read one extra byte to check for le…

Denial-of-service via blocking read on open stream (potential infinite hang)Denial-of-service via unbounded memory allocation on base64 input before validationStrict parsing hardening for PSBT base64 decoding
2ddf73f3by Olaoluwa Osuntokun+87−283 files
Vendor flagged security relevance
Moderate 58 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: reject trailing final witness data

This change tightens how a Bitcoin PSBT library extracts final witness data when turning a partially-signed transaction into a finished transaction. Previously, extra bytes after the declared witness stack were silently ignored. Now the li…

strict parsing of serialized witness datarejection of trailing bytes in PSBT final script witnesspotential malleability / ambiguity reduction in PSBT extraction
468853e4by Boris Nagaev+13−91 file
No security note in commit
Low 38 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test final witness trailing data rejection

This commit adds a new test to the btcd PSBT (Partially Signed Bitcoin Transaction) library. The test checks that when extracting a final Bitcoin transaction from a PSBT, the library rejects a final witness value that has extra trailing by…

Strict parsing of final witness data to reject malformed/trailing bytesPrevents creation of transactions with non-standard witness encodingTest-only commit implies behavior enforcement elsewhere in the codebase
c87168ebby Boris Nagaev+26−01 file
No security note in commit
Moderate 64 AI analysisMessage 88 · Strong
BT btcsuitebtcd BitcoinNode implementations

btcec/schnorr: reject s >= group order in ParseSignature

This commit fixes a bug in how btcd parses Schnorr (BIP-340) digital signatures. The code was supposed to reject signatures whose 's' number was larger than the allowed group order, but instead it silently wrapped the value around (modulo …

BIP-340 signature parsing non-compliancesilent modulo reduction of s componentsignature malleability risk from non-canonical encodings
83d081a5by Lrifton92+42−12 files
Vendor flagged security relevance
Low 25 AI analysisMessage 80 · Strong
BT btcsuitebtcd BitcoinNode implementations

psbt: compact witness utxo scripts after parsing

This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compa…

memory retention reductionno input validation changeno cryptographic change
b0ab66feby Boris Nagaev+10−12 files
No security note in commit
Informational 12 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test trailing packet data rejection

This commit only adds a new test case. It does not change any production code. The test checks that the PSBT parser rejects files that have extra bytes after a valid PSBT packet. Because no code behavior is changed, this commit by itself d…

Test-only commitNo production code changesTests input-validation behavior (trailing data rejection)
0a1300ddby Boris Nagaev+16−01 file
No security note in commit
Low 46 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: decode base64 packets strictly

This change tightens how base64-encoded PSBT (Partially Signed Bitcoin Transaction) data is decoded. Previously, the decoder could silently ignore extra whitespace or unexpected characters in the base64 stream. Now it rejects anything that…

Strict input validation added for base64 decodingRejection of whitespace/newlines inside base64 payloadUse of strict base64 decoder to enforce RFC4648 padding rules
70e8ceb9by Boris Nagaev+28−51 file
No security note in commit
Informational 12 AI analysisMessage 60 · Adequate
BT btcsuitebtcd BitcoinNode implementations

musig2: test partial signature short reads

This commit only adds a new unit test that checks whether the MuSig2 partial signature decoder correctly rejects empty or too-short inputs. It does not change any production code, so by itself it cannot introduce or fix a security vulnerab…

4a7a9feaby Boris Nagaev+21−01 file
No security note in commit
Informational 12 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test witness utxo txout strict parsing

This commit only adds new test code for the PSBT (Partially Signed Bitcoin Transaction) package. It does not change any production code. The tests verify that WitnessUtxo fields are parsed strictly and correctly, including rejecting extra …

Strict parsing tests for WitnessUtxo transaction outputsRejection of trailing data after serialized txOutCorrect handling of multi-byte CompactSize script lengths
40ad9117by Boris Nagaev+79−01 file
No security note in commit
Informational 12 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: add strict tx value regression test

This commit only adds a new test file. It does not change any production code. The test checks that the PSBT parser rejects transaction fields that have extra trailing bytes. Because no actual parser logic is modified, this commit by itsel…

Regression test added for strict parsing of transaction-valued PSBT fieldsNo production code changes
0293b6e0by Boris Nagaev+117−01 file
No security note in commit
Low 28 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test strict base64 packet decoding

This commit only adds new test code to check that the PSBT (Partially Signed Bitcoin Transaction) parser rejects malformed base64 input such as whitespace, bad padding, or extra bytes. It does not change the actual parser logic. The tests …

strict base64 decoding validationPSBT packet format hardeningrejection of non-canonical base64 input
0a33cceaby Boris Nagaev+56−01 file
No security note in commit
Low 49 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: reject trailing packet data

This change makes the PSBT (Partially Signed Bitcoin Transaction) parser reject files or data that have extra bytes after the end of a valid PSBT. Previously, extra trailing data was silently ignored, which could let an attacker hide malic…

Parser no longer ignores trailing bytesCould prevent smuggling of extra data inside PSBT containersCould prevent canonicalization attacks where different byte sequences parse to the same structure
d1de2bc3by Boris Nagaev+4−01 file
No security note in commit
Low 48 AI analysisMessage 50 · Thin
BT btcsuitebtcd BitcoinNode implementations

musig2: return partial signature read errors

This commit fixes a bug in the MuSig2 multi-signature code where reading a partial signature from an input stream could fail silently. Previously, if the stream ended early or had a read error, the function would return 'no error' as if th…

Silent failure in cryptographic decode pathPartial signature scalar left uninitialized on read errorMuSig2 signing correctness dependency
63bc064dby Boris Nagaev+1−11 file
No security note in commit
Low 46 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: parse witness utxo txouts strictly

This commit tightens how a Bitcoin-related library reads transaction outputs stored inside PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the output value and script in a loose, hand-rolled way that ignored ext…

Strict canonical parsing of serialized transaction outputsRemoval of hand-rolled length handling that ignored script length byteAddition of full-consumption check on parsed witness UTXO data
b4c5cf16by Boris Nagaev+11−91 file
No security note in commit
Low 36 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: add reader exhaustion helper

This commit adds a new helper function to the PSBT (Partially Signed Bitcoin Transaction) package that checks whether a data reader still has leftover bytes after parsing. Leftover bytes could mean a malformed or malicious PSBT file was no…

New validation helper for trailing/leftover data in a binary parserLocated in PSBT parsing utilities, an area where malformed input handling mattersNo caller added in this commit, so defensive effect is not yet active
da5792a8by Boris Nagaev+25−01 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidatebuild: pin tagged submodules and remove local replacementsby Olaoluwa Osuntokun · 3d3b5e8a · Jul 22, 2026 · 2 filesMessage 85 · StrongTriage 18Details
Commit message · Olaoluwa Osuntokun

build: pin tagged submodules and remove local replacements

In this commit, we pin btcutil and wire to their freshly tagged v2.0.1
releases. We also remove the root module's remaining local replace
directives now that all three in-tree modules have published versions.

This makes local builds and downstream module consumers resolve the same
btcutil, v2transport, and wire code. The regenerated checksums cover each
published module.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
access control
Security candidaterpcclient: add tests for DisableAuth header behaviorby Drake Thomsen · 9b849c17 · Jul 22, 2026 · 1 fileMessage 96 · StrongInformational 15Details
Commit message · Drake Thomsen

rpcclient: add tests for DisableAuth header behavior

Add table-driven tests that verify:
- Authorization header is omitted when DisableAuth is true
- Authorization header is present when DisableAuth is false
- Default (zero value) behavior includes Authorization header

Suggested by @TechLateef in #2514.

96/100 · StrongMessage clarity
✓ 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
Why it was queued
access controlauthentication path
AI analysis · Informational 15/100

This commit only adds new unit tests for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that an existing option called DisableAuth correctly controls whether the RPC client sends an Authorization header.

Security candidaterpcclient: wrap DisableAuth tests to 80 columnsby Olaoluwa Osuntokun · fe84a0e1 · Jul 22, 2026 · 1 fileMessage 78 · AdequateTriage 15Details
Commit message · Olaoluwa Osuntokun

rpcclient: wrap DisableAuth tests to 80 columns

In this commit, we wrap the new DisableAuth regression tests to the
btcd 80-column formatting convention. We also split the nested handler
setup and assertions into logical stanzas so the tests match the
surrounding style.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidenceauthentication path
Security candidaterpcclient: harden DisableAuth transport testsby Olaoluwa Osuntokun · 52d2fade · Jul 22, 2026 · 2 filesMessage 83 · StrongInformational 12Details
Commit message · Olaoluwa Osuntokun

rpcclient: harden DisableAuth transport tests

In this commit, we make the DisableAuth tests observe successful
requests instead of inferring them from an empty header. This closes a
false-positive path where credential lookup could fail before the
request reached the server.

We also cover the WebSocket handshake, cookie bypass, and
caller-provided headers across enabled and disabled auth. The public
comment now makes clear that DisableAuth only suppresses
rpcclient-generated Basic auth.

83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
defensive validationcredential or privilege stateauthentication path
AI analysis · Informational 12/100

This commit only changes tests and clarifies a public comment. It does not alter the actual authentication behavior of the btcd RPC client. The code already only suppresses the internally generated Basic auth header when DisableAuth is true; the commit makes the tests check that real requests succeed and confirms caller-provided Authorization headers are still sent. There is no security fix here.

Security candidaterpcclient: make HTTP Basic Auth optional via DisableAuthby Drake Thomsen · 5d22b395 · Jul 22, 2026 · 1 fileMessage 86 · StrongTriage 18Details
Commit message · Drake Thomsen

rpcclient: make HTTP Basic Auth optional via DisableAuth

Add a DisableAuth field to ConnConfig that, when set to true, skips
setting the Authorization header on RPC requests.

This enables connecting to third-party RPC providers (e.g. Alchemy,
GetBlock) that authenticate via API key in the URL path and reject
requests containing an Authorization header with 401 errors.

Previously, getAuth() unconditionally set BasicAuth or attempted
cookie auth, leaving no way to disable authentication entirely.

Fixes #2505

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
access control
Security candidatev2transport: restore responder handshake progressby Olaoluwa Osuntokun · 09717871 · Jul 21, 2026 · 2 filesMessage 78 · AdequateLow 48Details
Commit message · Olaoluwa Osuntokun

v2transport: restore responder handshake progress

In this commit, we send the responder key as soon as the initiator diverges
from the v1 prefix. This avoids the BIP324 deadlock where both sides can wait
for the other to write before the initiator has sent its complete 64-byte
key.

We split key generation and key agreement into separate admission leases,
and release each lease before the intervening network I/O. The regression
test stops after the first mismatch, requires the responder to make
progress, then completes key agreement and verifies the resulting packet
ciphers interoperate.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key material
AI analysis · Low 48/100

This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for each other. The change makes the responder send its own key earlier, after the first byte that differs from the old v1 protocol, and splits expensive cryptographic work into two separately rate-limited phases so the CPU lock is not held across network reads or writes. It is a protocol correctness/DoS-resilience fix rather than a direct theft-of-funds bug.

Security candidatepsbt: decode base64 packets incrementallyby Olaoluwa Osuntokun · e333817d · Jul 21, 2026 · 2 filesMessage 78 · AdequateLow 41Details
Commit message · Olaoluwa Osuntokun

psbt: decode base64 packets incrementally

In this commit, we decode base64 PSBT packets as a stream instead of
reading the full encoded input into memory first.

The previous aggregate bound reused wire.MaxMessagePayload, even though
BIP-174 doesn't bind PSBT packet size to the P2P message limit. This made
the base64 path reject packets that the raw path accepted. We now feed
decoded bytes through the same per-field parser used for raw packets,
while retaining strict base64 and trailing-data checks.

We also add a regression test with nine individually valid 4,000,000-byte
unknown values to pin raw and base64 parsing to the same behavior.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundaryaccess controlfuzzing or regression evidencesigning or wallet path
AI analysis · Low 41/100

This commit changes how btcd reads base64-encoded PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the entire base64 input into memory before decoding, and it wrongly applied the Bitcoin P2P wire message size limit to PSBT packets. That caused the base64 parser to reject large but otherwise valid PSBTs that the raw binary parser would accept. The new code decodes base64 incrementally as a stream, removes the wire-size bound for base64 PSBTs, and still rejects whitespace, non-canonical characters, and trailing data. A regression test confirms that nine 4 MB unknown fields are accepted via both raw and base64 paths.

Security candidatepsbt: reject nil taproot pointer fieldsby Olaoluwa Osuntokun · 1ead5ba3 · Jul 20, 2026 · 5 filesMessage 68 · AdequateModerate 60Details
Commit message · Olaoluwa Osuntokun

psbt: reject nil taproot pointer fields

In this commit, we extend taproot PSBT serialization and finalization to reject nil script spend signatures, leaf scripts, and BIP32 derivations before any sort or dereference. We return wrapped ErrInvalidPsbtFormat errors so callers can identify malformed packet state without parsing strings.

We also make FindLeafScript reject nil inputs and leaf entries. This keeps both the direct finalizer and MaybeFinalize paths from panicking on malformed in-memory packets.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key materialsigning boundarysigning or wallet path
AI analysis · Moderate 60/100

This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying to sort, read, or finalize the transaction. The patch now rejects these malformed entries early with a proper error instead of crashing the program. It is a defensive hardening fix rather than a direct theft-of-funds vulnerability, but a crash in a wallet or node could still be disruptive.

Security candidatepeer: close late connections after disconnectby Boris Nagaev · 617ebe2b · Jul 18, 2026 · 2 filesMessage 78 · AdequateTriage 18Details
Commit message · Boris Nagaev

peer: close late connections after disconnect

In this commit, we serialize connection association with peer
disconnection. Previously, Disconnect could run before
AssociateConnection, close quit without a socket, and leave a later
connection published with no remaining path that could close it.

We now close connections handed to a peer that is already disconnecting,
and publish the connected flag only after the socket and connection time
are initialized. The tests pin both call orderings and race the
transitions to verify the socket closes exactly once.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
access control
Security candidatepsbt: avoid blocking reads and unbounded allocations in NewFromRawBytesby Olaoluwa Osuntokun · 2ddf73f3 · Jul 14, 2026 · 3 filesMessage 73 · AdequateModerate 64Details
Commit message · Olaoluwa Osuntokun

psbt: avoid blocking reads and unbounded allocations in NewFromRawBytes

In this commit, we address two issues with the strict parsing recently
added to NewFromRawBytes.

First, the trailing data check probed the caller supplied reader with a
blocking one byte read. A reader without a Len method (net.Conn,
io.Pipe) that stays open after delivering a complete packet would hang
the parser forever. We now only enforce the check when the reader can
report its remaining length without an additional read, which covers
in-memory readers along with the decoded base64 path. Plain streams are
left positioned directly after the packet, and the reader contract is
now documented on NewFromRawBytes.

Second, the base64 path read the entire input into memory before any
validation ran, so a very large input could force an arbitrarily large
allocation before the first validity check. We now bound the read to
wire.MaxMessagePayload expanded by the base64 encoding overhead.

Along the way, we simplify assertFullyConsumed down to the bytes.Reader
case that all remaining callers use.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 64/100

This commit fixes two problems in the way btcd reads Partially Signed Bitcoin Transactions (PSBTs). First, the parser could hang forever when reading from a network connection or pipe because it tried to read one extra byte to check for leftover data. Second, when given a base64-encoded PSBT, it would read the entire input into memory before checking whether it was valid, so a maliciously huge input could force the program to allocate enormous amounts of RAM. The patch limits how much base64 data is read and only checks for trailing bytes when the reader can safely report its remaining length.

Security candidatepsbt: test final witness trailing data rejectionby Boris Nagaev · c87168eb · Jul 8, 2026 · 1 fileMessage 55 · ThinLow 38Details
Commit message · Boris Nagaev

psbt: test final witness trailing data rejection

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 38/100

This commit adds a new test to the btcd PSBT (Partially Signed Bitcoin Transaction) library. The test checks that when extracting a final Bitcoin transaction from a PSBT, the library rejects a final witness value that has extra trailing bytes after a valid witness stack. Previously, this trailing data might have been silently accepted, which could lead to non-standard or invalid transactions being produced. The commit itself only adds a test, not a fix, so it implies a prior or pending code change that enforces this rejection.

Security candidatepsbt: reject trailing final witness databy Boris Nagaev · 468853e4 · Jul 8, 2026 · 1 fileMessage 45 · ThinModerate 58Details
Commit message · Boris Nagaev

psbt: reject trailing final witness data

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 58/100

This change tightens how a Bitcoin PSBT library extracts final witness data when turning a partially-signed transaction into a finished transaction. Previously, extra bytes after the declared witness stack were silently ignored. Now the library rejects such packets. That prevents malformed or crafted PSBTs from sneaking hidden data into the witness field, which could in some scenarios alter transaction behavior or be used to confuse downstream tools.

Security candidatebtcec/schnorr: reject s >= group order in ParseSignatureby Lrifton92 · 83d081a5 · Jul 7, 2026 · 2 filesMessage 88 · StrongModerate 64Details
Commit message · Lrifton92

btcec/schnorr: reject s >= group order in ParseSignature

ParseSignature documents that it enforces the BIP-340 requirement that
the s component lie in the range [0, n-1], and the r component is
already checked against the field prime accordingly. However, the
overflow return value of s.SetByteSlice was discarded, so an s value
greater than or equal to the group order n was silently reduced modulo
n and accepted instead of being rejected.

This restores parity with the reference implementation in
decred/dcrd/dcrec/secp256k1/schnorr (of which this code is a port) and
with Bitcoin Core, both of which reject such encodings at parse time.
The ErrSigSTooBig error kind is already defined in the imported schnorr
package but was previously unused here.

A regression test covering the s == n and s > n encodings is added; it
fails before this change (the signatures are silently accepted) and
passes after.

Signed-off-by: Lrifton92 <Lrifton92@users.noreply.github.com>

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarymemory safetyfuzzing or regression evidencesigning or wallet path
AI analysis · Moderate 64/100

This commit fixes a bug in how btcd parses Schnorr (BIP-340) digital signatures. The code was supposed to reject signatures whose 's' number was larger than the allowed group order, but instead it silently wrapped the value around (modulo reduction) and accepted it. This could let invalid signatures pass validation, potentially allowing signature malleability or unexpected behavior in systems relying on strict BIP-340 compliance. The fix checks the overflow flag and now rejects such signatures with the already-defined ErrSigSTooBig error.

Security candidatepsbt: compact witness utxo scripts after parsingby Boris Nagaev · b0ab66fe · Jul 2, 2026 · 2 filesMessage 80 · StrongLow 25Details
Commit message · Boris Nagaev

psbt: compact witness utxo scripts after parsing

wire.ReadTxOut returns PkScript slices backed by its internal 4 MiB
script slab. PSBT inputs keep parsed WitnessUtxo values, so small
scripts could otherwise keep the whole slab live.

Copy the script before storing the TxOut and assert the parsed witness
script has compact capacity.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 25/100

This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compact memory slice so the large block can be released. It does not fix a bug that lets an attacker steal funds, crash the program, or bypass validation.

Security candidatemusig2: test partial signature short readsby Boris Nagaev · 4a7a9fea · Jun 26, 2026 · 1 fileMessage 60 · AdequateInformational 12Details
Commit message · Boris Nagaev

musig2: test partial signature short reads

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit only adds a new unit test that checks whether the MuSig2 partial signature decoder correctly rejects empty or too-short inputs. It does not change any production code, so by itself it cannot introduce or fix a security vulnerability. The test may be a regression test for an already-fixed bug, or simply defensive coverage, but the diff provides no evidence of a prior security issue.

Security candidatepsbt: decode base64 packets strictlyby Boris Nagaev · 70e8ceb9 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 46Details
Commit message · Boris Nagaev

psbt: decode base64 packets strictly

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 46/100

This change tightens how base64-encoded PSBT (Partially Signed Bitcoin Transaction) data is decoded. Previously, the decoder could silently ignore extra whitespace or unexpected characters in the base64 stream. Now it rejects anything that isn't strict, clean base64. This is a defensive hardening fix: it prevents malformed or cleverly padded base64 inputs from being accepted, which could in theory be used to sneak invalid data past validation or cause inconsistent parsing between different PSBT implementations.

Security candidatemusig2: return partial signature read errorsby Boris Nagaev · 63bc064d · Jun 26, 2026 · 1 fileMessage 50 · ThinLow 48Details
Commit message · Boris Nagaev

musig2: return partial signature read errors

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 48/100

This commit fixes a bug in the MuSig2 multi-signature code where reading a partial signature from an input stream could fail silently. Previously, if the stream ended early or had a read error, the function would return 'no error' as if the signature had been decoded successfully. Now it correctly returns the actual read error. This could have allowed malformed or truncated signatures to be treated as valid, potentially leading to incorrect multi-signature behavior.

Security candidatepsbt: add strict tx value regression testby Boris Nagaev · 0293b6e0 · Jun 26, 2026 · 1 fileMessage 55 · ThinInformational 12Details
Commit message · Boris Nagaev

psbt: add strict tx value regression test

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundaryfuzzing or regression evidencesigning or wallet path
AI analysis · Informational 12/100

This commit only adds a new test file. It does not change any production code. The test checks that the PSBT parser rejects transaction fields that have extra trailing bytes. Because no actual parser logic is modified, this commit by itself does not fix or introduce a security issue.

Security candidatepsbt: parse witness utxo txouts strictlyby Boris Nagaev · b4c5cf16 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 46Details
Commit message · Boris Nagaev

psbt: parse witness utxo txouts strictly

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 46/100

This commit tightens how a Bitcoin-related library reads transaction outputs stored inside PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the output value and script in a loose, hand-rolled way that ignored extra trailing bytes and misinterpreted the script length byte. The change now uses the project's standard parser and insists every byte is consumed. That removes a class of parsing inconsistencies that could, in theory, let a malformed PSBT slip past validation or be interpreted differently by different software.

Security candidatepsbt: test trailing packet data rejectionby Boris Nagaev · 0a1300dd · Jun 26, 2026 · 1 fileMessage 55 · ThinInformational 12Details
Commit message · Boris Nagaev

psbt: test trailing packet data rejection

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit only adds a new test case. It does not change any production code. The test checks that the PSBT parser rejects files that have extra bytes after a valid PSBT packet. Because no code behavior is changed, this commit by itself does not fix or introduce a security issue.

Security candidatepsbt: test witness utxo txout strict parsingby Boris Nagaev · 40ad9117 · Jun 26, 2026 · 1 fileMessage 55 · ThinInformational 12Details
Commit message · Boris Nagaev

psbt: test witness utxo txout strict parsing

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit only adds new test code for the PSBT (Partially Signed Bitcoin Transaction) package. It does not change any production code. The tests verify that WitnessUtxo fields are parsed strictly and correctly, including rejecting extra trailing bytes and handling multi-byte script lengths. There is no direct security fix here, but the tests appear to be added in support of an existing or upcoming strict-parsing behavior.

Security candidatepsbt: reject trailing packet databy Boris Nagaev · d1de2bc3 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 49Details
Commit message · Boris Nagaev

psbt: reject trailing packet data

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 49/100

This change makes the PSBT (Partially Signed Bitcoin Transaction) parser reject files or data that have extra bytes after the end of a valid PSBT. Previously, extra trailing data was silently ignored, which could let an attacker hide malicious content inside what looks like a legitimate PSBT, or cause two different byte strings to be treated as the same PSBT. The patch is only four lines and adds a check that the input is fully consumed after parsing.

Security candidatepsbt: add reader exhaustion helperby Boris Nagaev · da5792a8 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 36Details
Commit message · Boris Nagaev

psbt: add reader exhaustion helper

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 36/100

This commit adds a new helper function to the PSBT (Partially Signed Bitcoin Transaction) package that checks whether a data reader still has leftover bytes after parsing. Leftover bytes could mean a malformed or malicious PSBT file was not fully processed. The helper lets the library reject such inputs. However, the commit only adds the helper; it does not yet wire it into any actual parsing path, so by itself it does not fix any vulnerability.

Security candidatepsbt: reject trailing data in tx valuesby Boris Nagaev · f945179f · Jun 26, 2026 · 3 filesMessage 45 · ThinModerate 51Details
Commit message · Boris Nagaev

psbt: reject trailing data in tx values

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 51/100

This change tightens how PSBT (Partially Signed Bitcoin Transaction) files are read. Previously, transaction-valued fields could contain extra bytes after the valid transaction data; now the parser rejects such trailing data. This prevents a malformed or crafted PSBT from sneaking in unused bytes that might confuse downstream tools or alter how the PSBT is interpreted.

Security candidatepsbt: test strict base64 packet decodingby Boris Nagaev · 0a33ccea · Jun 26, 2026 · 1 fileMessage 55 · ThinLow 28Details
Commit message · Boris Nagaev

psbt: test strict base64 packet decoding

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 28/100

This commit only adds new test code to check that the PSBT (Partially Signed Bitcoin Transaction) parser rejects malformed base64 input such as whitespace, bad padding, or extra bytes. It does not change the actual parser logic. The tests confirm existing strict behavior, so this is a defensive hardening test rather than a fix for a known active vulnerability.