CVE-2026-48025: nebula-mesh: Decrypted CA private key persists in heap after signing
internal/pki/resolver.go:36-64 constructs a CAManager with the plaintext ed25519.PrivateKey after unwrapping via the master key; internal/pki/ca.go:13-16 stores it. Callers at internal/api/enroll.go:116, internal/api/updates.go:297, and internal/api/mobilebundle.go:40 use the manager for one Sign() and drop the reference on function return — but the underlying slice contents are not wiped before release.
Published Jun 10, 2026 · Updated Jun 26, 2026
Affected packages
github.com/juev/nebula-mesh
- Ecosystem
- Go
- Affected
- < 0.3.7
- Fixed in
- 0.3.7
- Check
go list -m github.com/juev/nebula-mesh
github.com/forgekeep/nebula-mesh
- Ecosystem
- Go
- Affected
- < 0.3.7
- Fixed in
- 0.3.7
- Check
go list -m github.com/forgekeep/nebula-mesh
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
internal/pki/resolver.go:36-64 constructs a CAManager with the plaintext ed25519.PrivateKey after unwrapping via the master key; internal/pki/ca.go:13-16 stores it. Callers at internal/api/enroll.go:116, internal/api/updates.go:297, and internal/api/mobile_bundle.go:40 use the manager for one Sign() and drop the reference on function return — but the underlying slice contents are not wiped before release.
The keystore package's contract (internal/keystore/keystore.go doc: *"Callers MUST zeroise the returned plaintext DEK as soon as it is no longer needed"*) is not met by the CAManager consumer. Decrypted CA private keys persist in process heap until Go's GC scavenges the underlying slice — minutes to hours under load, indefinitely on idle servers.
Affected
All released versions up to v0.3.6.
Threat model
Memory-read access: core dump, ptrace, kernel swap to disk, container/VM snapshot, OOM-debug bundle, side-channel via shared cache lines. Not a remote-network vulnerability, but defeats the master-key + envelope-encryption design's promise of "private key never lingers".
Suggested fix
Add a Wipe() method on CAManager:
// internal/pki/ca.go
func (m *CAManager) Wipe() {
if m == nil {
return
}
keystore.Zeroize(m.caKey)
}At each call site (enroll.go:116, updates.go:297, mobile_bundle.go:40, and any new caller), defer caMgr.Wipe() immediately after the Resolve() call. Pattern mirrors the existing defer keystore.Zeroize(dek) discipline in the keystore package.
Optional follow-up: wrap m.Sign() to zeroize after each call, removing the contract on callers — but the defer pattern is sufficient as a minimum.
Credited to ak2k.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-53603
nebula-mesh: Operator session tokens stored in plaintext in the database
high7.1Jul 14, 2026CVE-2026-53604
nebula-mesh: CA private key not zeroized on web mobile-bundle error paths
high8.7Jul 14, 2026CVE-2026-55512
nebula-mesh: Unauthenticated OIDC login endpoint allocates unbounded in-memory state entries without rate limiting
medium5.3Jul 14, 2026CVE-2026-55513
nebula-mesh: Web UI host creation ignores configured enrollment token TTL and mints 24-hour bearer enrollment tokens
medium5.4Jul 14, 2026CVE-2026-61699
nebula-mesh: Certificate revocation is never enforced at the mesh
high8.1Jul 14, 2026GHSA-7rx3-5wx3-5v76
Nebula-mesh allows non-admin operators to disable webhook SSRF protection via `allow_private`
high7.7Jul 14, 2026
