CVE-2022-44797: btcd mishandles witness size checking
Summary
CVE-2022-44797: Denial of service in message decoding in github.com/btcsuite/btcd. Affects github.com/btcsuite/btcd versions < 0.23.2. Fixed in 0.23.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package under scrutiny is btcd, a Bitcoin full node implementation written in Go. It is widely used in various Bitcoin-related products, including Lightning Labs lnd. btcd is responsible for handling Bitcoin transactions and blocks, as well as maintaining the blockchain. It provides a comprehensive set of APIs for developers to interact with the Bitcoin network. However, a vulnerability has been discovered in btcd that affects its witness size checking functionality.
Vulnerability Detail
The vulnerability in btcd before version 0.23.2, as well as in Lightning Labs lnd before version 0.15.2-beta, and other Bitcoin-related products, is related to mishandling witness size checking. This vulnerability can be exploited by an attacker to bypass certain size restrictions on Bitcoin transaction witnesses. This can lead to various security issues, including potential denial-of-service attacks, transaction malleability, and other forms of abuse. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.
How To Fix
Latest published version: v0.27.0 as of 23 Oct 2026
go get github.com/btcsuite/btcd@v0.27.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.23.2
This is the first release that contains the fix.
go get github.com/btcsuite/btcd@v0.23.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. The recommended approach is to update to the fixed versions of btcd and Lightning Labs lnd as mentioned above.
Conclusion
In conclusion, the btcd package, as well as Lightning Labs lnd and other Bitcoin-related products, are affected by a critical vulnerability that mishandles witness size checking. This vulnerability can have severe consequences, including denial-of-service attacks and transaction malleability. It is crucial to update to the latest patched versions of btcd and Lightning Labs lnd to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for github.com/btcsuite/btcd →
FAQ
btcd is a Bitcoin full node implementation written in Go. It is used in various Bitcoin-related products and provides APIs for interacting with the Bitcoin network.
Lightning Labs lnd is a Lightning Network implementation written in Go. It is built on top of btcd and provides a scalable and efficient way to conduct off-chain Bitcoin transactions.
This vulnerability can be exploited to bypass witness size restrictions on Bitcoin transactions, leading to potential security issues such as denial-of-service attacks and transaction malleability.
To fix this vulnerability, update btcd to version 0.23.2 or later, and Lightning Labs lnd to version 0.15.2-beta or later.
There is no specific workaround mentioned for this vulnerability. Updating to the fixed versions is the recommended approach.
Related vulnerabilities
Recent vulnerabilities recorded for github.com/btcsuite/btcd.