Always-Incorrect Control Flow Implementation Affecting github.com/btcsuite/btcd/txscript package, versions >=0.20.0-beta <0.24.2
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-GOLANG-GITHUBCOMBTCSUITEBTCDTXSCRIPT-8184988
- published 13 Oct 2024
- disclosed 11 Oct 2024
- credit Niklas Gögge, Antoine Poinsot
Introduced: 11 Oct 2024
CVE-2024-38365 Open this link in a new tabHow to fix?
Upgrade github.com/btcsuite/btcd/txscript
to version 0.24.2 or higher.
Overview
Affected versions of this package are vulnerable to Always-Incorrect Control Flow Implementation through the removeOpcodeByData
function, which incorrectly removes any data push from the executed script that contains the signature, unlike the intended behavior of only removing exact matches.
Exploiting this vulnerability is possible by using public key recovery to create a script containing a signature check and an extraneous data push, which, when committed to in a P2SH output and spent by a standard transaction, would be considered valid by compliant nodes but invalid by affected ones.