{"id":"GO-2026-5139","revision":null,"records":[{"revision":"7aeb58f7cc444773b66dbefb3549b2ce","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-47724","aliases":[],"title":"nebula-mesh: API endpoints lack ownership checks, enabling cross-operator privilege escalation","description":"nebula-mesh is a self-hosted control plane for Slack Nebula mesh virtual private network. Prior to version 0.3.4, 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. Version 0.3.4 fixes the issue.","state":0,"publishedAt":"2026-07-23T20:20:59.494+00:00","modifiedAt":"2026-07-28T14:55:31.612+00:00","affected":[{"ecosystem":"Vendor product","name":"nebula-mesh","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"juev\",\n                    \"product\": \"nebula-mesh\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.3.4\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"severity":"CRITICAL"}],"references":["https://github.com/forgekeep/nebula-mesh/security/advisories/GHSA-598g-h2vc-h5vg","https://github.com/forgekeep/nebula-mesh/commit/9d8bcd7667ecd0c2975cc71fb35a02fe131f76f2"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-47724","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-47724","identifiers":["CVE-2026-47724"]},"retained":false,"historicalAffected":[]},{"revision":"48e07757dd7e4f299100359ed6094443","observedAt":"2026-10-25T12:17:26.301+00:00","statement":{"source":"nvd","id":"CVE-2026-47724","aliases":[],"title":"nebula-mesh is a self-hosted control plane for Slack Nebula mesh virtual private network. Prior to version 0.3.4, the `/api/v1/*` route surface trusts the bearer token alone for authorisation on most endpoints. The codebase itself admits th…","description":"nebula-mesh is a self-hosted control plane for Slack Nebula mesh virtual private network. Prior to version 0.3.4, 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. Version 0.3.4 fixes the issue.","state":0,"publishedAt":"2026-07-23T21:17:04.477+00:00","modifiedAt":"2026-10-24T13:10:00.147+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"severity":"CRITICAL"}],"references":["https://github.com/forgekeep/nebula-mesh/commit/9d8bcd7667ecd0c2975cc71fb35a02fe131f76f2","https://github.com/forgekeep/nebula-mesh/security/advisories/GHSA-598g-h2vc-h5vg"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-47724","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-862"],"productCriteria":[],"sourceDates":{"published":"2026-07-23T21:17:04.477","lastModified":"2026-10-24T13:10:00.147"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-47724","identifiers":["CVE-2026-47724"]},"retained":false,"historicalAffected":[]},{"revision":"fc50e55875f045d9a848c9e372f2e307","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-598g-h2vc-h5vg","aliases":["CVE-2026-47724","GO-2026-5139"],"title":"nebula-mesh: API endpoints lack ownership checks, enabling cross-operator privilege escalation","description":"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.","state":0,"publishedAt":"2026-06-08T23:09:02+00:00","modifiedAt":"2026-06-25T18:56:18.070615+00:00","affected":[{"ecosystem":"Go","name":"github.com/juev/nebula-mesh","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.3.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/juev/nebula-mesh/security/advisories/GHSA-598g-h2vc-h5vg","https://github.com/forgekeep/nebula-mesh/commit/9d8bcd7667ecd0c2975cc71fb35a02fe131f76f2","https://github.com/juev/nebula-mesh"],"sourceUrl":"https://github.com/advisories/GHSA-598g-h2vc-h5vg","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-598g-h2vc-h5vg","identifiers":["GHSA-598g-h2vc-h5vg","CVE-2026-47724","GO-2026-5139"]},"retained":false,"historicalAffected":[]},{"revision":"fcf47a4096b2475ea3cd39bc553a2ebe","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5139","aliases":["CVE-2026-47724","GHSA-598g-h2vc-h5vg"],"title":"nebula-mesh: API endpoints lack ownership checks, enabling cross-operator privilege escalation in github.com/juev/nebula-mesh","description":"nebula-mesh: API endpoints lack ownership checks, enabling cross-operator privilege escalation in github.com/juev/nebula-mesh","state":0,"publishedAt":"2026-06-25T18:26:48+00:00","modifiedAt":"2026-06-25T18:45:25.2759251+00:00","affected":[{"ecosystem":"Go","name":"github.com/juev/nebula-mesh","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.3.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/juev/nebula-mesh/security/advisories/GHSA-598g-h2vc-h5vg","https://github.com/forgekeep/nebula-mesh/commit/9d8bcd7667ecd0c2975cc71fb35a02fe131f76f2"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5139","license":"OSV · upstream source license applies","key":"osv:GO-2026-5139","identifiers":["GO-2026-5139","CVE-2026-47724","GHSA-598g-h2vc-h5vg"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-26T05:26:56.6538334+00:00","complete":true,"records":1756,"lastAttemptAt":"2026-10-26T05:26:56.6538334+00:00","lastSuccessAt":"2026-10-26T05:26:56.7986454+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:26:56.7986482+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-5ba1945314e042c2ced14b33f3680fa71692812d925544312b218f5eb8a26e71-bc703d32c448acb7291b43dd467a47b987ad86f105a430a0e30b03cf6e038792","complete":true,"records":414069,"lastAttemptAt":"2026-10-26T05:25:21.6088408+00:00","lastSuccessAt":"2026-10-26T05:25:21.5943862+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:25:21.6088408+00:00","snapshotPublishedAt":"2026-10-26T04:31:21+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-43321610382942b8ad8c85917eab1546","complete":false,"records":4735,"lastAttemptAt":"2026-10-26T05:26:59.285199+00:00","lastSuccessAt":"2026-10-24T23:18:49.862+00:00","error":"InvalidDataException","lastVerifiedAt":"2026-10-24T23:18:49.862+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":4764,"expectedIdentifiers":13474},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-26T05:26:56.6538334+00:00","complete":true,"records":1093,"lastAttemptAt":"2026-10-26T05:26:56.6538334+00:00","lastSuccessAt":"2026-10-26T05:26:56.7998442+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:26:56.799845+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-204a3fb93a00487e8f7f36db01dc851d","complete":true,"records":13413,"lastAttemptAt":"2026-10-26T05:26:57.2787164+00:00","lastSuccessAt":"2026-10-25T16:19:28.681+00:00","error":null,"lastVerifiedAt":"2026-10-25T16:19:28.681+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13474,"expectedIdentifiers":13474},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-2375a4e597279abf92e8747e140fe8da9d421877cd49cae3ac69a2cb78469b2c","complete":true,"records":9779,"lastAttemptAt":"2026-10-26T05:26:56.2433127+00:00","lastSuccessAt":"2026-10-24T13:19:53.1346702+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:26:56.2433127+00:00","snapshotPublishedAt":"2026-10-24T03:03:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-16ad89dfea13ab9e9b0108e63a759d63bd4559cc68b58491107d62ee35bbbaf2","complete":true,"records":1965,"lastAttemptAt":"2026-10-26T05:25:21.7989429+00:00","lastSuccessAt":"2026-10-23T16:01:26.4487605+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:25:21.7989429+00:00","snapshotPublishedAt":"2026-10-21T12:18:07+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-7da67a15aa6e56a0e3081a7646dc74d537e6ef974afc593c2b1794ed01970648","complete":true,"records":2969,"lastAttemptAt":"2026-10-26T05:26:56.6198554+00:00","lastSuccessAt":"2026-10-24T13:19:59.1145547+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:26:56.6198554+00:00","snapshotPublishedAt":"2026-10-24T08:47:51+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-f936be991545888acd70d1c7b6fcb3da4be35405bbec4bff46b924c2832f41b1","complete":true,"records":230802,"lastAttemptAt":"2026-10-26T05:26:56.1119243+00:00","lastSuccessAt":"2026-10-26T05:26:54.9585845+00:00","error":null,"lastVerifiedAt":"2026-10-26T05:26:56.1119243+00:00","snapshotPublishedAt":"2026-10-26T04:48:14+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null}]}