Unknown · Bitcoin Core · CVE-2021-31876
**Name of the Vulnerable Software and Affected Versions**
Bitcoin Core versions 0.12.0 through 0.21.1
**Description**
The issue is related to the incorrect replacement of a child transaction in the Bitcoin Core implementation, specifically in the PreChecks functionality. This can be exploited by a remote attacker to compromise data integrity and cause a denial of service. The vulnerability arises from the improper implementation of the replacement policy as specified in BIP125, making it easier for attackers to trigger a loss of funds or launch a denial of service attack against downstream projects, such as Lightning network nodes. The problem occurs when an unconfirmed child transaction with `nSequence` = `0xff ff ff ff`, spending an unconfirmed parent with `nSequence` <= `0xff ff ff fd`, is not properly replaced due to the lack of enforcement of inherited signaling by the child transaction in the PreChecks implementation.
**Recommendations**
For Bitcoin Core versions 0.12.0 through 0.21.1, consider updating to a version that properly implements the replacement policy specified in BIP125 to prevent the exploitation of this issue. As a temporary workaround, restrict the use of unconfirmed child transactions with `nSequence` = `0xff ff ff ff` to minimize the risk of exploitation. Avoid using the `nSequence` parameter in unconfirmed transactions until the issue is resolved.