crypto11 GCM Nonce Reuse Enables Ciphertext Forgery (CVE-2026-115407)
crypto11 accepts empty AES-GCM nonces, exposing plaintext and allowing ciphertext forgery; fixed in v2.0.0-rc9, the v1 modules stay unpatched.
TL;DR
- crypto11 is a Go library for PKCS#11 tokens and hardware security modules. It passed any nonce to AES-GCM without checking its length, so an empty nonce encrypted every message under the same IV.
- Applications that call
NewGCM()and pass an empty or fixed nonce are exposed. The v2 module up to 2.0.0-rc8 and the deprecated v1 module paths up to their last releases are affected. - The Eclipse Foundation published CVE-2026-115407 at 16:10 UTC on 2026-11-20, rated CVSS v4.0 9.1 Critical. CISA's SSVC record marks a public proof of concept, no in-the-wild exploitation is known, and the CVE is not in KEV as of 2026-11-20.
- Upgrade to v2.0.0-rc9 or later and set
GCMIVLengthto the nonce size you use. The v1 module paths are deprecated and will not be patched.
Am I affected?
All of these must hold for an application to be exposed:
- It imports
github.com/eclipse-keypont/crypto11/v2at 2.0.0-rc8 or earlier, or one of the deprecated v1 module paths at its last release or earlier. - It calls
SecretKey.NewGCM()and passes an empty, fixed or otherwise repeated nonce; the API accepted any length, including zero. - Or it sets
UseGCMIVFromHSMwithoutSupplyIvForHSMGCMEncryptand passes an empty nonce. - The token accepts a zero-length GCM IV. SoftHSM2 does; whether another token does is vendor-specific.
A module pin alone does not prove exposure. The flaw is in the GCM wrapper, so a program that uses crypto11 only for signing or key management never reaches the vulnerable code. Teleport's go.mod pins github.com/ThalesIgnite/crypto11 v1.2.5, and Sigstore Fulcio's go.mod pins github.com/eclipse-keypont/crypto11 v1.6.8. Both pins are inside the affected ranges, so a dependency inventory will find them; a code review answers whether the GCM wrapper is used.
| Module path | Affected versions | Fixed version |
|---|---|---|
github.com/eclipse-keypont/crypto11/v2 |
2.0.0-rc8 and earlier | 2.0.0-rc9 |
github.com/eclipse-keypont/crypto11 |
1.6.8 and earlier | None, deprecated |
github.com/ThalesGroup/crypto11 |
1.7.0-rc1 and earlier | None, deprecated |
github.com/ThalesIgnite/crypto11 |
1.2.5 and earlier | None, deprecated |
The CVE record rates it CVSS v4.0 9.1 Critical. The vector is CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N. The record lists CWE-323, CWE-1204 and CWE-20. The GitHub advisory's CVSS v3.1 score is 7.4 High (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).
The fix shipped in v2.0.0-rc9 on 2026-10-21. The v1 module paths are deprecated and the advisory says they are not patched, including the HSM-IV copy-back defect. Check the modules your program builds:
go list -m all | grep crypto11
go mod graph | grep crypto11
Then find the GCM call sites and the configuration that controls them:
grep -rn "NewGCM()" --include="*.go" .
grep -rn "UseGCMIVFromHSM\|GCMIVLength" --include="*.go" --include="*.yaml" --include="*.json" .
If NewGCM() appears, read every Seal and Open call that uses the returned value and check the nonce length. An empty slice, a nil value or a fixed byte string is the exposure.
How do I fix it?
Upgrade to v2.0.0-rc9 or later, set the configured IV length to the nonce size the application uses, and rebuild.
- Move the module to the fixed release and tidy the build:
go get github.com/eclipse-keypont/crypto11/v2@v2.0.0-rc9
go mod tidy
go build ./...
- If the application passes 12-byte nonces, set
GCMIVLength: 12in the crypto11 configuration. The default is 16, and the fixedSealpanics when the nonce length differs fromNonceSize(). - If the application sets
UseGCMIVFromHSM, also setGCMIVFromHSMControl.SupplyIvForHSMGCMEncryptandSupplyIvForHSMGCMDecrypt, and pass a nonce buffer ofNonceSize()bytes. Without the encrypt buffer the token must append the IV to the ciphertext, and the fixed code checks that it did. - Migrate any v1 import to the v2 module. The v1 paths are deprecated, receive no fix, and keep the HSM-IV copy-back defect.
If the upgrade has to wait, pass a fresh random nonce of exactly NonceSize() bytes to every Seal and Open call and reject any other length before the call. Do not use UseGCMIVFromHSM on the v1.6.x line. This workaround protects the call sites you change; it does not fix the library for other callers in the same program.
What is the root cause?
crypto11 never compared the nonce length with the AEAD's NonceSize(). An empty nonce reached the token as a zero-length GCM IV, and every message was encrypted under the same IV.
The library wraps a PKCS#11 token in Go's cipher.AEAD interface. NewGCM() records the configured IV length as the AEAD's NonceSize(), then builds each mechanism parameter block from the nonce the caller supplied. The vulnerable code is in aead.go at commit eb2806e, before the fix:
func (key *SecretKey) NewGCM() (cipher.AEAD, error) {
if key.Cipher.GCMMech == 0 {
return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType)
}
g := genericAead{
key: key,
overhead: 16,
nonceSize: key.context.cfg.GCMIVLength,
makeMech: func(nonce []byte, additionalData []byte, encrypt bool) (*pkcs11.Mechanism, *pkcs11.GCMParams, error) {
var params *pkcs11.GCMParams
if (encrypt && key.context.cfg.UseGCMIVFromHSM &&
!key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt) || (!encrypt &&
key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMDecrypt) {
params = pkcs11.NewGCMParams(nil, additionalData, 16*8 /*bits*/)
} else {
params = pkcs11.NewGCMParams(nonce, additionalData, 16*8 /*bits*/)
}
return pkcs11.NewMechanismWithParams(key.Cipher.GCMMech, params), params, nil
},
}
return g, nil
}
NewGCM() sets nonceSize from GCMIVLength, which defaults to 16 bytes. The makeMech closure then passes the caller's nonce to pkcs11.NewGCMParams as the IV, or passes nil when the token is configured to generate the IV. Seal never checks the nonce against nonceSize:
func (g genericAead) Seal(dst, nonce, plaintext, additionalData []byte) []byte {
var result []byte
if err := g.key.context.withSession(func(session *pkcs11Session) (err error) {
mech, params, err := g.makeMech(nonce, additionalData, true)
if err = session.ctx.EncryptInit(session.handle, mech, g.key.handle); err != nil {
err = fmt.Errorf("C_EncryptInit: %w", err)
return
}
if result, err = session.ctx.Encrypt(session.handle, plaintext); err != nil {
err = fmt.Errorf("C_Encrypt: %w", err)
return
}
if g.key.context.cfg.UseGCMIVFromHSM {
hsmIV := params.IV()
if len(nonce) != len(hsmIV) {
return errBadGCMNonceSize
}
copy(nonce, hsmIV)
}
return
}); err != nil {
panic(err)
}
dst = append(dst, result...)
return dst
}
Three paths follow from those lines. With the default configuration the nonce goes to the token as the IV, and a zero-length nonce is a zero-length IV. In HSM-IV mode without an IV buffer, params.IV() is nil after encryption. An empty nonce passes the length check, copies nothing, and returns ciphertext under the empty IV. A non-empty nonce fails after the plaintext was already encrypted, and Seal panics. On the v1 line, HSM-IV mode never copies the token-generated IV back at all.
How is it exploited?
An attacker who can observe the ciphertexts of an application that reuses an IV recovers the XOR of the plaintexts. Through the exposed GHASH key, the attacker can forge a ciphertext that Open accepts.
- The application calls
NewGCM()and thenSealwith an empty or fixed nonce, so the token encrypts every message under the same IV. - The attacker observes two or more ciphertexts produced under that IV, from the network, a log, a backup or a storage bucket.
- The attacker XORs the ciphertexts and recovers the XOR of the plaintexts, which exposes structure and repeated content.
- The repeated IV also exposes the GHASH authentication key, and the attacker uses it to compute a valid tag for a ciphertext of their choosing.
Openaccepts the forged ciphertext because the tag verifies under the recovered key.
The advisory states this chain and cites Joux's analysis of GCM authentication failures. It publishes no exploit script. CISA's Vulnrichment record marks Exploitation: poc, and the fix's regression tests reproduce the empty-nonce and HSM-IV paths. No in-the-wild exploitation is known as of 2026-11-20.
See "Am I affected?" for the exposure conditions. In caller-managed IV mode, passing a fresh random nonce of the configured length avoids the reuse described here.
How does the attack flow?
The application supplies an empty nonce, and crypto11 forwards it to the token as a zero-length IV. Every message is encrypted under the same IV, and an observer turns that reuse into plaintext recovery and ciphertext forgery.
with no length check"] B --> C["SoftHSM2 accepts a zero-length IV"] C --> D["Every message uses the same IV"] D --> E["Observer XORs ciphertexts
and recovers plaintext"] E --> F["GHASH key recovered
forged ciphertext accepted by Open"]
What can an attacker do?
IV reuse compromises confidentiality and message integrity. Separately, the application can crash if it calls Seal with a non-empty nonce in HSM-IV mode without an IV buffer.
- Recover plaintext. Two ciphertexts under the same IV XOR to the XOR of their plaintexts. Repetition, known fields and structured data then expose the content.
- Forge ciphertexts. The same reuse exposes the GHASH authentication key. The attacker can compute a valid tag for a message of their choosing, and
Openaccepts it. - Cause a denial of service. In HSM-IV mode without an IV buffer, a non-empty nonce makes
Sealpanic after the plaintext has already been encrypted, which terminates the process.
The conditions are listed in full here. The application must call NewGCM() and pass an empty, fixed or repeated nonce; an empty nonce is the clearest case. The token must accept a zero-length IV; SoftHSM2 does, and the advisory says whether another token does is vendor-specific. The attacker must be able to observe ciphertexts. No authentication or network position on the host is required beyond that observation, which is why a shared network, a log pipeline or a storage reader matters.
Why does the fix work?
The fix makes the AEAD enforce its own nonce contract. It also checks that a token which is supposed to generate the IV actually did, so a short or empty nonce can no longer reach the cipher.
+var errGCMNonceLength = errors.New("crypto11: incorrect nonce length given to GCM")
+var errGCMIVNotGenerated = errors.New("crypto11: UseGCMIVFromHSM is set but the token did not generate a GCM IV")
+const minGCMNonceSize = 12
+
func (key *SecretKey) NewGCM() (cipher.AEAD, error) {
if key.Cipher.GCMMech == 0 {
return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType)
}
+ if n := key.context.cfg.GCMIVLength; n < minGCMNonceSize {
+ return nil, fmt.Errorf("GCMIVLength %d is too short: GCM IVs must be at least %d bytes", n, minGCMNonceSize)
+ }
@@
func (g genericAead) Seal(dst, nonce, plaintext, additionalData []byte) []byte {
+ hsmIV := g.key.context.cfg.UseGCMIVFromHSM
+ supplied := g.ivSupplied(true)
+ if len(nonce) != g.nonceSize && (supplied || len(nonce) != 0) {
+ panic(errGCMNonceLength)
+ }
@@
if hsmIV {
- hsmIV := params.IV()
- if len(nonce) != len(hsmIV) {
- return errBadGCMNonceSize
+ if supplied {
+ iv := params.IV()
+ if len(nonce) != len(iv) {
+ return errBadGCMNonceSize
+ }
+ if bytes.Equal(iv, nonce) {
+ return errGCMIVNotGenerated
+ }
+ copy(nonce, iv)
+ } else if len(result) != len(plaintext)+g.overhead+g.nonceSize {
+ return errGCMIVNotGenerated
}
- copy(nonce, hsmIV)
}
The new length check in Seal rejects every nonce that is not NonceSize() bytes, except the one documented case where the token generates the IV and no buffer is supplied. Open gets the same check for the supplied-IV case. NewGCM refuses an IV length shorter than 12 bytes, the 96-bit length NIST recommends. In HSM-IV mode the fix requires the token to write a different IV into the buffer and copy it back. Otherwise the token must append the IV to the ciphertext, so ciphertext under a fixed or empty IV is never returned.
The fix closes the GCM paths in the v2 module. It is not complete across the ecosystem: the three deprecated v1 module paths are not patched, including the HSM-IV copy-back defect, and the advisory tells their users to migrate. The same v2.0.0-rc9 release also fixes two Medium key-binding issues, GHSA-7842-qc22-qh4x and GHSA-2xw8-72pq-h8wg, which are separate from this CVE.
How do I check if I was compromised?
No indicators of compromise are published for this flaw, and a successful forgery leaves no error: Open returns the attacker's plaintext as if it were legitimate. The checks are therefore code and configuration reviews, not log searches.
- Find every
NewGCM()call and inspect the nonce passed toSealandOpen:
grep -rn "NewGCM()" --include="*.go" .
grep -rn "\.Seal(\|\.Open(" --include="*.go" .
- Look for an empty or fixed nonce at those call sites:
nil,[]byte{},make([]byte, 0), a package-level constant, or a buffer that is reused across messages. - Check the crypto11 configuration for
UseGCMIVFromHSMandGCMIVLength, and check whetherSupplyIvForHSMGCMEncryptis set. - If the program uses SoftHSM2, treat an empty nonce as a real IV-reuse event. If it uses another token, confirm with the vendor whether it accepts a zero-length GCM IV.
A failed forgery looks like a normal authentication failure, so a log entry alone does not distinguish an attack from corruption. If you find an empty nonce in production code, rotate any data keys that were used with it and re-encrypt the affected ciphertexts.
Timeline
The fix shipped 30 days before the CVE was published.
- 2026-10-21: crypto11 v2.0.0-rc9 released with the fix, commit
8d99b73cand pull request #172. - 2026-10-22: GitHub advisory GHSA-c2cp-4qw8-q4jg published.
- 2026-11-20 16:10 UTC: CVE-2026-115407 published by the Eclipse Foundation.
- 2026-11-20 18:35 UTC: CISA's SSVC record marks Exploitation: poc.
- 2026-11-20: No in-the-wild exploitation is known.
FAQ
Does the flaw affect every crypto11 user?
No. It affects programs that call SecretKey.NewGCM() and pass an empty, fixed or repeated nonce. A program that uses crypto11 only for signing, key generation or certificate handling does not reach the vulnerable code.
Is there a public exploit?
CISA's Vulnrichment record marks Exploitation: poc as of 2026-11-20, and the advisory's regression tests reproduce the empty-nonce and HSM-IV paths. The advisory publishes no exploit script, and no in-the-wild exploitation is known.
What happens if I pass a 12-byte nonce to the fixed version?
The fixed Seal panics unless the nonce length equals NonceSize(). The default GCMIVLength is 16, so an application that uses 12-byte nonces must set GCMIVLength: 12 before calling NewGCM(). A 12-byte random nonce is cryptographically fine; the length must simply match the configuration.
Are the v1 modules fixed?
No. The advisory marks the v1 module paths as deprecated and unpatched, and the fix commit only changes the v2 module. Teleport pins github.com/ThalesIgnite/crypto11 v1.2.5, which is in the affected range and has no fixed v1 release. Its maintainers must migrate to v2 to pick up the fix.
Is CVE-2026-115407 in CISA KEV?
No. CISA's KEV catalog has no entry for CVE-2026-115407 as of 2026-11-20. CISA's SSVC record says Exploitation: poc, which is under the active-exploitation threshold the KEV catalog records.
Does the fix change the ciphertext format?
No. The fix changes which nonces are accepted, not how AES-GCM produces ciphertext. Existing ciphertexts remain decryptable with the nonce they were created with. The behavior change is that a wrong-length nonce now panics in Seal and returns an error from Open.
Find crypto11 pins in your Go modules with Ostorlab
Ostorlab's software composition analysis and SBOM inventory the third-party modules in your repositories, including Go modules. That lets you find crypto11 pins in the affected ranges and track the upgrade to v2.0.0-rc9. Inventory your dependencies with Ostorlab.
References
- Eclipse Foundation, "AES-GCM
Sealaccepts nonces of any length, including empty, leading to IV reuse;UseGCMIVFromHSMsends no IV buffer by default", GHSA-c2cp-4qw8-q4jg, published 2026-10-22. https://github.com/eclipse-keypont/crypto11/security/advisories/GHSA-c2cp-4qw8-q4jg (checked November 20, 2026) - Eclipse Foundation, "CVE-2026-115407", published 2026-11-20. https://www.cve.org/CVERecord?id=CVE-2026-115407 (checked November 20, 2026)
- crypto11, fix commit
8d99b73c721c173ad85c0ca4e063c3da360a611d, "fix: harden key-pair pairing, ML-KEM, AES-GCM and RSA; bump pkcs11-go to v1.2.0-rc4 (#172)", 2026-10-21. https://github.com/eclipse-keypont/crypto11/commit/8d99b73c721c173ad85c0ca4e063c3da360a611d (checked November 20, 2026) - crypto11, pull request #172. https://github.com/eclipse-keypont/crypto11/pull/172 (checked November 20, 2026)
- crypto11, release v2.0.0-rc9, 2026-10-21. https://github.com/eclipse-keypont/crypto11/releases/tag/v2.0.0-rc9 (checked November 20, 2026)
- crypto11, vulnerable
aead.goat commiteb2806e. https://github.com/eclipse-keypont/crypto11/blob/eb2806e/aead.go (checked November 20, 2026) - NIST, "Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", SP 800-38D. https://csrc.nist.gov/pubs/sp/800/38/d/final (checked November 20, 2026)
- Antoine Joux, "Authentication Failures in NIST version of GCM", 2006. https://csrc.nist.gov/csrc/media/projects/block-cipher-techniques/documents/bcm/comments/800-38-series-drafts/gcm/joux_comments.pdf (checked November 20, 2026)
- CISA, Known Exploited Vulnerabilities catalog. https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 20, 2026)
- Teleport,
go.modon the default branch, pinninggithub.com/ThalesIgnite/crypto11v1.2.5. https://github.com/gravitational/teleport/blob/master/go.mod (checked November 20, 2026) - Sigstore Fulcio,
go.modon the default branch, pinninggithub.com/eclipse-keypont/crypto11v1.6.8. https://github.com/sigstore/fulcio/blob/main/go.mod (checked November 20, 2026)