CVE-2024-34478: Github.com/btcsuite/btcd Btcd Susceptible To Consensus Failures Vulnerability
MODERATECVE-2024-34478 is a MODERATE btcd susceptible to consensus failures vulnerability (CWE-436: Interpretation Conflict) affecting Github.com/btcsuite/btcd libraries in the Go ecosystem. The issue involves btcd susceptible to consensus failures. Remediation is available by upgrading affected packages to version 0.24.0.
CVE-2024-34478 at a Glance
How to Fix CVE-2024-34478
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.24.0
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-2024-34478, 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.24.0), 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 CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. 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-2024-34478 Affected Github.com/btcsuite/btcd Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/btcsuite/btcd
|
Go |
< 0.24.0
|
0.24.0
|
References
Frequently Asked Questions
What is CVE-2024-34478?
Which Github.com/btcsuite/btcd versions are affected?
What version fixes CVE-2024-34478?
Is github.com/btcsuite/btcd affected?
What CWE is associated with CVE-2024-34478?
How can I check Go dependencies for CVE-2024-34478?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3jgf-r68h-xfqm",
"modified" : "2024-08-07T19:55:49Z",
"published" : "2024-05-05T03:30:47Z",
"aliases" : [ "CVE-2024-34478" ],
"summary" : "btcd susceptible to consensus failures",
"details" : "btcd before 0.24.0 does not correctly implement the consensus rules outlined in BIP 68 and BIP 112, making it 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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/btcsuite/btcd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.24.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34478"
}, {
"type" : "WEB",
"url" : "https://github.com/btcsuite/btcd/pull/1981"
}, {
"type" : "WEB",
"url" : "https://github.com/btcsuite/btcd/commit/253b688c68b89eca7eb75d4d5443dbdbc928db3c"
}, {
"type" : "WEB",
"url" : "https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/btcsuite/btcd"
}, {
"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" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2818"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-436" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-06T14:28:56Z",
"nvd_published_at" : "2024-05-05T01:15:06Z"
}
}