# CVE-2022-31053: Signature forgery in Biscuit

> Attackers can forge valid signatures to create tokens with arbitrary access levels, requiring an upgrade to specification version 2.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jun 2022
- **Updated:** 22 Apr 2025
- **Also known as:** GHSA-75rw-34q6-72cr, GO-2022-0564, HSEC-2023-0002

## What is CVE-2022-31053?

CVE-2022-31053 is a critical vulnerability in biscuit-auth biscuit, published on 13 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Biscuit is an authentication and authorization token for microservices architectures. The Biscuit specification version 1 contains a vulnerable algorithm that allows malicious actors to forge valid Γ-signatures. Such an attack would allow an attacker to create a token with any access level. 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. There are no known workarounds for this issue.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature)

## Which versions are affected by CVE-2022-31053?

8 open source packages ship an affected version, including github.com/biscuit-auth/biscuit-go, biscuit-haskell and com.clever-cloud:biscuit-java. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/biscuit-auth/biscuit-go` | Go | All versions | None |
| `github.com/biscuit-auth/biscuit-go` | Go | All versions | 2.0.0 |
| `github.com/biscuit-auth/biscuit-go` | Go | All versions | 2.0.0 |
| `biscuit-haskell` | Hackage | From 0.1.0.0 | 0.2.0.0 |
| `com.clever-cloud:biscuit-java` | Maven | All versions | 2.0.0 |
| `com.clever-cloud:biscuit-java` | Maven | All versions | 2.0.0 |
| `biscuit-auth` | crates.io | From 1.0.0 | 2.0.0 |
| `biscuit-auth` | crates.io | From 1.0.0 | 2.0.0 |

Products: Biscuitsec Biscuit-Auth, Biscuitsec Biscuit-Go, Biscuitsec Biscuit-Haskell, Clever-Cloud Biscuit-Java.

## How do I fix CVE-2022-31053?

Upgrade github.com/biscuit-auth/biscuit-go to 2.0.0 or later.

## Is CVE-2022-31053 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31053 exists.

## Other vulnerabilities in biscuit-auth biscuit

- [CVE-2024-41949](https://insights.sbomify.com/CVE-2024-41949/): biscuit-rust vulnerable to public key confusion in third party block (low 3.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-31053 and fix it if it is affected.

What it is: CVE-2022-31053 is a critical vulnerability in biscuit-auth biscuit, published on 13 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31053 exists.

Affected packages and fixed versions:
- github.com/biscuit-auth/biscuit-go (Go): affected all versions; no fix listed
- github.com/biscuit-auth/biscuit-go (Go): affected all versions; fixed in 2.0.0
- github.com/biscuit-auth/biscuit-go (Go): affected all versions; fixed in 2.0.0
- biscuit-haskell (Hackage): affected from 0.1.0.0; fixed in 0.2.0.0
- com.clever-cloud:biscuit-java (Maven): affected all versions; fixed in 2.0.0
- com.clever-cloud:biscuit-java (Maven): affected all versions; fixed in 2.0.0
- biscuit-auth (crates.io): affected from 1.0.0; fixed in 2.0.0
- biscuit-auth (crates.io): affected from 1.0.0; fixed in 2.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-31053/ (Markdown: https://insights.sbomify.com/CVE-2022-31053/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-31053
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-31053
- OSV: https://osv.dev/vulnerability/CVE-2022-31053

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-31053/
Summaries are generated and may contain mistakes; the official description above is the record.
