Executive brief
slpjs is a JavaScript library used to validate and process Simple Ledger Protocol (SLP) token transactions on the Bitcoin Cash blockchain. A validation flaw in MINT transaction handling could allow poorly-implemented wallets to incorrectly accept transactions with invalid batons, potentially leading to irreversible loss of a user's token minting authority and the destruction of their tokens.
Technical details
The vulnerability is an improper input validation (CWE-697) issue in MINT transaction validation logic. The root cause is a false-negative validation check that fails to properly validate the baton field in MINT transactions, allowing invalid batons to pass validation. An attacker (or a poorly-implemented wallet) could craft a MINT transaction with an invalid baton that would be incorrectly validated as legitimate by vulnerable versions of slpjs. This could result in spending of affected tokens and destruction of the user's minting baton. The vulnerability requires no authentication or user interaction beyond wallet usage and is network-reachable to any user of the library. The fix has been patched in slpjs version 0.27.2.
Affected products
- Simple Ledger slpjs before 0.27.2
Timeline
- 2020-05-12: disclosed
- 2020-05-12: patched: Fixed in version 0.27.2