CVE-2022-31053: Biscuit auth Signature Forgery Vulnerability

CRITICAL
Advisory Identifier: GHSA-75rw-34q6-72cr
CVSS 9.8
CWE-347
Published
Advisory Summary

CVE-2022-31053 is a CRITICAL (CVSS 9.8) signature forgery vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Biscuit auth libraries in the crates.io ecosystem. The issue involves signature forgery in biscuit. Remediation is available by upgrading affected packages to version 2.0.0.

CVE-2022-31053 at a Glance

CVE Identifier CVE-2022-31053
GHSA Identifier GHSA-75rw-34q6-72cr
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Biscuit auth
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2022-31053

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

biscuit-auth fixed: 2.0.0
Upgrade biscuit-auth to 2.0.0
github.com/biscuit-auth/biscuit-go fixed: 2.0.0
Upgrade github.com/biscuit-auth/biscuit-go to 2.0.0
com.clever-cloud:biscuit-java fixed: 2.0.0
<dependency>
    <groupId>com.clever-cloud</groupId>
    <artifactId>biscuit-java</artifactId>
    <version>2.0.0</version>
</dependency>
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 biscuit-auth

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-31053, inspect your project dependencies for Biscuit auth:

inspect dependencies for biscuit-auth

Analyze the terminal output to locate any version of Biscuit auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.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 Biscuit auth, 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 The paper [Cryptanalysis of Aggregate Γ-Signature and Practical Countermeasures in Application to Bitcoin](https://eprint.iacr.org/2020/1484) defines a way to forge valid Γ-signatures, an algorithm that is used in the Biscuit specification version 1. It would allow an attacker to create a token with any access level. As Biscuit v1 was still an early version and not broadly deployed, we were able to contact all known users of Biscuit v1 and help them migrate to Biscuit v2. We are not aware of any active exploitation of this vulnerability. ### Patches The version 2 of the specification mandates a different algorithm than gamma signatures and as such is not affected by this vulnerability. The Biscuit implementations in Rust, Haskell, Go, Java and Javascript all have published versions following the v2 specification. ### Workarounds There is no known workaround, any use of Biscuit v1 should be migrated to v2. ### References [Cryptanalysis of Aggregate Γ-Signature and Practical Countermeasures in Application to Bitcoin](https://eprint.iacr.org/2020/1484) ### For more information If you have any questions or comments about this advisory: * Open an issue in [biscuit-auth/biscuit](https://github.com/biscuit-auth/biscuit) * Ask questions on [Matrix](https://matrix.to/#/#biscuit-auth:matrix.org)

CVE-2022-31053 Affected Biscuit auth Versions

3 component(s)
Fixed Versions:
2.0.0
Product / Package Ecosystem Affected Versions Fixed Version
biscuit-auth
crates.io
≥ 1.0.0
< 2.0.0
2.0.0
github.com/biscuit-auth/biscuit-go
Go
< 2.0.0
2.0.0
com.clever-cloud:biscuit-java
Maven
< 2.0.0
2.0.0

References

Frequently Asked Questions

What is CVE-2022-31053?
CVE-2022-31053 is a security vulnerability in Biscuit auth involving Signature forgery in Biscuit under CWE-347: Improper Verification of Cryptographic Signature.
Which Biscuit auth versions are affected?
Affected versions include releases prior to 2.0.0 across affected packages: biscuit-auth, github.com/biscuit-auth/biscuit-go, com.clever-cloud:biscuit-java.
What version fixes CVE-2022-31053?
Upgrading to 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is biscuit-auth affected?
Yes, biscuit-auth is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
Is github.com/biscuit-auth/biscuit-go affected?
Yes, github.com/biscuit-auth/biscuit-go is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What is the CVSS score of CVE-2022-31053?
CVE-2022-31053 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-31053?
CVE-2022-31053 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 crates.io dependencies for CVE-2022-31053?
Run the dependency tree command: 'inspect dependencies for biscuit-auth'. 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-75rw-34q6-72cr",
  "modified" : "2023-03-07T00:39:38Z",
  "published" : "2022-06-17T00:38:03Z",
  "aliases" : [ "CVE-2022-31053" ],
  "summary" : "Signature forgery in Biscuit",
  "details" : "### Impact\n\nThe paper [Cryptanalysis of Aggregate Γ-Signature and Practical Countermeasures in Application to Bitcoin](https://eprint.iacr.org/2020/1484) defines a way to forge valid Γ-signatures, an algorithm that is used in the Biscuit specification version 1.\nIt would allow an attacker to create a token with any access level.\n\nAs Biscuit v1 was still an early version and not broadly deployed, we were able to contact all known users of Biscuit v1 and help them migrate to Biscuit v2.\nWe are not aware of any active exploitation of this vulnerability.\n\n### Patches\n\nThe version 2 of the specification mandates a different algorithm than gamma signatures and as such is not affected by this vulnerability. The Biscuit implementations in Rust, Haskell, Go, Java and Javascript all have published versions following the v2 specification.\n\n### Workarounds\n\nThere is no known workaround, any use of Biscuit v1 should be migrated to v2.\n\n### References\n[Cryptanalysis of Aggregate Γ-Signature and Practical Countermeasures in Application to Bitcoin](https://eprint.iacr.org/2020/1484)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [biscuit-auth/biscuit](https://github.com/biscuit-auth/biscuit)\n* Ask questions on [Matrix](https://matrix.to/#/#biscuit-auth:matrix.org)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "biscuit-auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/biscuit-auth/biscuit-go"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.clever-cloud:biscuit-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/biscuit-auth/biscuit/security/advisories/GHSA-75rw-34q6-72cr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31053"
  }, {
    "type" : "WEB",
    "url" : "https://eprint.iacr.org/2020/1484"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-75rw-34q6-72cr"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/biscuit-auth/biscuit"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0564"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T00:38:03Z",
    "nvd_published_at" : "2022-06-13T20:15:00Z"
  }
}