{"id":"CVE-2026-47725","aliases":["GHSA-273q-qgh5-wrj6","GO-2026-5049"],"url":"https://o3.security/vulnerability/CVE-2026-47725","summary":"nebula-mesh: Web UI lacks CSRF tokens on /ui/* mutating endpoints","details":"Every `/ui/*` POST / PUT / PATCH / DELETE route processes the request as soon as the session cookie validates. `SameSite=Lax` on the session cookie prevents most cross-site form submits but does not protect:\n\n- top-level form-submit navigations from third-party pages (some browsers still send Lax cookies on top-level POSTs)\n- same-registrable-domain attackers (sibling-subdomain XSS, subdomain takeover)\n- the `GET /ui/logout` route, which a third-party `<img src=\".../ui/logout\">` can force-trigger\n\nThe admin UI signs CA certificates, mints API keys, rotates / retires / deletes CAs, disables operators, and changes server settings. CSRF here is a real privilege escalation, not just annoyance.\n\n## Affected\nAll released versions up to v0.3.2.\n\n## Suggested fix\nDouble-submit cookie: a 32-byte `crypto/rand` token in a non-HttpOnly `_csrf` cookie, echoed in either `X-CSRF-Token` (htmx) or a `_csrf` form field (HTML forms). Compared in constant time. Rotated on every privilege transition (`Login`, OIDC `StartAuthenticatedSession`, `CompleteTwoFactor`, `Logout`) so pre-auth fixation cannot survive promotion. Rejections audit-logged as `ui.csrf.rejected` with reason; response body stays opaque.\n\n`/ui/logout` becomes POST so it is no longer reachable via `<img>` tags.\n\nFix coordinates with the Secure-cookie advisory disclosed concurrently — the `_csrf` cookie inherits the same `Secure`-attribute derivation.\n\n## Reproducer\nWith an authenticated operator session in browser tab A, open the following minimal HTML in any other tab:\n\n```html\n<form action=\"https://nebula.example.com/ui/cas/{ca-id}/delete\" method=\"POST\">\n  <button>Click for free puppy</button>\n</form>\n```\n\nClick. The CA is deleted — the server processes the POST because the session cookie is automatically attached and there is no other check. The same trick works for force-rotate, retire, mint API keys, disable operators, etc.\n\nAlternative force-logout: `<img src=\"https://nebula.example.com/ui/logout\">` placed on an attacker's page logs out any visiting authenticated operator. No interaction required.\n\n## Notes\n- Multipart and JSON endpoints don't exist in the current UI surface. Future additions must rely on the header path because `r.PostFormValue` only reads `application/x-www-form-urlencoded` bodies. The middleware's package comment documents this.\n- The patch assumes nebula-mgmt is the sole authority on its registrable domain. A compromised sibling subdomain can still set parent-domain cookies and forge matches; SameSite=Lax does not prevent that. Documented in the patch.","published":"2026-07-28T17:56:29.651Z","modified":"2026-10-28T02:31:02.451660648Z","cvss":null,"epss":{"score":0.00187,"percentile":0.08675,"asOf":"2026-12-05"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/juev/nebula-mesh","fixedVersion":"0.3.3"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/forgekeep/nebula-mesh/releases/tag/v0.3.3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47725.json"},{"type":"ADVISORY","url":"https://github.com/forgekeep/nebula-mesh/security/advisories/GHSA-273q-qgh5-wrj6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47725"},{"type":"WEB","url":"https://github.com/juev/nebula-mesh/security/advisories/GHSA-273q-qgh5-wrj6"},{"type":"PACKAGE","url":"https://github.com/juev/nebula-mesh"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:31:02.451660648Z"}}