GHSA-q29p-9pfr-j652: libcrux-sha3 Incorrect Output From SHAKE Squeeze Vulnerability

HIGH
CWE-682
Published
Advisory Summary

GHSA-q29p-9pfr-j652 is a HIGH incorrect output from shake squeeze vulnerability (CWE-682: Incorrect Calculation) affecting libcrux-sha3 libraries in the crates.io ecosystem. The issue involves incorrect output from shake squeeze functions. Remediation is available by upgrading affected packages to version 0.0.8.

GHSA-q29p-9pfr-j652 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-q29p-9pfr-j652
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-682: Incorrect Calculation
Affected Product libcrux-sha3
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-q29p-9pfr-j652

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

libcrux-sha3 fixed: 0.0.8
Upgrade libcrux-sha3 to 0.0.8
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 libcrux-sha3

How to Check if You Are Affected

To determine whether your application is affected by GHSA-q29p-9pfr-j652, inspect your project dependencies for libcrux-sha3:

inspect dependencies for libcrux-sha3

Analyze the terminal output to locate any version of libcrux-sha3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.8), 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-682: Incorrect Calculation, where the product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management. In libcrux-sha3, 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

The incremental squeeze functions in the portable SHAKE XOF API, when attempting to squeeze more than `RATE` (168 for SHAKE128, 136 for SHAKE256) bytes, performed an additional permutation of the state before producing the first output block, thus discarding the first block of `RATE` bytes of valid XOF output. ## Impact This bug impacts users that rely on this XOF API to squeeze more than `RATE` bytes. It does not impact the use of libcrux-sha3 in libcrux-ml-kem or libcrux-ml-dsa. ## Mitigation Starting from version `0.0.8` the squeeze functions correctly output all blocks including the first block.

GHSA-q29p-9pfr-j652 Affected libcrux-sha3 Versions

1 component(s)
Fixed Versions:
0.0.8
Product / Package Ecosystem Affected Versions Fixed Version
libcrux-sha3
crates.io
< 0.0.8
0.0.8

References

Frequently Asked Questions

What is GHSA-q29p-9pfr-j652?
GHSA-q29p-9pfr-j652 is a security vulnerability in libcrux-sha3 involving Incorrect output from SHAKE squeeze functions under CWE-682: Incorrect Calculation.
Which libcrux-sha3 versions are affected?
Affected versions include releases prior to 0.0.8 across affected packages: libcrux-sha3.
What version fixes GHSA-q29p-9pfr-j652?
Upgrading to 0.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is libcrux-sha3 affected?
Yes, libcrux-sha3 is affected in releases prior to 0.0.8. Upgrade your dependency to 0.0.8 or later.
What CWE is associated with GHSA-q29p-9pfr-j652?
GHSA-q29p-9pfr-j652 is classified under CWE-682: Incorrect Calculation (The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.).
How can I check crates.io dependencies for GHSA-q29p-9pfr-j652?
Run the dependency tree command: 'inspect dependencies for libcrux-sha3'. 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-q29p-9pfr-j652",
  "modified" : "2026-03-26T17:59:34Z",
  "published" : "2026-03-26T17:59:34Z",
  "aliases" : [ ],
  "summary" : "libcrux-sha3: Incorrect output from SHAKE squeeze functions",
  "details" : "The incremental squeeze functions in the portable SHAKE XOF API, when attempting to squeeze more than `RATE` (168 for SHAKE128, 136 for SHAKE256) bytes, performed an additional permutation of the state before producing the first output block, thus discarding the first block of `RATE` bytes of valid XOF output.\n\n## Impact\nThis bug impacts users that rely on this XOF API to squeeze more than `RATE` bytes. It does not impact the use of libcrux-sha3 in libcrux-ml-kem or libcrux-ml-dsa.\n\n## Mitigation\nStarting from version `0.0.8` the squeeze functions correctly output all blocks including the first block.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "libcrux-sha3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cryspen/libcrux/pull/1352"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cryspen/libcrux"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2026-0074.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-682" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-26T17:59:34Z",
    "nvd_published_at" : null
  }
}