CVE-2021-31876
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in. Limited direct impact.
- Exploit odds
- 1.6% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 1.6% in the next 30 days (EPSS).
- Severity: 6.5 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 1.6% · EPSS, next 30 days
- Weakness
- CWE-863 · Incorrect authorization
- Record status
- Modified
Affected
- Bitcoin ≤ 0.21.1
Attack profile CVSS 3.1 · 6.5
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- Low
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2021-31876.md and follow it. Check whether this project is affected by CVE-2021-31876. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://bitcoinops.org/en/newsletters/2021/05/12/
- https://bitcoinops.org/en/topics/replace-by-fee/
- https://bitcoinops.org/en/newsletters/2021/05/12/
- https://bitcoinops.org/en/topics/replace-by-fee/
References
- https://bitcoinops.org/en/newsletters/2021/05/12/
- https://bitcoinops.org/en/topics/replace-by-fee/
- https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures#CVE-2021-31876
- https://github.com/bitcoin/bitcoin
- https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-May/018893.html
- https://bitcoinops.org/en/newsletters/2021/05/12/
- https://bitcoinops.org/en/topics/replace-by-fee/
- https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures#CVE-2021-31876
- https://github.com/bitcoin/bitcoin
- https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-May/018893.html