7.5high
nimiq-keys: Unchecked Ed25519 signature length in TaggedPublicKey::verify causes remote node panic via DHT
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.63% (higher than 51% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-27w2-87xv-37c6
Description
nimiq-blockchain provides persistent block storage for Nimiq's Rust implementation. In versions 1.3.0 and below, a malicious network peer can crash any Nimiq full node by publishing a crafted Kademlia DHT record. The maliciously crafted record would contain a TaggedSigned<ValidatorRecord, KeyPair> with a signature field whose byte length is not exactly 64 in order to cause a crash. When the victim node's DHT verifier calls TaggedSigned::verify, execution reaches Ed25519Signature::from_bytes(sig).unwrap() in the TaggedPublicKey implementation for Ed25519PublicKey. The from_bytes call fails because ed25519_zebra::Signature::try_from rejects slices not 64 bytes, and the unwrap() panics. The BLS TaggedPublicKey implementation correctly returns false on error; only the Ed25519 implementation panics. This issue has been fixed in version 1.4.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nimiq core-rs-albatross | < 1.4.0 | CVE List |
| nimiq-keys (crates.io) | up to 0.2.0 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
nimiq-blockchain provides persistent block storage for Nimiq's Rust implementation. In versions 1.3.0 and below, a malicious network peer can crash any Nimiq full node by publishing a crafted Kademlia DHT record. The maliciously crafted record would contain a TaggedSigned<ValidatorRecord, KeyPair> with a signature field whose byte length is not exactly 64 in order to cause a crash. When the victim node's DHT verifier calls TaggedSigned::verify, execution reaches Ed25519Signature::from_bytes(sig).unwrap() in the TaggedPublicKey implementation for Ed25519PublicKey. The from_bytes call fails because ed25519_zebra::Signature::try_from rejects slices not 64 bytes, and the unwrap() panics. The BLS TaggedPublicKey implementation correctly returns false on error; only the Ed25519 implementation panics. This issue has been fixed in version 1.4.0.
GitHub Advisory Database
Impact
A malicious network peer can crash any Nimiq full node by publishing a crafted Kademlia DHT record containing a TaggedSigned<ValidatorRecord, KeyPair> with a signature field whose byte length is not exactly 64. When the victim node's DHT verifier calls TaggedSigned::verify, execution reaches Ed25519Signature::from_bytes(sig).unwrap() in the TaggedPublicKey implementation for Ed25519PublicKey. The from_bytes call fails because ed25519_zebra::Signature::try_from rejects slices not 64 bytes, and the unwrap() panics. The BLS TaggedPublicKey implementation correctly returns false on error; only the Ed25519 implementation panics.
Patches
The patch for this vulnerability is formally released as part of v1.4.0.
Workarounds
No known workarounds.
Resources
See PR.
NVD (es)
nimiq-blockchain proporciona almacenamiento persistente de bloques para la implementación en Rust de Nimiq. En las versiones 1.3.0 e inferiores, un par de red malicioso puede colapsar cualquier nodo completo de Nimiq publicando un registro DHT de Kademlia manipulado. El registro manipulado maliciosamente contendría un TaggedSigned<ValidatorRecord, KeyPair> con un campo de firma cuya longitud en bytes no es exactamente 64 para causar un colapso. Cuando el verificador DHT del nodo víctima llama a TaggedSigned::verify, la ejecución llega a Ed25519Signature::from_bytes(sig).unwrap() en la implementación de TaggedPublicKey para Ed25519PublicKey. La llamada a from_bytes falla porque ed25519_zebra::Signature::try_from rechaza segmentos que no tienen 64 bytes, y el unwrap() entra en pánico. La implementación BLS de TaggedPublicKey devuelve correctamente 'false' en caso de error; solo la implementación de Ed25519 entra en pánico. Este problema ha sido solucionado en la versión 1.4.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40092 changed 2026-05-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-27w2-87xv-37c6 changed 2026-06-08 | CC-BY-4.0 |
| NVD | CVE-2026-40092 changed 2026-07-23 | Public domain |