9.8critical
gnark-crypto doesn't range check input values during ECDSA and EdDSA signature deserialization
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 1.05% (higher than 65% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-9xfq-8j3r-xp5gGHSA-fr8m-434r-g3xpGO-2023-2096GO-2025-4027
Description
Consensys gnark-crypto through 0.11.2 allows Signature Malleability. This occurs because deserialisation of EdDSA and ECDSA signatures does not ensure that the data is in a certain interval.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| github.com/Consensys/gnark-crypto (Go) | before 0.12.0 | GitHub Advisory Database, Go Vulnerability Database |
| consensys gnark-crypto | before 0.12.0 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 5.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
Consensys gnark-crypto through 0.11.2 allows Signature Malleability. This occurs because deserialisation of EdDSA and ECDSA signatures does not ensure that the data is in a certain interval.
GitHub Advisory Database
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-fr8m-434r-g3xp. This link is maintained to preserve external references.
Original Description
Consensys gnark-crypto through 0.11.2 allows Signature Malleability. This occurs because deserialisation of EdDSA and ECDSA signatures does not ensure that the data is in a certain interval.
GitHub Advisory Database
Impact
During deserialization of ECDSA and EdDSA signatures gnark-crypto did not check that the values are in the range [1, n-1] with n being the corresponding modulus (either base field modulus in case of R in EdDSA, and scalar field modulus in case of s,r in ECDSA and s in EdDSA). As this also allowed zero inputs, then it was possible to craft a signature which lead to null pointer dereference, leading to denial-of-service of an application. This also enabled weak signature malleability when the users assumed uniqueness of the serialized signatures (but not the underlying modulo reduced values).
We are not aware of any users impacted by the bug. The implemented signature schemes in gnark-crypto complement the in-circuit versions in gnark, allowing to have end-to-end tests.
Patches
The issue was patched in PR #449. The fix returns an error during deserialization if the values do not belong to the ranges [1, n-1].
The fix is included in release v0.12.0 and upwards.
Workarounds
Users can manually validate the inputs to be in corresponding ranges when using serialized signatures (or digests of them) as unique keys.
To address the denial-of-service, the users can install hook to recover panics and recover
Resources
- Verichains advisory for signature malleability.
- Fix https://github.com/Consensys/gnark-crypto/pull/449
- Go blog post "Defer, Panic, and Recover"
- gnark v0.12.0
Acknowledgement
Lack of range checks leading to signature malleability was reported by Verichains.
Go Vulnerability Database
Signature malleability in github.com/consensys/gnark-crypto
Go Vulnerability Database
Gnark-crypto doesn't range check input values during ECDSA and EdDSA deserialization in github.com/consensys/gnark-crypto
NVD (es)
Consensys gnark-crypto hasta 0.11.2 permite maleabilidad de firma. Esto ocurre porque la deserialización de las firmas EdDSA y ECDSA no garantiza que los datos estén en un intervalo determinado.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-44273 changed 2024-09-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9xfq-8j3r-xp5g changed 2026-02-03 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-fr8m-434r-g3xp changed 2026-02-03 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2023-2096 changed 2026-01-22 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-4027 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2023-44273 changed 2026-06-17 | Public domain |