CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-FHVH-VW7H-9XF3

GHSA-FHVH-VW7H-9XF3: Cryptographic Signature Forgery via AVX2 Logic Error in libcrux-ml-dsa

Alon Barad
Alon Barad
Software Engineer

May 19, 2026·8 min read·32 visits

Executive Summary (TL;DR)

The libcrux-ml-dsa library mishandles the use_hint function in its AVX2 implementation. Attackers can exploit this logic error to forge ML-DSA signatures that are improperly validated on affected hardware platforms.

A critical logic vulnerability in the libcrux-ml-dsa library allows cryptographic signature forgery on x86_64 architectures using the AVX2 backend. The flaw originates from an incorrect SIMD implementation of the ML-DSA use_hint function, violating FIPS 204 specifications and allowing attackers to bypass signature verification.

Vulnerability Overview

The libcrux-ml-dsa library is a formally verified implementation of the Module-Lattice-based Digital Signature Algorithm (ML-DSA). This algorithm, previously known as Dilithium, forms a core component of post-quantum cryptographic standards defined in FIPS 204. The library implements various backends to optimize cryptographic operations across different hardware architectures. The vulnerability resides specifically within the performance-optimized AVX2 backend designed for x86_64 architectures.

The flaw occurs during the signature verification process, specifically within the use_hint function. This function executes Algorithm 40 of the FIPS 204 specification, which adjusts polynomial coefficients based on hint bits provided within the signature. The AVX2 implementation contains a logic error in its handling of low-order bits during this polynomial decomposition phase. This deviation from the specification constitutes a failure to properly verify cryptographic signatures (CWE-347).

The impact of this vulnerability is strictly constrained to the hardware architecture executing the AVX2 instructions. Portable or fallback implementations within the same library handle the mathematical operations correctly and reject the invalid signatures. Systems utilizing the vulnerable AVX2 backend may accept structurally invalid signatures, providing attackers with a mechanism to forge cryptographic trust.

Root Cause Analysis

The ML-DSA specification (FIPS 204) defines the use_hint(h, r) function to adjust polynomial coefficients based on a provided hint bit. The algorithm decomposes a coefficient r into a high-order component r1 and a low-order component r0. The hint bit h dictates the mathematical adjustment applied to the high-order component. This adjustment ensures that the signature verification process accurately reconstructs the required mathematical structures.

The specification mandates precise rules for this adjustment based on the value of the low-order bits. When the hint bit h equals 1 and r0 is strictly greater than 0, the algorithm computes (r1 + 1) mod m. When the hint bit h equals 1 and r0 is less than or equal to 0, the algorithm computes (r1 - 1) mod m. If the hint bit h equals 0, the output remains r1 without modification.

The logic error manifests in the AVX2 Single Instruction, Multiple Data (SIMD) implementation of these mathematical rules. The developers utilized the vec256_blendv_epi32 intrinsic to select the correct adjustment path based on the value of r0. The implementation incorrectly evaluated the condition for the negative adjustment path. It checked for r0 < 0 instead of the specified r0 <= 0.

Consequently, the AVX2 implementation fails to handle the edge case where r0 equals exactly zero. When r0 is 0 and the hint bit h is 1, the specification requires the function to return (r1 - 1) mod m. The vulnerable AVX2 implementation defaults to the positive path or the unmodified path, incorrectly returning r1. This mathematical divergence from the FIPS 204 standard causes the verifier to calculate an incorrect reconstructed polynomial.

Code Analysis

The vulnerable code path utilizes specific SIMD intrinsics to optimize the mathematical operations across multiple data points simultaneously. The implementation constructs a bitmask to branch logic based on the sign of the low-order polynomial component r0. The vulnerability stems from the choice of intrinsic used to generate this comparative mask.

// Vulnerable Implementation (Conceptual AVX2 Logic)
// This mask strictly checks if r0 is greater than zero.
__m256i mask = _mm256_cmpgt_epi32(r0, zero);
 
// The blend selects plus_one_path if mask is true, minus_one_path otherwise.
// When r0 == 0, the mask is false, and the minus_one logic may be bypassed 
// or improperly blended depending on the exact intrinsic nesting.
__m256i result = _mm256_blendv_epi32(minus_one_path, plus_one_path, mask);

The issue arises because _mm256_cmpgt_epi32 only identifies values strictly greater than zero. The edge case where r0 equals zero causes the mask to evaluate as false. The resulting blend operation fails to route the zero value into the mathematical path required for the r0 <= 0 condition. The verifier thus applies the wrong mathematical operation to the polynomial.

// Patched Implementation (Conceptual AVX2 Logic)
// The fix ensures r0 == 0 is correctly categorized.
// Create a mask for r0 <= 0 by inverting a strictly greater-than check, 
// or by explicitly masking the zero condition.
__m256i mask_gt = _mm256_cmpgt_epi32(r0, zero);
 
// The corrected logic explicitly handles the zero boundary.
__m256i result = _mm256_blendv_epi32(corrected_minus_one_path, plus_one_path, mask_gt);

The patch modifies the mask generation sequence to strictly align with the r0 <= 0 requirement defined in FIPS 204. By correctly identifying the zero boundary condition, the SIMD pipeline routes the r0 = 0 coefficients through the (r1 - 1) mod m computation path. This modification restores cryptographic parity between the AVX2 backend and the formally verified portable implementation.

Exploitation

Exploiting this vulnerability requires an attacker to construct a specific mathematical payload within a digital signature. The attacker must target the polynomial reconstruction phase of the ML-DSA algorithm. The primary objective is to force the verifier's internal state into the exact edge case where the low-order bit component evaluates to zero.

The attacker analyzes the public key and crafts a message-signature pair that satisfies the prerequisite mathematical conditions. During the verification phase, the forged signature must yield internal polynomial values where r0 = 0 and the hint bit h = 1. Achieving this specific state requires deep mathematical manipulation of the lattice structures defining the ML-DSA signature scheme.

When the vulnerable AVX2 verifier processes this crafted signature, it evaluates the use_hint function using the flawed SIMD logic. Because r0 equals zero, the verifier computes an incorrect value for the reconstructed polynomial. The attacker engineers the forged signature such that this specific mathematical error causes the overall verification equation to balance. The verifier concludes that the signature is valid, bypassing the cryptographic integrity checks.

The exploit strictly depends on the hardware environment executing the verification process. The attacker cannot compel the target to use the AVX2 backend remotely. The target system must natively support the AVX2 instruction set and must be compiled to utilize the specific libcrux-ml-dsa optimized paths. If the target system falls back to the portable implementation, the forged signature is correctly rejected.

Impact Assessment

The vulnerability allows unauthenticated attackers to perform cryptographic signature spoofing against affected systems. Successful exploitation compromises the fundamental trust model of the digital signature algorithm. Attackers can forge identities, authorize unauthorized transactions, or bypass access controls that rely on ML-DSA cryptographic proofs.

The vulnerability is tracked under CVSS v4.0 with a High severity base score of 8.2 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N). The attack vector is strictly network-based, requiring no authentication or user interaction. The high integrity impact reflects the complete failure of the signature validation mechanism for specific crafted inputs.

The Attack Requirements (AT:P) metric is evaluated as Present due to the strict hardware prerequisites. The vulnerability does not manifest on architectures lacking AVX2 extensions or on systems explicitly compiled to utilize the portable Rust implementation. This hardware dependency restricts the exploitable surface area but remains highly relevant for modern x86_64 server environments executing cryptographic workloads.

Implementations of post-quantum cryptography are actively being integrated into critical infrastructure, secure boot mechanisms, and identity verification protocols. A fundamental flaw in the signature verification primitive exposes these early adopters to severe supply chain and authentication risks. Organizations migrating to FIPS 204 compliance using libcrux-ml-dsa face immediate threats if deploying the unpatched library on modern x86_64 hardware.

Remediation

Organizations utilizing the libcrux-ml-dsa library must immediately upgrade their dependencies to version 0.0.9 or later. The patched version resolves the logic error within the AVX2 backend, ensuring the SIMD operations correctly align with the mathematical requirements of the FIPS 204 specification. The upgrade requires recompilation of the dependent applications to statically link the corrected cryptographic primitives.

Administrators operating in environments where immediate patching is impossible can implement a software-level workaround. The vulnerability can be mitigated by explicitly disabling the AVX2 backend within the library's configuration. Forcing the application to utilize the portable, formally verified Rust implementation bypasses the flawed SIMD logic entirely. The portable implementation correctly handles the edge case and rejects forged signatures.

> [!NOTE] > Disabling the AVX2 backend incurs a substantial performance penalty. Cryptographic operations, specifically signature verification routines, will execute significantly slower due to the absence of SIMD hardware optimizations.

Security teams should validate their mitigation efforts by implementing rigorous unit testing. The Wycheproof cryptographic testing framework includes specific test vectors designed to exercise the use_hint edge case. Executing these test cases against the compiled application verifies that the environment correctly rejects signatures exhibiting the mathematical anomalies associated with this vulnerability.

Official Patches

CryspenFix implementation for the AVX2 use_hint logic within libcrux.
GoogleRelated fix implementation for Tink-Go.

Technical Appendix

CVSS Score
8.2/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Affected Systems

Systems executing libcrux-ml-dsa versions prior to 0.0.9 on x86_64 architectures with AVX2 instruction sets.

Affected Versions Detail

Product
Affected Versions
Fixed Version
libcrux-ml-dsa
Cryspen
< 0.0.90.0.9
AttributeDetail
CWE IDCWE-347, CWE-681
Attack VectorNetwork
CVSS v4.08.2 (High)
Exploit StatusProof of Concept (PoC) available via Wycheproof vectors
ImpactCryptographic Signature Forgery
Affected Architecturex86_64 (AVX2)

MITRE ATT&CK Mapping

T1553.006Subvert Trust Controls: Digital Certificates
Defense Evasion
CWE-347
Improper Verification of Cryptographic Signature

Improper Verification of Cryptographic Signature and Incorrect Conversion between Numeric Types

Known Exploits & Detection

GitHub (C2SP/wycheproof)Wycheproof test vectors designed to exercise the use_hint edge case and validate the vulnerability.

Vulnerability Timeline

Vulnerability reported to Cryspen.
2026-05-05
Fix committed to cryspen/libcrux repository.
2026-05-12
Advisories RUSTSEC-2026-0125 and GHSA-FHVH-VW7H-9XF3 published.
2026-05-13

References & Sources

  • [1]GitHub Advisory: GHSA-FHVH-VW7H-9XF3
  • [2]RustSec Advisory: RUSTSEC-2026-0125
  • [3]cryspen/libcrux Fix Pull Request
  • [4]Wycheproof Test Case Pull Request
  • [5]Related Tink-Go Fix Pull Request

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-86046
7.1

CVE-2026-86046: Arbitrary File Write via Path Traversal in termux-sync Restore Workflow

A path traversal vulnerability (CWE-22) in termux-sync prior to version 1.2.4 allows an attacker to overwrite arbitrary files within the Termux environment during the backup restoration process. The flaw stems from the application trusting attacker-controlled extraction paths defined in the backup's manifest.json file, failing to validate archive members against directory traversal sequences during tar extraction, and using unsanitized backup names when constructing temporary directories. If a user restores a malicious backup archive from local storage, shared folders, GitHub, or Google Drive, an attacker can overwrite sensitive configuration files such as shell startup scripts or local binaries, resulting in arbitrary code execution under the privileges of the Termux user.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 2 hours ago•CVE-2026-129296
6.5

CVE-2026-129296: Path Traversal in SpamScope mail-parser Attachment Extraction

SpamScope mail-parser versions 3.8.0 prior to 4.6.0 contain a path traversal vulnerability (CWE-22) within the write_attachments() and write_sample() functions. The library passes untrusted attachment filenames directly into os.path.join() without stripping directory components, validating path containment, or verifying symbolic links. An attacker can send a crafted email containing relative path traversal sequences or absolute filesystem paths in the Content-Disposition header to write or overwrite arbitrary files accessible to the parsing process.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 3 hours ago•CVE-2026-129295
7.5

CVE-2026-129295: Polynomial Regular Expression Denial of Service (ReDoS) in SpamScope mail-parser

A Regular Expression Denial of Service (ReDoS) vulnerability exists in SpamScope mail-parser versions 4.2.0 prior to 4.6.1. Two separate regular expressions evaluated during standard email header parsing exhibit quadratic to cubic backtracking complexity when processing headers padded with whitespace or angle brackets. An unauthenticated remote attacker can exploit this flaw by sending a small, RFC-compliant email message, causing parsing worker threads or processes to stall at 100% CPU utilization for extended periods.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 4 hours ago•CVE-2026-129297
7.5

CVE-2026-129297: Sender IP Address Spoofing in SpamScope mail-parser

CVE-2026-129297 is an origin validation vulnerability (CWE-345) in the Python library mail-parser prior to version 4.6.2. The MailParser.get_server_ipaddress() method fails to properly isolate MTA-recorded client IP addresses from sender-controlled text within email Received headers. Due to naive substring delimiter matching, appearance-based regular expression scanning, and fail-open header traversal, remote attackers can spoof their originating IP address to bypass email security controls, blocklists, and anti-spam attribution.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 5 hours ago•CVE-2026-129299
6.5

CVE-2026-129299: Uncaught Exceptions and Silent Header Loss via Reflective Attribute Dispatch in SpamScope mail-parser

CVE-2026-129299 (GHSA-24mq-4vc6-2prf) is a parsing and serialization flaw in SpamScope mail-parser prior to version 4.6.2. The library uses reflective Python attribute resolution (getattr) over untrusted email header names and applies caller convenience transformations (such as underscore-to-hyphen folding and _json/_raw suffix stripping) directly to wire headers. An unauthenticated remote attacker can send crafted emails that trigger uncaught TypeError exceptions during JSON serialization or cause security-relevant headers and body content to be silently dropped without setting defect indicators.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 6 hours ago•CVE-2026-129236
7.2

CVE-2026-129236: Command-Line Argument Injection in Kubeshark MCP Server

CVE-2026-129236 is a command-line argument injection vulnerability (CWE-88) in Kubeshark, an eBPF-based network observability tool for Kubernetes. Located within the Model Context Protocol (MCP) server implementation in cmd/mcpRunner.go, the flaw occurs when handling the start_kubeshark tool request. When the MCP server runs with the --allow-destructive flag, the callStartKubeshark function appends the caller-supplied pod_regex parameter directly to the kubeshark tap argument slice without an end-of-options (--) delimiter. Because Kubeshark uses the Cobra and pflag libraries for command-line parsing, any pod_regex value prefixed with a hyphen is interpreted as a CLI flag rather than a positional regular expression. An attacker capable of influencing MCP tool arguments, such as through indirect prompt injection against a connected Large Language Model (LLM) agent, can inject the --set flag to override Helm chart values like tap.docker.registry. Because Kubeshark deploys its worker DaemonSet with privileged security contexts and host networking enabled, redirecting the container image registry allows arbitrary code execution as root across all Kubernetes cluster nodes.

Alon Barad
Alon Barad
6 views•11 min read