CVE-2026-48025: nebula-mesh Decrypted CA Private Key Persists Vulnerability

MODERATE
Advisory Identifier: GHSA-8h84-fhqq-q58v
CWE-244
Published
Advisory Summary

CVE-2026-48025 is a MODERATE decrypted ca private key persists vulnerability (CWE-244: Improper Clearing of Heap Memory Before Release ('Heap Inspection')) affecting nebula-mesh libraries in the Go ecosystem. The issue involves decrypted ca private key persists in heap after signing. Remediation is available by upgrading affected packages to version 0.3.7.

CVE-2026-48025 at a Glance

CVE Identifier CVE-2026-48025
GHSA Identifier GHSA-8h84-fhqq-q58v
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-244: Improper Clearing of Heap Memory Before Release ('Heap Inspection')
Affected Product nebula-mesh
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-48025

To remediate this vulnerability, upgrade all affected nebula-mesh dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/juev/nebula-mesh fixed: 0.3.7
Upgrade github.com/juev/nebula-mesh to 0.3.7
github.com/forgekeep/nebula-mesh fixed: 0.3.7
Upgrade github.com/forgekeep/nebula-mesh to 0.3.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/juev/nebula-mesh

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-48025, inspect your project dependencies for nebula-mesh:

inspect dependencies for github.com/juev/nebula-mesh

Analyze the terminal output to locate any version of nebula-mesh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-244: Improper Clearing of Heap Memory Before Release ('Heap Inspection'), where using realloc() to resize buffers that store sensitive information can leave the sensitive information exposed to attack, because it is not removed from memory. In nebula-mesh, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`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`: ```go // 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.

CVE-2026-48025 Affected nebula-mesh Versions

2 component(s)
Fixed Versions:
0.3.7
Product / Package Ecosystem Affected Versions Fixed Version
github.com/juev/nebula-mesh
Go
< 0.3.7
0.3.7
github.com/forgekeep/nebula-mesh
Go
< 0.3.7
0.3.7

References

Frequently Asked Questions

What is CVE-2026-48025?
CVE-2026-48025 is a security vulnerability in nebula-mesh involving Decrypted CA private key persists in heap after signing under CWE-244: Improper Clearing of Heap Memory Before Release ('Heap Inspection').
Which nebula-mesh versions are affected?
Affected versions include releases prior to 0.3.7 across affected packages: github.com/juev/nebula-mesh, github.com/forgekeep/nebula-mesh.
What version fixes CVE-2026-48025?
Upgrading to 0.3.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/juev/nebula-mesh affected?
Yes, github.com/juev/nebula-mesh is affected in releases prior to 0.3.7. Upgrade your dependency to 0.3.7 or later.
Is github.com/forgekeep/nebula-mesh affected?
Yes, github.com/forgekeep/nebula-mesh is affected in releases prior to 0.3.7. Upgrade your dependency to 0.3.7 or later.
What CWE is associated with CVE-2026-48025?
CVE-2026-48025 is classified under CWE-244: Improper Clearing of Heap Memory Before Release ('Heap Inspection') (Using realloc() to resize buffers that store sensitive information can leave the sensitive information exposed to attack, because it is not removed from memory.).
How can I check Go dependencies for CVE-2026-48025?
Run the dependency tree command: 'inspect dependencies for github.com/juev/nebula-mesh'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8h84-fhqq-q58v",
  "modified" : "2026-06-26T20:48:20Z",
  "published" : "2026-06-10T18:34:29Z",
  "aliases" : [ "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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juev/nebula-mesh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/forgekeep/nebula-mesh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juev/nebula-mesh/security/advisories/GHSA-8h84-fhqq-q58v"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/forgekeep/nebula-mesh/commit/bca1d5914fbaf3517d3b86145a802c00de4a8122"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/forgekeep/nebula-mesh/releases/tag/v0.3.7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juev/nebula-mesh"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-244" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-10T18:34:29Z",
    "nvd_published_at" : null
  }
}