{"id":"CVE-2026-48025","aliases":["GHSA-8h84-fhqq-q58v","GO-2026-5255"],"url":"https://o3.security/vulnerability/CVE-2026-48025","summary":"nebula-mesh: Decrypted CA private key persists in heap after signing","details":"`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.\n\nThe 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.\n\n## Affected\nAll released versions up to v0.3.6.\n\n## Threat model\nMemory-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\".\n\n## Suggested fix\nAdd a `Wipe()` method on `CAManager`:\n\n```go\n// internal/pki/ca.go\nfunc (m *CAManager) Wipe() {\n    if m == nil {\n        return\n    }\n    keystore.Zeroize(m.caKey)\n}\n```\n\nAt 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.\n\nOptional follow-up: wrap `m.Sign()` to zeroize after each call, removing the contract on callers — but the `defer` pattern is sufficient as a minimum.","published":"2026-07-28T17:40:37.329Z","modified":"2026-10-21T02:58:17.114282088Z","cvss":null,"epss":{"score":0.00292,"percentile":0.21848,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/juev/nebula-mesh","fixedVersion":"0.3.7"},{"ecosystem":"Go","name":"github.com/forgekeep/nebula-mesh","fixedVersion":"0.3.7"}],"fix":{"url":"https://github.com/forgekeep/nebula-mesh/commit/bca1d5914fbaf3517d3b86145a802c00de4a8122","label":"forgekeep/nebula-mesh@bca1d59"},"references":[{"type":"WEB","url":"https://github.com/forgekeep/nebula-mesh/releases/tag/v0.3.7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48025.json"},{"type":"ADVISORY","url":"https://github.com/forgekeep/nebula-mesh/security/advisories/GHSA-8h84-fhqq-q58v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48025"},{"type":"FIX","url":"https://github.com/forgekeep/nebula-mesh/commit/bca1d5914fbaf3517d3b86145a802c00de4a8122"},{"type":"WEB","url":"https://github.com/juev/nebula-mesh/security/advisories/GHSA-8h84-fhqq-q58v"},{"type":"PACKAGE","url":"https://github.com/juev/nebula-mesh"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-21T02:58:17.114282088Z"}}