BREACHSPIDER
CVE databaseVendorsIntelFeaturesDevelopersDocsPricingSign inStart free trial

CVE-2021-31876 in Bitcoin

Medium 6.5

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_...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.16.5
EPSS1.4%
EPSS percentile73th
FixUnknown

Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact.

Affected products and versions

VendorProductAffected versions
Bitcoin Bitcoin ≥ 0.12.0, ≤ 0.21.1

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Vendor PSIRT: [email protected]

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2021-31876
BreachSpider IDBS-2021-GLOBAL-280273-M
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Published2021-05-13
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-863: Incorrect Authorization

Software performs an authorization check incorrectly, allowing access beyond intended privileges.

Analysis AI-written, not human-reviewed

Bitcoin Core versions 0.12.0 through 0.21.1 have a vulnerability in the implementation of the replacement policy specified in BIP125, which can lead to loss of funds or denial of service attacks on downstream projects like Lightning network nodes.

An attacker can exploit this vulnerability by creating an unconfirmed child transaction with nSequence = 0xff_ff_ff_ff that spends an unconfirmed parent transaction with nSequence <= 0xff_ff_ff_fd. This can result in the parent transaction being replaced, leading to potential loss of funds or denial of service.

Questions

What is CVE-2021-31876?

Bitcoin Core versions 0.12.0 through 0.21.1 have a vulnerability in the implementation of the replacement policy specified in BIP125, which can lead to loss of funds or denial of service attacks on downstream projects like Lightning network nodes.

What is the CVSS score for CVE-2021-31876?

CVE-2021-31876 has CVSS 6.5 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L. EPSS: 1.4%.

Is CVE-2021-31876 actively exploited?

No confirmed active exploitation of CVE-2021-31876 as of 2026-09-25.

How do I remediate CVE-2021-31876?

Priority: HIGH. PSIRT: [email protected]

What systems are affected by CVE-2021-31876?

CVE-2021-31876 affects Bitcoin Bitcoin.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Bitcoin","product":"Bitcoin","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.