# CVE-2021-31876: Bitcoin Core 0.12.0 through 0.21.1 does not properly implement the replacement policy specified in BIP125, which makes it easier for attack…

- Severity: Medium 6.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.40%, higher than 73% of CVEs (2026-12-01)
- Published: 2021-05-13T21:03:38.000Z
- Modified: 2026-06-17T03:52:23.680Z
- Weaknesses: CWE-863
- Assigned by: mitre

## Description

Bitcoin Core 0.12.0 through 0.21.1 does not properly implement the replacement policy specified in BIP125, which makes it easier for attackers to trigger a loss of funds, or a denial of service attack against downstream projects such as Lightning network nodes. An unconfirmed child transaction with nSequence = 0xff_ff_ff_ff, spending an unconfirmed parent with nSequence <= 0xff_ff_ff_fd, should be replaceable because there is inherited signaling by the child transaction. However, the actual PreChecks implementation does not enforce this. Instead, mempool rejects the replacement attempt of the unconfirmed child transaction.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- bitcoin bitcoin: from 0.12.0 up to 0.21.1

## Every score

- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`
- NVD: CVSS:2.0 6.4 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:P`

## References

- <https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures#CVE-2021-31876> (third-party-advisory)
- <https://bitcoinops.org/en/topics/replace-by-fee/> (vendor-advisory)
- <https://github.com/bitcoin/bitcoin> (third-party-advisory)
- <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-May/018893.html> (mailing-list, third-party-advisory)
- <https://bitcoinops.org/en/newsletters/2021/05/12/> (vendor-advisory)

## Sources

- CVE List: [CVE-2021-31876](https://www.cve.org/CVERecord?id=CVE-2021-31876), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-31876](https://nvd.nist.gov/vuln/detail/CVE-2021-31876), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-31876 · Whole record: https://cve.day/CVE-2021-31876.json · Rebuilt by cve.day 2026-11-25T22:58:01.337Z
