{"id":"GO-2024-2818","summary":"Consensus failures in github.com/btcsuite/btcd","details":"Incorrect implementation of the consensus rules outlined in BIP 68 and BIP 112 making btcd susceptible to consensus failures. Specifically, it uses the transaction version as a signed integer when it is supposed to be treated as unsigned. There can be a chain split and loss of funds.","aliases":["CVE-2024-34478","GHSA-3jgf-r68h-xfqm"],"modified":"2024-05-20T16:03:47Z","published":"2024-05-08T17:51:16Z","database_specific":{"review_status":"REVIEWED","url":"https://pkg.go.dev/vuln/GO-2024-2818"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-34478"},{"type":"WEB","url":"https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455"},{"type":"WEB","url":"https://github.com/btcsuite/btcd/blob/e4c88c3a3ecb1813529bf3dddc7a865bd418a6b8/blockchain/chain.go#L383C1-L392C3"},{"type":"WEB","url":"https://github.com/btcsuite/btcd/blob/e4c88c3a3ecb1813529bf3dddc7a865bd418a6b8/txscript/opcode.go#L1172C1-L1178C3"},{"type":"FIX","url":"https://github.com/btcsuite/btcd/pull/1981"}],"affected":[{"package":{"name":"github.com/btcsuite/btcd","ecosystem":"Go","purl":"pkg:golang/github.com/btcsuite/btcd"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.24.0"}]}],"ecosystem_specific":{"imports":[{"symbols":["BlockChain.CalcSequenceLock","BlockChain.CheckConnectBlockTemplate","BlockChain.ProcessBlock","BlockChain.calcSequenceLock","ValidateTransactionScripts","txValidator.Validate"],"path":"github.com/btcsuite/btcd/blockchain"},{"symbols":["Engine.Execute","Engine.Step","opcodeCheckSequenceVerify"],"path":"github.com/btcsuite/btcd/txscript"}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2024-2818.json"}}],"schema_version":"1.7.3","credits":[{"name":"Niklas Gögge"}]}