CVE-2022-44797: Github.com/btcsuite/btcd Btcd Mishandles Witness Size Checking Vulnerability
CRITICALCVE-2022-44797 is a CRITICAL (CVSS 9.8) btcd mishandles witness size checking vulnerability (General Security Weakness) affecting Github.com/btcsuite/btcd libraries in the Go ecosystem. The issue involves btcd mishandles witness size checking. Remediation is available by upgrading affected packages to version 0.23.2, 0.15.2-beta.
CVE-2022-44797 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-44797
To remediate this vulnerability, upgrade all affected Github.com/btcsuite/btcd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/btcsuite/btcd to 0.23.2
Upgrade github.com/lightningnetwork/lnd to 0.15.2-beta
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/btcsuite/btcd
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-44797, inspect your project dependencies for Github.com/btcsuite/btcd:
inspect dependencies for github.com/btcsuite/btcd
Analyze the terminal output to locate any version of Github.com/btcsuite/btcd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Github.com/btcsuite/btcd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-44797 Affected Github.com/btcsuite/btcd Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/btcsuite/btcd
|
Go |
< 0.23.2
|
0.23.2
|
|
github.com/lightningnetwork/lnd
|
Go |
< 0.15.2-beta
|
0.15.2-beta
|
References
Frequently Asked Questions
What is CVE-2022-44797?
Which Github.com/btcsuite/btcd versions are affected?
What version fixes CVE-2022-44797?
Is github.com/btcsuite/btcd affected?
Is github.com/lightningnetwork/lnd affected?
What is the CVSS score of CVE-2022-44797?
What CWE is associated with CVE-2022-44797?
How can I check Go dependencies for CVE-2022-44797?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2chg-86hq-7w38",
"modified" : "2024-05-20T21:36:55Z",
"published" : "2022-11-07T12:00:34Z",
"aliases" : [ "CVE-2022-44797" ],
"summary" : "btcd mishandles witness size checking",
"details" : "btcd before 0.23.2, as used in Lightning Labs lnd before 0.15.2-beta and other Bitcoin-related products, mishandles witness size checking.\n\n### Specific Go Packages Affected\ngithub.com/btcsuite/btcd/wire",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/btcsuite/btcd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.23.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/lightningnetwork/lnd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.15.2-beta"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-44797"
}, {
"type" : "WEB",
"url" : "https://github.com/lightningnetwork/lnd/issues/7002"
}, {
"type" : "WEB",
"url" : "https://github.com/btcsuite/btcd/pull/1896"
}, {
"type" : "WEB",
"url" : "https://github.com/btcsuite/btcd/commit/7fdaf6958781df46fffee4bc8bee38801c066da8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/btcsuite/btcd"
}, {
"type" : "WEB",
"url" : "https://github.com/btcsuite/btcd/releases/tag/v0.23.2"
}, {
"type" : "WEB",
"url" : "https://github.com/lightningnetwork/lnd/releases/tag/v0.15.2-beta"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-1098"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-07T16:15:55Z",
"nvd_published_at" : "2022-11-07T04:15:00Z"
}
}