PT-2021-4101 · Unknown+1 · Bitcoin Core+1

Antoine Riard

·

Published

2021-03-18

·

Updated

2025-05-06

·

CVE-2021-31876

CVSS v3.1

6.5

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
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.

Fix

DoS

Incorrect Authorization

Weakness Enumeration

Related Identifiers

ALT-PU-2021-2753
ALT-PU-2021-2928
ALT-PU-2021-2955
BDU:2021-04686
CVE-2021-31876

Affected Products

Alt Linux
Bitcoin Core