5.9medium
BLS Signature "Malleability"
- Severity
- 5.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.98% (higher than 63% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4g52-pqcj-phvhGO-2022-0905
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| filecoin-project lotus | < 1.5.0 | CVE List |
| github.com/filecoin-project/lotus (Go) | before 1.5.0 | GitHub Advisory Database, Go Vulnerability Database |
| filecoin lotus | before 1.5.0 | NVD |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
- 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.
Patches
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
References
Go Vulnerability Database
BLS Signature "Malleability" in github.com/filecoin-project/lotus
NVD (es)
Lotus es una implementación del protocolo Filecoin escrito en Go. La validación de la firma BLS en lotus utiliza el método de biblioteca blst VerifyCompressed. Este método acepta firmas en 2 formas: "serialized" y "compressed", lo que significa que las firmas BLS se pueden proporcionar como cualquiera de las 2 matrices de bytes únicas. Las funciones de validación de bloques de Lotus realizan una verificación de unicidad en los bloques proporcionados. Dos bloques se consideran distintos si los CID de su encabezado de bloque no coinciden. El método CID para blockheader incluye el BlockSig del bloque. El resultado de estos problemas es que sería posible castigar a los mineros por bloques válidos, ya que hay dos CID de bloque válidos diferentes disponibles para cada bloque, aunque este debe ser único. Al cambiar de los enlaces `blst` basados ??en go a los enlaces en `filecoin-ffi`, las rutas de código ahora garantizan que todas las firmas estén comprimidas por tamaño y la forma en que se deserializan. Esto ocurrió en https://github.com/filecoin-project/lotus/pull/5393
References
| https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh | advisory, patch, third-party-advisory, web | |
| https://github.com/filecoin-project/lotus/pull/5393 | fix, patch, third-party-advisory, web | |
| https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754 | exploit, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-21405 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21405 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4g52-pqcj-phvh changed 2026-07-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0905 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2021-21405 changed 2026-06-17 | Public domain |