CVE-2022-39389: CWE-20: Improper Input Validation in lightningnetwork lnd
Lightning Network Daemon (lnd) is an implementation of a lightning bitcoin overlay network node. All 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. This 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. A patch is available in `lnd` version 0.15.4. Users are advised to upgrade. Users unable to upgrade may 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.
AI Analysis
Technical Summary
CVE-2022-39389 is a medium-severity vulnerability affecting the Lightning Network Daemon (lnd), an implementation of a Bitcoin Lightning Network node. The vulnerability arises from improper input validation (CWE-20) in the block parsing logic of lnd versions prior to v0.15.4-beta. Specifically, when a node processes certain malformed or crafted blocks, it can enter a degraded operational state. In this degraded state, the node continues to perform some functions such as making payments, forwarding HTLCs (Hashed Time Locked Contracts), and closing channels. However, it loses the ability to open new channels and fails to detect on-chain transaction events. This failure can lead to critical issues such as loss of funds, particularly if a CSV (CheckSequenceVerify) expiry is rechecked during an attempted breach or if a CLTV (CheckLockTimeVerify) delta expires, causing funds locked in HTLCs to be forgotten or unrecoverable. The root cause is improper input validation during block parsing, which disrupts normal node operation and state tracking. A patch addressing this vulnerability is included in lnd version 0.15.4. For users unable to upgrade immediately, a recommended workaround is to use the `lncli updatechanpolicy` RPC call to increase the CLTV value to a very high amount or increase fee policies. This effectively prevents other nodes from routing payments through the vulnerable node, thereby avoiding the presence of pending HTLCs and mitigating the risk of fund loss. No known exploits are reported in the wild at this time, but the vulnerability poses a significant risk to the integrity and availability of Lightning Network nodes running affected versions.
Potential Impact
For European organizations utilizing the Lightning Network for Bitcoin transactions, this vulnerability can result in partial service degradation and potential financial losses. The inability to open new channels and detect on-chain events compromises the node's operational integrity, potentially leading to locked or lost funds in HTLCs. This can disrupt payment routing and liquidity management, critical for businesses relying on fast, low-cost Bitcoin transactions. Financial institutions, cryptocurrency exchanges, and payment service providers in Europe that integrate Lightning Network nodes are particularly at risk. The degraded state may also reduce trust in Lightning Network-based services, impacting customer confidence and operational continuity. Additionally, since the vulnerability affects the detection of on-chain events, it could delay or prevent timely responses to blockchain state changes, increasing exposure to financial risk. While no active exploitation is known, the potential for targeted attacks or accidental triggering remains, especially in high-value or high-volume environments.
Mitigation Recommendations
The primary mitigation is to upgrade all lnd nodes to version 0.15.4 or later, which contains the patch fixing the improper input validation bug. For organizations unable to upgrade immediately, it is recommended to use the `lncli updatechanpolicy` RPC call to increase the CLTV value significantly or raise fee policies. This prevents other nodes from routing payments through the vulnerable node, eliminating pending HTLCs and reducing risk. Additionally, organizations should implement continuous monitoring of node health and blockchain event detection to quickly identify any degraded states. Regular backups of channel states and on-chain data are advised to facilitate recovery in case of fund loss. Network segmentation and limiting node exposure to untrusted peers can reduce attack surface. Finally, organizations should stay informed about updates from the Lightning Network development community and apply security patches promptly.
Affected Countries
Germany, United Kingdom, France, Netherlands, Switzerland, Sweden
CVE-2022-39389: CWE-20: Improper Input Validation in lightningnetwork lnd
Description
Lightning Network Daemon (lnd) is an implementation of a lightning bitcoin overlay network node. All 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. This 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. A patch is available in `lnd` version 0.15.4. Users are advised to upgrade. Users unable to upgrade may 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.
AI-Powered Analysis
Technical Analysis
CVE-2022-39389 is a medium-severity vulnerability affecting the Lightning Network Daemon (lnd), an implementation of a Bitcoin Lightning Network node. The vulnerability arises from improper input validation (CWE-20) in the block parsing logic of lnd versions prior to v0.15.4-beta. Specifically, when a node processes certain malformed or crafted blocks, it can enter a degraded operational state. In this degraded state, the node continues to perform some functions such as making payments, forwarding HTLCs (Hashed Time Locked Contracts), and closing channels. However, it loses the ability to open new channels and fails to detect on-chain transaction events. This failure can lead to critical issues such as loss of funds, particularly if a CSV (CheckSequenceVerify) expiry is rechecked during an attempted breach or if a CLTV (CheckLockTimeVerify) delta expires, causing funds locked in HTLCs to be forgotten or unrecoverable. The root cause is improper input validation during block parsing, which disrupts normal node operation and state tracking. A patch addressing this vulnerability is included in lnd version 0.15.4. For users unable to upgrade immediately, a recommended workaround is to use the `lncli updatechanpolicy` RPC call to increase the CLTV value to a very high amount or increase fee policies. This effectively prevents other nodes from routing payments through the vulnerable node, thereby avoiding the presence of pending HTLCs and mitigating the risk of fund loss. No known exploits are reported in the wild at this time, but the vulnerability poses a significant risk to the integrity and availability of Lightning Network nodes running affected versions.
Potential Impact
For European organizations utilizing the Lightning Network for Bitcoin transactions, this vulnerability can result in partial service degradation and potential financial losses. The inability to open new channels and detect on-chain events compromises the node's operational integrity, potentially leading to locked or lost funds in HTLCs. This can disrupt payment routing and liquidity management, critical for businesses relying on fast, low-cost Bitcoin transactions. Financial institutions, cryptocurrency exchanges, and payment service providers in Europe that integrate Lightning Network nodes are particularly at risk. The degraded state may also reduce trust in Lightning Network-based services, impacting customer confidence and operational continuity. Additionally, since the vulnerability affects the detection of on-chain events, it could delay or prevent timely responses to blockchain state changes, increasing exposure to financial risk. While no active exploitation is known, the potential for targeted attacks or accidental triggering remains, especially in high-value or high-volume environments.
Mitigation Recommendations
The primary mitigation is to upgrade all lnd nodes to version 0.15.4 or later, which contains the patch fixing the improper input validation bug. For organizations unable to upgrade immediately, it is recommended to use the `lncli updatechanpolicy` RPC call to increase the CLTV value significantly or raise fee policies. This prevents other nodes from routing payments through the vulnerable node, eliminating pending HTLCs and reducing risk. Additionally, organizations should implement continuous monitoring of node health and blockchain event detection to quickly identify any degraded states. Regular backups of channel states and on-chain data are advised to facilitate recovery in case of fund loss. Network segmentation and limiting node exposure to untrusted peers can reduce attack surface. Finally, organizations should stay informed about updates from the Lightning Network development community and apply security patches promptly.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-09-02T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf6c8e
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 9:23:25 PM
Last updated: 7/28/2025, 10:10:05 PM
Views: 13
Related Threats
CVE-2025-55195: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in denoland std
HighCVE-2025-55192: CWE-94: Improper Control of Generation of Code ('Code Injection') in JurajNyiri HomeAssistant-Tapo-Control
HighCVE-2025-20220: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Cisco Cisco Firepower Management Center
MediumCVE-2025-9043: CWE-428 Unquoted Search Path or Element in Seagate Toolkit
MediumCVE-2025-8969: SQL Injection in itsourcecode Online Tour and Travel Management System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.