# RUSTSEC-2026-0207: Incorrect Output of Incremental Portable SHAKE API on Multiple Squeeze Calls

> Incorrect output generation in the portable SHAKE API when squeezing in multiple calls can lead to data integrity issues for dependent applications.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2026

## What is RUSTSEC-2026-0207?

RUSTSEC-2026-0207 is a vulnerability in libcrux-sha3, published on 22 Apr 2026. 

### Official description

The incremental squeeze functions in the portable SHAKE XOF API, when
attempting to squeeze an output using multiple calls to `squeeze`,
rather than squeezing the full output at once, could output incorrect
values. Internally, output blocks that were not completely squeezed
were not buffered for the next call to `squeeze`, which would
consequently drop bytes of the correct squeeze output if the preceding
call requested an output of length in bytes not cleanly divisible by
`RATE` (168 for SHAKE128, 136 for SHAKE256).

## Impact
This bug impacts users that rely on this XOF API to squeeze output in
multiple calls where any of the calls request an output length that is
not divisible by `RATE`. It does not impact the use of libcrux-sha3 in
libcrux-ml-kem or libcrux-ml-dsa.

## Mitigation
Starting from version `0.0.10` the squeeze functions correctly output
all squeezed bytes independent of the number of `squeeze` calls and
the output lengths requested in each call.

## Which versions are affected by RUSTSEC-2026-0207?

1 open source package ship an affected version, including libcrux-sha3.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libcrux-sha3` | crates.io | From 0.0.0-0 | 0.0.10 |

## How do I fix RUSTSEC-2026-0207?

Upgrade libcrux-sha3 to 0.0.10 or later.

## Is RUSTSEC-2026-0207 being exploited?

There is no known exploitation of RUSTSEC-2026-0207 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for RUSTSEC-2026-0207 and fix it if it is affected.

What it is: RUSTSEC-2026-0207 is a vulnerability in libcrux-sha3, published on 22 Apr 2026. 
Exploitation: There is no known exploitation of RUSTSEC-2026-0207 in the wild and no public exploit code.

Affected packages and fixed versions:
- libcrux-sha3 (crates.io): affected from 0.0.0-0; fixed in 0.0.10

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/RUSTSEC-2026-0207/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0207/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/RUSTSEC-2026-0207

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