Exposure of Sensitive Information to an Unauthorized Actor Affecting github.com/consensys/gnark/backend/groth16/bn254 package, versions <0.11.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMCONSENSYSGNARKBACKENDGROTH16BN254-7922516
  • published 6 Sep 2024
  • disclosed 6 Sep 2024
  • credit maltezellic

How to fix?

Upgrade github.com/consensys/gnark/backend/groth16/bn254 to version 0.11.0 or higher.

Overview

Affected versions of this package are vulnerable to Exposure of Sensitive Information to an Unauthorized Actor due to the handling of multiple commitments within the circuit. An attacker can manipulate the soundness of the entire circuit by choosing all but the last commitment, which are used as random challenges for optimized non-native multiplication, lookup checks, and other operations. This is only exploitable if the native Groth16 verifier is implemented or used with multiple commitments.

Workaround

This vulnerability can be mitigated by following gnark maintainers' recommendation to use only a single commitment and then derive in-circuit commitments as needed using the std/multicommit package.

References

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
6.9 medium
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    None
  • Integrity (VI)
    High
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None