CVE-2026-47726: nebula-mesh GET /api/v1/audit-log Discloses All Entries Vulnerability

HIGH
Advisory Identifier: GHSA-qm33-p5p9-f8vg
CWE-285
Published
Advisory Summary

CVE-2026-47726 is a HIGH get /api/v1/audit-log discloses all entries vulnerability (CWE-285: Improper Authorization) affecting nebula-mesh libraries in the Go ecosystem. The issue involves get /api/v1/audit-log discloses all entries to any operator. Remediation is available by upgrading affected packages to version 0.3.2.

CVE-2026-47726 at a Glance

CVE Identifier CVE-2026-47726
GHSA Identifier GHSA-qm33-p5p9-f8vg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-285: Improper Authorization
Affected Product nebula-mesh
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-47726

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.2
Upgrade github.com/juev/nebula-mesh to 0.3.2
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-47726, 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.2), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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/api/audit.go:12` — `handleGetAuditLog` does no admin check. The route is bearer-auth gated only; any operator API key returns the full audit log via `store.ListAuditEntries` (up to limit=1000). This includes cross-tenant actor names, host/CA/operator IDs, action timestamps, and masked-IP entries from rate-limit refusals — enough surface for a tenant to enumerate the server's activity, infer staffing patterns, or identify high-value targets. ## Affected All released versions up to v0.3.1. ## Reproducer ``` curl -H "Authorization: Bearer <any-operator-key>" \ https://server/api/v1/audit-log?limit=1000 ``` ## Suggested fix Two options, either acceptable: 1. `if !actorIsAdmin(ctx) { 403 }` — strictest; matches the "operator management is admin-only" stance. 2. Scope to actor: filter `store.ListAuditEntries` by `actor.Username` plus a subquery of CA IDs the actor owns. Operators see their own audit entries plus entries against their CA's resources. Recommend option 1 unless the UI needs per-operator audit views. ## Suggested patch Verified locally: `go vet`, `go test -race -count=1 ./...`, `golangci-lint v2.12` all clean. ```diff diff --git a/internal/api/audit.go b/internal/api/audit.go index 3236631..57b57ce 100644 --- a/internal/api/audit.go +++ b/internal/api/audit.go @@ -10,6 +10,10 @@ import ( const defaultAuditLimit = 100 func (s *Server) handleGetAuditLog(w http.ResponseWriter, r *http.Request) { + if !actorIsAdmin(r.Context()) { + writeError(w, http.StatusForbidden, "audit log access requires the admin role") + return + } filter := store.AuditFilter{ Action: r.URL.Query().Get("action"), Limit: defaultAuditLimit, diff --git a/internal/api/audit_admin_test.go b/internal/api/audit_admin_test.go new file mode 100644 index 0000000..47e1ca4 --- /dev/null +++ b/internal/api/audit_admin_test.go @@ -0,0 +1,62 @@ +package api + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "net/http" + "net/http/httptest" + "testing" + + "github.com/google/uuid" + "github.com/juev/nebula-mesh/internal/models" +) + +// TestHandleGetAuditLog_NonAdminForbidden confirms a non-admin operator +// API key cannot read the audit log. The legacy config-key path stays +// admin and is covered by the happy-path test elsewhere. +func TestHandleGetAuditLog_NonAdminForbidden(t *testing.T) { + srv, _ := newTestServer(t) + + nonAdminKey := uuid.New().String() + keyHash := sha256.Sum256([]byte(nonAdminKey)) + if err := srv.store.CreateOperator(context.Background(), &models.Operator{ + ID: uuid.New().String(), Username: "non-admin", PasswordHash: "x", + Role: "user", Status: models.OperatorStatusActive, + }); err != nil { + t.Fatal(err) + } + op, err := srv.store.GetOperatorByUsername(context.Background(), "non-admin") + if err != nil { + t.Fatal(err) + } + if err := srv.store.CreateOperatorAPIKey(context.Background(), &models.OperatorAPIKey{ + ID: uuid.New().String(), OperatorID: op.ID, KeyHash: hex.EncodeToString(keyHash[:]), + }); err != nil { + t.Fatal(err) + } + + req := httptest.NewRequest("GET", "/api/v1/audit-log", nil) + req.Header.Set("Authorization", "Bearer "+nonAdminKey) + rec := httptest.NewRecorder() + srv.ServeHTTP(rec, req) + + if rec.Code != http.StatusForbidden { + t.Errorf("non-admin audit-log status = %d, want 403", rec.Code) + } +} + +// TestHandleGetAuditLog_LegacyKeyAllowed confirms the legacy config-key +// path still reaches the handler (preserves backward compatibility). +func TestHandleGetAuditLog_LegacyKeyAllowed(t *testing.T) { + srv, _ := newTestServer(t) + + req := httptest.NewRequest("GET", "/api/v1/audit-log", nil) + req.Header.Set("Authorization", "Bearer "+testAPIKey) + rec := httptest.NewRecorder() + srv.ServeHTTP(rec, req) + + if rec.Code == http.StatusForbidden { + t.Errorf("legacy key rejected with 403; want pass-through") + } +} ```

CVE-2026-47726 Affected nebula-mesh Versions

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

References

Frequently Asked Questions

What is CVE-2026-47726?
CVE-2026-47726 is a security vulnerability in nebula-mesh involving GET /api/v1/audit-log discloses all entries to any operator under CWE-285: Improper Authorization.
Which nebula-mesh versions are affected?
Affected versions include releases prior to 0.3.2 across affected packages: github.com/juev/nebula-mesh.
What version fixes CVE-2026-47726?
Upgrading to 0.3.2 (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.2. Upgrade your dependency to 0.3.2 or later.
What CWE is associated with CVE-2026-47726?
CVE-2026-47726 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-47726?
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-qm33-p5p9-f8vg",
  "modified" : "2026-06-08T23:35:55Z",
  "published" : "2026-06-08T23:35:55Z",
  "aliases" : [ "CVE-2026-47726" ],
  "summary" : "nebula-mesh: GET /api/v1/audit-log discloses all entries to any operator",
  "details" : "`internal/api/audit.go:12` — `handleGetAuditLog` does no admin check. The route is bearer-auth gated only; any operator API key returns the full audit log via `store.ListAuditEntries` (up to limit=1000). This includes cross-tenant actor names, host/CA/operator IDs, action timestamps, and masked-IP entries from rate-limit refusals — enough surface for a tenant to enumerate the server's activity, infer staffing patterns, or identify high-value targets.\n\n## Affected\nAll released versions up to v0.3.1.\n\n## Reproducer\n```\ncurl -H \"Authorization: Bearer <any-operator-key>\" \\\n  https://server/api/v1/audit-log?limit=1000\n```\n\n## Suggested fix\nTwo options, either acceptable:\n\n1. `if !actorIsAdmin(ctx) { 403 }` — strictest; matches the \"operator management is admin-only\" stance.\n2. Scope to actor: filter `store.ListAuditEntries` by `actor.Username` plus a subquery of CA IDs the actor owns. Operators see their own audit entries plus entries against their CA's resources.\n\nRecommend option 1 unless the UI needs per-operator audit views.\n\n## Suggested patch\n\nVerified locally: `go vet`, `go test -race -count=1 ./...`, `golangci-lint v2.12` all clean.\n\n```diff\ndiff --git a/internal/api/audit.go b/internal/api/audit.go\nindex 3236631..57b57ce 100644\n--- a/internal/api/audit.go\n+++ b/internal/api/audit.go\n@@ -10,6 +10,10 @@ import (\n const defaultAuditLimit = 100\n \n func (s *Server) handleGetAuditLog(w http.ResponseWriter, r *http.Request) {\n+\tif !actorIsAdmin(r.Context()) {\n+\t\twriteError(w, http.StatusForbidden, \"audit log access requires the admin role\")\n+\t\treturn\n+\t}\n \tfilter := store.AuditFilter{\n \t\tAction: r.URL.Query().Get(\"action\"),\n \t\tLimit:  defaultAuditLimit,\ndiff --git a/internal/api/audit_admin_test.go b/internal/api/audit_admin_test.go\nnew file mode 100644\nindex 0000000..47e1ca4\n--- /dev/null\n+++ b/internal/api/audit_admin_test.go\n@@ -0,0 +1,62 @@\n+package api\n+\n+import (\n+\t\"context\"\n+\t\"crypto/sha256\"\n+\t\"encoding/hex\"\n+\t\"net/http\"\n+\t\"net/http/httptest\"\n+\t\"testing\"\n+\n+\t\"github.com/google/uuid\"\n+\t\"github.com/juev/nebula-mesh/internal/models\"\n+)\n+\n+// TestHandleGetAuditLog_NonAdminForbidden confirms a non-admin operator\n+// API key cannot read the audit log. The legacy config-key path stays\n+// admin and is covered by the happy-path test elsewhere.\n+func TestHandleGetAuditLog_NonAdminForbidden(t *testing.T) {\n+\tsrv, _ := newTestServer(t)\n+\n+\tnonAdminKey := uuid.New().String()\n+\tkeyHash := sha256.Sum256([]byte(nonAdminKey))\n+\tif err := srv.store.CreateOperator(context.Background(), &models.Operator{\n+\t\tID: uuid.New().String(), Username: \"non-admin\", PasswordHash: \"x\",\n+\t\tRole: \"user\", Status: models.OperatorStatusActive,\n+\t}); err != nil {\n+\t\tt.Fatal(err)\n+\t}\n+\top, err := srv.store.GetOperatorByUsername(context.Background(), \"non-admin\")\n+\tif err != nil {\n+\t\tt.Fatal(err)\n+\t}\n+\tif err := srv.store.CreateOperatorAPIKey(context.Background(), &models.OperatorAPIKey{\n+\t\tID: uuid.New().String(), OperatorID: op.ID, KeyHash: hex.EncodeToString(keyHash[:]),\n+\t}); err != nil {\n+\t\tt.Fatal(err)\n+\t}\n+\n+\treq := httptest.NewRequest(\"GET\", \"/api/v1/audit-log\", nil)\n+\treq.Header.Set(\"Authorization\", \"Bearer \"+nonAdminKey)\n+\trec := httptest.NewRecorder()\n+\tsrv.ServeHTTP(rec, req)\n+\n+\tif rec.Code != http.StatusForbidden {\n+\t\tt.Errorf(\"non-admin audit-log status = %d, want 403\", rec.Code)\n+\t}\n+}\n+\n+// TestHandleGetAuditLog_LegacyKeyAllowed confirms the legacy config-key\n+// path still reaches the handler (preserves backward compatibility).\n+func TestHandleGetAuditLog_LegacyKeyAllowed(t *testing.T) {\n+\tsrv, _ := newTestServer(t)\n+\n+\treq := httptest.NewRequest(\"GET\", \"/api/v1/audit-log\", nil)\n+\treq.Header.Set(\"Authorization\", \"Bearer \"+testAPIKey)\n+\trec := httptest.NewRecorder()\n+\tsrv.ServeHTTP(rec, req)\n+\n+\tif rec.Code == http.StatusForbidden {\n+\t\tt.Errorf(\"legacy key rejected with 403; want pass-through\")\n+\t}\n+}\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juev/nebula-mesh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.3.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juev/nebula-mesh/security/advisories/GHSA-qm33-p5p9-f8vg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/forgekeep/nebula-mesh/commit/8baaace54c2a23e7c351b3efab5a31ab07b125dc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/forgekeep/nebula-mesh/releases/tag/v0.3.2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juev/nebula-mesh"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-08T23:35:55Z",
    "nvd_published_at" : null
  }
}