CVE-2021-21405
What it is
Lotus is an Implementation of the Filecoin protocol written in Go. BLS signature validation in lotus uses blst library method VerifyCompressed. This method accepts signatures in 2 forms: "serialized", and "compressed", meaning that BLS signatures can be provided as either of 2 unique byte arrays. Lotus block validation functions perform a uniqueness check on provided blocks. Two blocks are considered distinct if the CIDs of their blockheader do not match. The CID method for blockheader includes the BlockSig of the block. The result of these issues is that it would be possible to punish miners for valid blocks, as there are two different valid block CIDs available for each block, even though this must be unique. By switching from the go based `blst` bindings over to the bindings in `filecoin-ffi`, the code paths now ensure that all signatures are compressed by size and the way they are deserialized. This happened in https://github.com/filecoin-project/lotus/pull/5393.
At a glance
- Exploitability
- Can be exploited over the network without logging in. High risk of data tampering.
- Exploit odds
- 1.0% 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.0% in the next 30 days (EPSS).
- Severity: 5.9 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 1.0% · EPSS, next 30 days
- Weakness
- CWE-347
- Record status
- Modified
Affected
- Filecoin Lotus < 1.5.0
Attack profile CVSS 3.1 · 5.9
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
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-21405.md and follow it. Check whether this project is affected by CVE-2021-21405. 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://github.com/filecoin-project/lotus/pull/5393
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
- https://github.com/filecoin-project/lotus/pull/5393
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
References
- https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
- https://github.com/filecoin-project/lotus/pull/5393
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
- https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
- https://github.com/filecoin-project/lotus/pull/5393
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh