CVE-2022-39389: Github.com/lightningnetwork/lnd Denial of Service Vulnerability
HIGHCVE-2022-39389 is a HIGH (CVSS 8.2) denial of service vulnerability (CWE-20: Improper Input Validation) affecting Github.com/lightningnetwork/lnd libraries in the Go ecosystem. The issue involves witness block parsing dos vulnerability. Remediation is available by upgrading affected packages to version 0.15.4-beta.
CVE-2022-39389 at a Glance
Security Impact
CVSS: 8.2
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:N/I:L/A:H).
How to Fix CVE-2022-39389
To remediate this vulnerability, upgrade all affected Github.com/lightningnetwork/lnd 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/lightningnetwork/lnd to 0.15.4-beta
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/lightningnetwork/lnd
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-39389, inspect your project dependencies for Github.com/lightningnetwork/lnd:
inspect dependencies for github.com/lightningnetwork/lnd
Analyze the terminal output to locate any version of Github.com/lightningnetwork/lnd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.4-beta), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/lightningnetwork/lnd, 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-39389 Affected Github.com/lightningnetwork/lnd Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/lightningnetwork/lnd
|
Go |
< 0.15.4-beta
|
0.15.4-beta
|
References
Frequently Asked Questions
What is CVE-2022-39389?
Which Github.com/lightningnetwork/lnd versions are affected?
What version fixes CVE-2022-39389?
Is github.com/lightningnetwork/lnd affected?
What is the CVSS score of CVE-2022-39389?
What CWE is associated with CVE-2022-39389?
How can I check Go dependencies for CVE-2022-39389?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc82-w9v8-83pr",
"modified" : "2022-11-18T18:50:01Z",
"published" : "2022-11-18T18:50:01Z",
"aliases" : [ "CVE-2022-39389" ],
"summary" : "Witness Block Parsing DoS Vulnerability ",
"details" : "### Impact\n\nAll lnd nodes before version `v0.15.4` are vulnerable to a block parsing bug that can cause a node to enter a degraded state once encountered. In this degraded state, nodes can continue to make payments and forward HTLCs, and close out channels. Opening channels is prohibited, and also on chain transaction events will be undetected. \n\nThis can cause loss of funds if a CSV expiry is researched during a breach attempt or a CLTV delta expires forgetting the funds in the HTLC. \n\n### Patches\n\nA patch is available starting with lnd `v0.15.4`. \n\n### Workarounds\n\nNodes can use the `lncli updatechanpolicy` RPC call to increase their CLTV value to a very high amount or increase their fee policies. This will prevent nodes from routing through your node, meaning that no pending HTLCs can be present. \n\n### References\n\nhttps://github.com/lightningnetwork/lnd/issues/7096\n\nhttps://github.com/lightningnetwork/lnd/releases/tag/v0.15.4-beta\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/lightningnetwork/lnd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.15.4-beta"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lightningnetwork/lnd/security/advisories/GHSA-hc82-w9v8-83pr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39389"
}, {
"type" : "WEB",
"url" : "https://github.com/lightningnetwork/lnd/issues/7096"
}, {
"type" : "WEB",
"url" : "https://github.com/lightningnetwork/lnd/pull/7098"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lightningnetwork/lnd"
}, {
"type" : "WEB",
"url" : "https://github.com/lightningnetwork/lnd/releases/tag/v0.15.4-beta"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-18T18:50:01Z",
"nvd_published_at" : "2022-11-17T22:15:00Z"
}
}