CVE-2026-6330
wolfSSL vulnerability analysis and mitigation

Overview

CVE-2026-6330 is a cryptographic implementation flaw in wolfSSL's ML-KEM (Module-Lattice-Based Key Encapsulation Mechanism) ARM64 NEON code path, where the ciphertext comparison function only evaluates half of the input during decapsulation. This breaks the Fujisaki-Okamoto (FO) transform's implicit rejection mechanism, weakening IND-CCA2 (Indistinguishability under Chosen Ciphertext Attack) security guarantees. The vulnerability affects wolfSSL versions 5.7.4 through 5.9.1 and was disclosed on June 25, 2026. It carries a CVSS v3.1 score of 6.5 (Medium) and a CVSS v4.0 score of 6.3 (Medium) (GitHub Advisory, wolfSSL PR).

Technical details

The root cause is classified as CWE-327 (Use of a Broken or Risky Cryptographic Algorithm), specifically a defect in the mlkem_cmp_neon function within wolfcrypt/src/port/arm/armv8-mlkem-asm.S and its C mirror in armv8-mlkem-asm_c.c. The NEON reduction step failed to fold the upper 64 bits of the comparison result into the lower 64 bits before the scalar check, causing the constant-time comparison to silently ignore the second half of the re-encrypted ciphertext. As a result, a decapsulating party running on ARM64 hardware with NEON enabled could accept a manipulated ciphertext that should have triggered implicit rejection under FIPS 203 (ML-KEM standard) requirements. The fix, merged in PR #10192, adjusts the NEON reduction logic and adds a regression test (test_mlkem.c) that tampers with the ciphertext and verifies FO rejection is correctly triggered (wolfSSL PR).

Impact

Successful exploitation allows an unauthenticated network attacker to submit a manipulated ciphertext that bypasses decapsulation validation, causing the decapsulating party to derive and use an incorrect shared secret without triggering the required implicit rejection. This undermines the confidentiality and integrity of key exchange sessions protected by ML-KEM on ARM64 NEON code paths, potentially enabling key recovery or session hijacking attacks against post-quantum cryptographic communications. Availability is not impacted, but the weakened IND-CCA2 guarantee could expose encrypted data to an active adversary capable of crafting and submitting chosen ciphertexts (GitHub Advisory, wolfSSL PR).

Exploitation steps

  1. Identify target: Locate a service or application using wolfSSL versions 5.7.4–5.9.1 compiled for ARM64 with NEON and ML-KEM (--enable-armasm --enable-mlkem) enabled.
  2. Initiate key exchange: Engage the target in a post-quantum key encapsulation exchange using ML-KEM, obtaining a legitimate ciphertext from the encapsulation step.
  3. Craft manipulated ciphertext: Modify the second half of the ciphertext bytes (the portion ignored by the flawed NEON comparison), while keeping the first half intact to pass the partial comparison check.
  4. Submit manipulated ciphertext: Send the crafted ciphertext to the decapsulating party. Due to the incomplete comparison, the FO implicit rejection is not triggered, and the decapsulator proceeds with an incorrect shared secret.
  5. Exploit derived key material: Use knowledge of the manipulation to infer or recover the shared secret, enabling decryption of session traffic or further cryptanalytic attacks against the key exchange (wolfSSL PR, GitHub Advisory).

Mitigation and workarounds

wolfSSL has released version 5.9.2 which contains the fix for this vulnerability; users should upgrade immediately from any affected version (5.7.4–5.9.1) (wolfSSL Security, wolfSSL PR). The patch corrects the NEON reduction logic in mlkem_cmp_neon to properly fold upper 64-bit comparison results before the scalar check, restoring full ciphertext comparison. As a short-term workaround for systems that cannot immediately upgrade, disabling the ARM64 NEON ML-KEM code path (by not using --enable-armasm --enable-mlkem together on AArch64 builds) would avoid the vulnerable code path. Administrators should also audit any systems that used wolfSSL's ML-KEM on ARM64 for potential past exposure, as the weakened IND-CCA2 security may have been exploitable during the affected version window.

Community reactions

Cryptographer Daniel J. Bernstein (djb) commented on the vulnerability via Mastodon (mastodon.cr.yp.to) and published a blog post on July 4, 2026 at blog.cr.yp.to/20260704-bugs.html discussing the bug in the context of post-quantum cryptography implementation quality. The CVE was noted to have been credited to Anthropic (AI-assisted discovery), with a related GitHub repository (patrickmgarrity/Anthropic-Credited-CVEs) tracking the finding. The vulnerability received coverage on standard CVE tracking platforms and was picked up by Debian packaging maintainers, who submitted wolfSSL 5.9.2-1 to the Debian NEW queue shortly after disclosure.

Additional resources


SourceThis report was generated using AI

Related wolfSSL vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-6330MEDIUM6.3
  • wolfSSL logowolfSSL
  • wolfssl
NoYesJun 25, 2026
CVE-2026-8720MEDIUM5.9
  • wolfSSL logowolfSSL
  • wolfssl
NoYesJun 25, 2026
CVE-2026-7511MEDIUM5.9
  • wolfSSL logowolfSSL
  • cpe:2.3:a:wolfssl:wolfssl
NoYesJun 25, 2026
CVE-2026-7532MEDIUM5.7
  • wolfSSL logowolfSSL
  • wolfssl
NoYesJun 25, 2026
CVE-2026-6331LOW2.1
  • wolfSSL logowolfSSL
  • cpe:2.3:a:wolfssl:wolfssl
NoYesJun 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management