# GHSA-h864-m8vm-3xvj: oqs's Post-Quantum Signature scheme Rainbow level I parametersets broken

> A practical key-recovery attack breaks the Rainbow level I signature scheme in liboqs, allowing attackers to forge signatures and bypass authentication.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Feb 2022
- **Also known as:** RUSTSEC-2022-0047

## What is GHSA-h864-m8vm-3xvj?

GHSA-h864-m8vm-3xvj is a vulnerability in oqs, published on 25 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Ward Beullens found a practical key-recovery attack against Rainbow.
The level I parametersets are removed from liboqs starting from version `0.7.2`.
Find the scientific details in [Breaking Rainbow Takes a Weekend on a Laptop](https://eprint.iacr.org/2022/214).

This means all the `oqs::sig::Algorithm::RainbowI*` variants are insecure.

## Which versions are affected by GHSA-h864-m8vm-3xvj?

3 open source packages ship an affected version, including oqs.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `oqs` | crates.io | All versions | 0.7.2 |
| `oqs` | crates.io | All versions | 0.7.2 |
| `oqs` | crates.io | From 0.0.0-0 | 0.7.2 |

## How do I fix GHSA-h864-m8vm-3xvj?

Upgrade oqs to 0.7.2 or later.

## Is GHSA-h864-m8vm-3xvj being exploited?

There is no known exploitation of GHSA-h864-m8vm-3xvj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-h864-m8vm-3xvj and fix it if it is affected.

What it is: GHSA-h864-m8vm-3xvj is a vulnerability in oqs, published on 25 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-h864-m8vm-3xvj in the wild and no public exploit code.

Affected packages and fixed versions:
- oqs (crates.io): affected all versions; fixed in 0.7.2
- oqs (crates.io): affected all versions; fixed in 0.7.2
- oqs (crates.io): affected from 0.0.0-0; fixed in 0.7.2

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/GHSA-h864-m8vm-3xvj/ (Markdown: https://insights.sbomify.com/GHSA-h864-m8vm-3xvj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-h864-m8vm-3xvj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-h864-m8vm-3xvj/
Summaries are generated and may contain mistakes; the official description above is the record.
