CVE-2022-44797: btcd mishandles witness size checking

github.com/btcsuite/btcd Updated 02 Oct 2025

Summary

08/11/2022
Yes i
Critical
9.8

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback