Vulnerabilities in pkg:golang/github.com/consensys/gnark-crypto

PACKAGE
Advisory Identifier: GHSA-fr8m-434r-g3xp
Advisory Summary

CVE-2023-44273 is a MODERATE (CVSS 5.1) gnark-crypto doesn't range check input vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Github.com/consensys/gnark crypto libraries in the Go ecosystem. The issue involves gnark-crypto doesn't range check input values during ecdsa and eddsa signature deserialization. Remediation is available by upgrading affected packages to version 0.12.0.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/consensys/gnark-crypto

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/consensys/gnark-crypto. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-fr8m-434r-g3xp CVE-2023-44273 MODERATE gnark-crypto doesn't range check input values during ECDSA and EdDSA signature deserialization
GHSA-9xfq-8j3r-xp5g - CRITICAL Duplicate Advisory: Consensys gnark-crypto allows Signature Malleability
GHSA-fj2x-735w-74vq - HIGH gnark-crypto allows unchecked memory allocation during vector deserialization
GHSA-pffg-92cg-xf5c - LOW gnark-crypto's exponentiation in the pairing target group GT using GLV can give incorrect results

CVE-2023-44273 at a Glance

CVE Identifier CVE-2023-44273
GHSA Identifier GHSA-fr8m-434r-g3xp
Severity MODERATE
CVSS v3.1 Base Score 5.1
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Github.com/consensys/gnark crypto
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-44273

To remediate this vulnerability, upgrade all affected Github.com/consensys/gnark crypto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/consensys/gnark-crypto fixed: 0.12.0
Upgrade github.com/consensys/gnark-crypto to 0.12.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/consensys/gnark-crypto

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-44273, inspect your project dependencies for Github.com/consensys/gnark crypto:

inspect dependencies for github.com/consensys/gnark-crypto

Analyze the terminal output to locate any version of Github.com/consensys/gnark crypto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Github.com/consensys/gnark crypto, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/advisories/GHSA-9xfq-8j3r-xp5g) for signature malleability. * Fix https://github.com/Consensys/gnark-crypto/pull/449 * [Go blog post "Defer, Panic, and Recover"](https://go.dev/blog/defer-panic-and-recover) * [gnark v0.12.0](https://github.com/Consensys/gnark-crypto/releases/tag/v0.12.0) ### Acknowledgement Lack of range checks leading to signature malleability was reported by [Verichains](https://www.verichains.io/).

CVE-2023-44273 Affected Github.com/consensys/gnark crypto Versions

1 component(s)
Fixed Versions:
0.12.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/consensys/gnark-crypto
Go
< 0.12.0
0.12.0

References

Frequently Asked Questions

What is CVE-2023-44273?
CVE-2023-44273 is a security vulnerability in Github.com/consensys/gnark crypto involving gnark-crypto doesn't range check input values during ECDSA and EdDSA signature deserialization under CWE-347: Improper Verification of Cryptographic Signature.
Which Github.com/consensys/gnark crypto versions are affected?
Affected versions include releases prior to 0.12.0 across affected packages: github.com/consensys/gnark-crypto.
What version fixes CVE-2023-44273?
Upgrading to 0.12.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/consensys/gnark-crypto affected?
Yes, github.com/consensys/gnark-crypto is affected in releases prior to 0.12.0. Upgrade your dependency to 0.12.0 or later.
What is the CVSS score of CVE-2023-44273?
CVE-2023-44273 has a CVSS v3.1 base score of 5.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2023-44273?
CVE-2023-44273 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Go dependencies for CVE-2023-44273?
Run the dependency tree command: 'inspect dependencies for github.com/consensys/gnark-crypto'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fr8m-434r-g3xp",
  "modified" : "2026-01-22T20:44:35Z",
  "published" : "2025-10-15T18:57:59Z",
  "aliases" : [ "CVE-2023-44273" ],
  "summary" : "gnark-crypto doesn't range check input values during ECDSA and EdDSA signature deserialization",
  "details" : "### Impact\n\nDuring 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).\n\nWe 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.\n\n### Patches\n\nThe 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]`.\n\nThe fix is included in release v0.12.0 and upwards.\n\n### Workarounds\n\nUsers can manually validate the inputs to be in corresponding ranges when using serialized signatures (or digests of them) as unique keys.\n\nTo address the denial-of-service, the users can install hook to recover panics and recover \n\n### Resources\n\n* [Verichains advisory](https://github.com/advisories/GHSA-9xfq-8j3r-xp5g) for signature malleability.\n* Fix https://github.com/Consensys/gnark-crypto/pull/449\n* [Go blog post \"Defer, Panic, and Recover\"](https://go.dev/blog/defer-panic-and-recover)\n* [gnark v0.12.0](https://github.com/Consensys/gnark-crypto/releases/tag/v0.12.0)\n\n\n### Acknowledgement\n\nLack of range checks leading to signature malleability was reported by [Verichains](https://www.verichains.io/).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/consensys/gnark-crypto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.12.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Consensys/gnark-crypto/security/advisories/GHSA-fr8m-434r-g3xp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-44273"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Consensys/gnark-crypto/pull/449"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Consensys/gnark-crypto"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Consensys/gnark-crypto/releases/tag/v0.12.0"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/blog/defer-panic-and-recover"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-15T18:57:59Z",
    "nvd_published_at" : null
  }
}