The Daily Byte
Breaking
Welcome to The Daily Byte — real stories from across Pakistan.
Sunday, 22 November 2026 · Pakistan

The Daily Byte

Stories from Pakistan that deserve to be heard

CVE-2026-115407: Crypto11 GCM Flaw Allows Forgeries

By The Daily Byte ·21 Nov 2026 ·4 min read
A hardware security module installed in a server rack

A critical flaw in crypto11, a Go library that lets applications talk to hardware security modules, could allow attackers to forge encrypted messages. Tracked as CVE-2026-115407 and published on 20 November, the vulnerability is scored 9.1 out of 10 under CVSS 4.0, the highest severity band.

Crypto11 is a low-level library that acts as a bridge between Go applications and hardware security modules, known as HSMs, or software tokens such as SoftHSM2. It lets programs manage cryptographic keys and perform encryption and decryption using the security of those physical or virtual devices. It is not an internet-facing service in its own right, but it can sit inside applications that are reachable over a network, and any application that passes user-influenced data through it is in scope.

How the flaw works

The bug is in the function SecretKey.NewGCM(), which returns the authenticated-encryption object used for AES-GCM encryption. It passes whatever nonce it is given straight to the underlying CK_GCM_PARAMS structure without checking its length against NonceSize(), and it accepts an empty nonce. In GCM mode the nonce, also called the initialisation vector or IV, must be unique for every encryption performed under the same key. Reusing one breaks the mode's security guarantees.

That is where the damage happens. On a token that accepts a zero-length IV, and SoftHSM2 does, every encryption call made with an empty nonce runs under the same IV. Reusing the IV reuses the keystream, and that exposes the GHASH authentication key, which is the secret that proves a message is genuine. An attacker who can influence the nonce values used by a vulnerable application can then create forged data that appears authentic. The weakness is recorded as improper input validation, nonce reuse and related flaws, under CWE-20, CWE-323 and CWE-1204.

There is a second defect in the same area. The configuration option UseGCMIVFromHSM sends a NULL IV with a length of zero to the token unless the companion control GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt is also set, leaving the token nowhere to write the IV it generates. With a non-empty nonce the operation panics after the plaintext has already been encrypted, and with an empty nonce it returns ciphertext encrypted under an empty IV without any error. On the older v1 line, the HSM-IV mode additionally never copies the token-generated IV back to the caller, so the caller keeps its own nonce while the data was encrypted under another one.

Who is affected

The flaw affects crypto11 v2 releases through 2.0.0-rc8, and the deprecated v1 module paths eclipse-keypont/crypto11 up to 1.6.8, ThalesGroup/crypto11 up to 1.7.0-rc1 and ThalesIgnite/crypto11 up to 1.2.5. The project's security advisory is GHSA-c2cp-4qw8-q4jg, and a fix commit has been published. The advisory does not report any exploitation in the wild, and because crypto11 is an internal library rather than a public-facing gateway, its direct internet exposure is low. The risk is real all the same for any application that feeds attacker-influenced data into the library while connected to a token that permits zero-length IVs.

What to do

Teams that use crypto11 should start by auditing their codebases for every place the library is imported, then check whether their HSM or token configuration permits zero-length IVs. The fix is to move to a patched release of the library, following the project's advisory, and to reject empty or incorrectly sized nonces before calling Seal. The UseGCMIVFromHSM option should be disabled unless the companion control is configured to provide storage for the token-generated IV. Because the flaw undermines the authentication of encrypted data, it should be treated as a high-priority item for the next maintenance window rather than left for a routine update cycle.