Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

babylonlabs-io/babylon-toolkit
main @ d441b8c
50
Fixes
0
CVEs
CRITICAL
Peak severity
35.9%
Coverage
Highlights
Auth Bypass: 15 prior fixes. Scrutinize any change in this area.
packages/babylon-ts-sdk/src/tbv/core/primitives/psbt/payout.ts: most-fixed (4 issues). Treat as high-risk during review.
43 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Transaction Integrity: Multiple fixes target the pre-peg-in broadcast path, where indexer-provided transaction data could be substituted for a malicious one, leading to fund loss. The critical fix validates indexer tx against local copy before signing.
Auth Bypass: Vault provider authentication has multiple bypasses: unauthenticated methods, weak CWT verification, and unbounded proof lifetime. These could allow an attacker to impersonate a vault provider or depositor.
Signature Validation: PSBT signature extraction has been hardened multiple times to reject malformed or substituted signatures, indicating a persistent weakness in verifying wallet-returned signatures against the original transaction.