CVE-2026-48025
JSON

6.9medium

nebula-mesh: Decrypted CA private key persists in heap after signing

Severity
6.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.29% (higher than 23% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8h84-fhqq-q58vGO-2026-5255

Description

nebula-mesh is a self-hosted control plane for Slack Nebula mesh virtual private network. Prior to version 0.3.7, 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. This issue has been patched in version 0.3.7.

Affected

Product or packageVersionsReported by
juev nebula-mesh< 0.3.7CVE List
github.com/juev/nebula-mesh (Go)before 0.3.7GitHub Advisory Database
github.com/forgekeep/nebula-mesh (Go)before 0.3.7GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium rating

Classification

CWE-244

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

nebula-mesh is a self-hosted control plane for Slack Nebula mesh virtual private network. Prior to version 0.3.7, 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. This issue has been patched in version 0.3.7.

GitHub Advisory Database

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.

Go Vulnerability Database

nebula-mesh: Decrypted CA private key persists in heap after signing in github.com/forgekeep/nebula-mesh

NVD (es)

nebula-mesh es un plano de control autoalojado para la red privada virtual de malla Slack Nebula. Antes de la versión 0.3.7, internal/pki/resolver.go:36-64 construye un CAManager con la clave privada ed25519.PrivateKey en texto plano después de desempaquetar a través de la clave maestra; internal/pki/ca.go:13-16 la almacena. Las funciones que llaman en internal/api/enroll.go:116, internal/api/updates.go:297, e internal/api/mobile_bundle.go:40 usan el gestor para una única operación Sign() y eliminan la referencia al retornar la función - pero el contenido del slice subyacente no se borra antes de su liberación. El contrato del paquete keystore (documentación de internal/keystore/keystore.go: ’Las funciones que llaman DEBEN poner a cero la DEK en texto plano devuelta tan pronto como ya no sea necesaria’) no es cumplido por el consumidor de CAManager. Las claves privadas de CA descifradas persisten en el heap del proceso hasta que el recolector de basura (GC) de Go recolecta el slice subyacente - de minutos a horas bajo carga, indefinidamente en servidores inactivos. Este problema ha sido parcheado en la versión 0.3.7.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-48025 changed 2026-07-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-8h84-fhqq-q58v changed 2026-06-26CC-BY-4.0
Go Vulnerability DatabaseGO-2026-5255 changed 2026-06-25CC-BY-4.0
NVDCVE-2026-48025 changed 2026-10-23Public domain