CVE-2026-47724: nebula-mesh API Endpoints Lack Ownership Checks, Vulnerability

CRITICAL
Advisory Identifier: GHSA-598g-h2vc-h5vg
CVSS 9.9
CWE-862
Published
Advisory Summary

CVE-2026-47724 is a CRITICAL (CVSS 9.9) api endpoints lack ownership checks, vulnerability (CWE-862: Missing Authorization) affecting nebula-mesh libraries in the Go ecosystem. The issue involves api endpoints lack ownership checks, enabling cross-operator privilege escalation. Remediation is available by upgrading affected packages to version 0.3.4.

CVE-2026-47724 at a Glance

CVE Identifier CVE-2026-47724
GHSA Identifier GHSA-598g-h2vc-h5vg
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-862: Missing Authorization
Affected Product nebula-mesh
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-47724

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.4
Upgrade github.com/juev/nebula-mesh to 0.3.4
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-47724, 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.4), 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-862: Missing Authorization, where the product does not perform 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

The `/api/v1/*` route surface trusts the bearer token alone for authorisation on most endpoints. The codebase itself admits this at `internal/api/hosts.go:384`: *"API trusts the bearer token for authorisation; per-CA ownership is enforced only in the Web layer."* The Web UI gates state-changing routes through `loadAccessibleCA` (`internal/web/cas.go`); CA-management endpoints in `internal/api/cas.go` ALSO have proper `canAccessCA` gates. **The gap is on the host, network, firewall, mobile-bundle, and most operator endpoints.** Combined with the per-operator CA model from ADR 0002, this gives any non-admin operator API key broad cross-tenant access — instant privilege escalation in the worst case. ## Affected All released versions prior to v0.3.4. ## Exploit chain ### A) Mint admin API key from any operator key (instant privilege escalation) `internal/api/operators.go:118` — `handleCreateOperatorAPIKey` does no admin check and no actor/target-operator ownership check. Any operator key can call it for any operator (including admins) and receive a fresh bearer. ``` curl -X POST -H "Authorization: Bearer <low-priv-key>" \ https://server/api/v1/operators/<admin-id>/api-keys \ -H 'Content-Type: application/json' -d '{"name":"oops"}' # Returns: {"key":"<32-byte admin bearer>","entry":{...}} ``` Reuse the returned key for subsequent requests → full admin. ### B) Cross-operator host takeover via reenroll `internal/api/hosts.go:321,330` → `mintEnrollmentTokenForHost`. Looks up host by URL param, mints a single-use enrollment token, returns it. No ownership check. ``` curl -X POST -H "Authorization: Bearer <low-priv-key>" \ https://server/api/v1/hosts/<victim-host-id>/reenroll # Returns: {"enrollment_token":"<uuid>",...} ``` Caller POSTs `/api/v1/enroll` with their own X25519 + Ed25519 keypairs. `enroll.go:175` overwrites `signing_pub_pem`; `SaveCertificateAndEnrollHost` overwrites the cert. Legitimate agent's next signed poll fails `bad_signature`. Attacker now owns the victim's Nebula identity. ### C) Cross-tenant CRUD on hosts, networks, firewall The same gap applies across: - `/api/v1/hosts*` — create, list, get, update, delete, block, unblock - `/api/v1/networks*` — create, list, get - `/api/v1/networks/{id}/firewall` — get, PUT - `/api/v1/hosts/{id}/mobile-bundle` (already filed as public issue #119) All trust bearer-auth alone. Any operator can read or mutate any other operator's resources. ## Affected operator-management handlers (in addition to A) Beyond `handleCreateOperatorAPIKey` (covered by A), `internal/api/operators.go` is missing admin gates on: - `handleListOperators` (line 66) — operator roster info disclosure - `handleDisableOperator` (line 79) — DoS / sabotage - `handleEnableOperator` (line 94) — re-enable disabled operators - `handleRevokeOperatorAPIKey` (line 157) — invalidate any operator's API keys - `handleListOperatorAPIKeys` (line 173) — API-key metadata disclosure `handleCreateOperator` (line 26) IS properly gated (`actorIsAdmin` at line 27). ## NOT affected (verified) `internal/api/cas.go` properly gates every CA endpoint via `canAccessCA` (calls at lines 70, 176, 216) and admin shortcuts at lines 39, 82. An earlier description draft mistakenly listed `/api/v1/cas/{id}/rotate` as affected — that endpoint is properly protected. CAs are not in this gap. ## Impact - Any non-admin operator → admin via one curl (A). - Any non-admin operator → ownership of any victim's hosts with cert + identity transfer (B). - Mass cross-tenant CRUD including firewall-rule mutation (C). - Any operator → disable/enable other operators, revoke their API keys, enumerate the operator roster. CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H — 9.6. ## Suggested fix Shared helpers in a new `internal/api/authz.go`, mirroring the Web layer's `loadAccessibleCA`: ```go func (s *Server) requireAdmin(w http.ResponseWriter, r *http.Request) bool func (s *Server) requireOperatorAccess(w http.ResponseWriter, r *http.Request, operatorID string) bool func (s *Server) requireHostAccess(w http.ResponseWriter, r *http.Request, hostID string) (*models.Host, bool) func (s *Server) requireNetworkAccess(w http.ResponseWriter, r *http.Request, networkID string) (*models.Network, bool) ``` Each loads the resource, resolves its CA via `*.CAID`, accepts if `actorIsAdmin(ctx)` OR actor owns the CA. Reject `403 forbidden`; audit-log `api.<resource>.forbidden` with the reason. The operator-management endpoints take `requireAdmin` instead (operator ownership doesn't map to CA ownership). Apply at the top of every host-, network-, firewall-, mobile-bundle-touching API handler, plus the 5 operator endpoints listed above. The legacy config-key path retains admin (preserves backward compatibility); the broader legacy-fallback question is tracked separately as issue #121. ## Test matrix - admin → all operations permitted - owning non-admin → operations on owned hosts/networks permitted - non-owner non-admin → 403 + audit entry - legacy config-key → preserved (admin) - unauthenticated → existing 401 from middleware ## Coordinated context Subsumes public issue #119 (mobile-bundle authz). Issue #121 (actor.go:40 legacy-admin fallback) is a separate concern tracked independently.

CVE-2026-47724 Affected nebula-mesh Versions

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

References

Frequently Asked Questions

What is CVE-2026-47724?
CVE-2026-47724 is a security vulnerability in nebula-mesh involving API endpoints lack ownership checks, enabling cross-operator privilege escalation under CWE-862: Missing Authorization.
Which nebula-mesh versions are affected?
Affected versions include releases prior to 0.3.4 across affected packages: github.com/juev/nebula-mesh.
What version fixes CVE-2026-47724?
Upgrading to 0.3.4 (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.4. Upgrade your dependency to 0.3.4 or later.
What is the CVSS score of CVE-2026-47724?
CVE-2026-47724 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-47724?
CVE-2026-47724 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-47724?
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-598g-h2vc-h5vg",
  "modified" : "2026-06-08T23:09:02Z",
  "published" : "2026-06-08T23:09:02Z",
  "aliases" : [ "CVE-2026-47724" ],
  "summary" : "nebula-mesh: API endpoints lack ownership checks, enabling cross-operator privilege escalation",
  "details" : "The `/api/v1/*` route surface trusts the bearer token alone for authorisation on most endpoints. The codebase itself admits this at `internal/api/hosts.go:384`: *\"API trusts the bearer token for authorisation; per-CA ownership is enforced only in the Web layer.\"*\n\nThe Web UI gates state-changing routes through `loadAccessibleCA` (`internal/web/cas.go`); CA-management endpoints in `internal/api/cas.go` ALSO have proper `canAccessCA` gates. **The gap is on the host, network, firewall, mobile-bundle, and most operator endpoints.** Combined with the per-operator CA model from ADR 0002, this gives any non-admin operator API key broad cross-tenant access — instant privilege escalation in the worst case.\n\n## Affected\nAll released versions prior to v0.3.4.\n\n## Exploit chain\n\n### A) Mint admin API key from any operator key (instant privilege escalation)\n`internal/api/operators.go:118` — `handleCreateOperatorAPIKey` does no admin check and no actor/target-operator ownership check. Any operator key can call it for any operator (including admins) and receive a fresh bearer.\n\n```\ncurl -X POST -H \"Authorization: Bearer <low-priv-key>\" \\\n  https://server/api/v1/operators/<admin-id>/api-keys \\\n  -H 'Content-Type: application/json' -d '{\"name\":\"oops\"}'\n# Returns: {\"key\":\"<32-byte admin bearer>\",\"entry\":{...}}\n```\n\nReuse the returned key for subsequent requests → full admin.\n\n### B) Cross-operator host takeover via reenroll\n`internal/api/hosts.go:321,330` → `mintEnrollmentTokenForHost`. Looks up host by URL param, mints a single-use enrollment token, returns it. No ownership check.\n\n```\ncurl -X POST -H \"Authorization: Bearer <low-priv-key>\" \\\n  https://server/api/v1/hosts/<victim-host-id>/reenroll\n# Returns: {\"enrollment_token\":\"<uuid>\",...}\n```\n\nCaller POSTs `/api/v1/enroll` with their own X25519 + Ed25519 keypairs. `enroll.go:175` overwrites `signing_pub_pem`; `SaveCertificateAndEnrollHost` overwrites the cert. Legitimate agent's next signed poll fails `bad_signature`. Attacker now owns the victim's Nebula identity.\n\n### C) Cross-tenant CRUD on hosts, networks, firewall\nThe same gap applies across:\n- `/api/v1/hosts*` — create, list, get, update, delete, block, unblock\n- `/api/v1/networks*` — create, list, get\n- `/api/v1/networks/{id}/firewall` — get, PUT\n- `/api/v1/hosts/{id}/mobile-bundle` (already filed as public issue #119)\n\nAll trust bearer-auth alone. Any operator can read or mutate any other operator's resources.\n\n## Affected operator-management handlers (in addition to A)\nBeyond `handleCreateOperatorAPIKey` (covered by A), `internal/api/operators.go` is missing admin gates on:\n- `handleListOperators` (line 66) — operator roster info disclosure\n- `handleDisableOperator` (line 79) — DoS / sabotage\n- `handleEnableOperator` (line 94) — re-enable disabled operators\n- `handleRevokeOperatorAPIKey` (line 157) — invalidate any operator's API keys\n- `handleListOperatorAPIKeys` (line 173) — API-key metadata disclosure\n\n`handleCreateOperator` (line 26) IS properly gated (`actorIsAdmin` at line 27).\n\n## NOT affected (verified)\n`internal/api/cas.go` properly gates every CA endpoint via `canAccessCA` (calls at lines 70, 176, 216) and admin shortcuts at lines 39, 82. An earlier description draft mistakenly listed `/api/v1/cas/{id}/rotate` as affected — that endpoint is properly protected. CAs are not in this gap.\n\n## Impact\n- Any non-admin operator → admin via one curl (A).\n- Any non-admin operator → ownership of any victim's hosts with cert + identity transfer (B).\n- Mass cross-tenant CRUD including firewall-rule mutation (C).\n- Any operator → disable/enable other operators, revoke their API keys, enumerate the operator roster.\n\nCVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H — 9.6.\n\n## Suggested fix\nShared helpers in a new `internal/api/authz.go`, mirroring the Web layer's `loadAccessibleCA`:\n\n```go\nfunc (s *Server) requireAdmin(w http.ResponseWriter, r *http.Request) bool\nfunc (s *Server) requireOperatorAccess(w http.ResponseWriter, r *http.Request, operatorID string) bool\nfunc (s *Server) requireHostAccess(w http.ResponseWriter, r *http.Request, hostID string) (*models.Host, bool)\nfunc (s *Server) requireNetworkAccess(w http.ResponseWriter, r *http.Request, networkID string) (*models.Network, bool)\n```\n\nEach loads the resource, resolves its CA via `*.CAID`, accepts if `actorIsAdmin(ctx)` OR actor owns the CA. Reject `403 forbidden`; audit-log `api.<resource>.forbidden` with the reason.\n\nThe operator-management endpoints take `requireAdmin` instead (operator ownership doesn't map to CA ownership).\n\nApply at the top of every host-, network-, firewall-, mobile-bundle-touching API handler, plus the 5 operator endpoints listed above. The legacy config-key path retains admin (preserves backward compatibility); the broader legacy-fallback question is tracked separately as issue #121.\n\n## Test matrix\n- admin → all operations permitted\n- owning non-admin → operations on owned hosts/networks permitted\n- non-owner non-admin → 403 + audit entry\n- legacy config-key → preserved (admin)\n- unauthenticated → existing 401 from middleware\n\n## Coordinated context\nSubsumes public issue #119 (mobile-bundle authz). Issue #121 (actor.go:40 legacy-admin fallback) is a separate concern tracked independently.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juev/nebula-mesh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juev/nebula-mesh/security/advisories/GHSA-598g-h2vc-h5vg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/forgekeep/nebula-mesh/commit/9d8bcd7667ecd0c2975cc71fb35a02fe131f76f2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juev/nebula-mesh"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-08T23:09:02Z",
    "nvd_published_at" : null
  }
}