{"id":"GHSA-w7w5-5gcp-38rw","revision":"51359170dbdc45a5b6147127e87c7bfc","records":[{"revision":"51359170dbdc45a5b6147127e87c7bfc","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-w7w5-5gcp-38rw","aliases":["CVE-2026-47723","GO-2026-5698"],"title":"nebula-mesh: Web UI and API responses lack security headers (CSP, X-Frame-Options, HSTS, etc.)","description":"None of the response paths in `internal/web/` or `internal/api/` set the standard browser-security headers. `grep` for `Content-Security-Policy`, `X-Frame-Options`, `Strict-Transport-Security`, `X-Content-Type-Options`, `Referrer-Policy` returns zero matches across the codebase.\n\n## Impact\nThe admin UI signs CA certificates, mints API keys (returned inline once per page), displays TOTP QR codes, and exposes operator-management forms. Missing `X-Frame-Options: DENY` / `frame-ancestors 'none'` is a real clickjacking lever against an admin browsing `/ui/operators/*` or `/ui/cas/*`. Missing `X-Content-Type-Options: nosniff` allows MIME confusion on any user-supplied content surface. Missing HSTS on TLS deployments leaves a downgrade window.\n\n## Affected\nAll released versions up to v0.3.0.\n\n## Suggested fix\nA single response-header middleware mounted at the chi router root in both `/ui/*` and `/api/*` paths:\n\n```go\nfunc securityHeadersMiddleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {\n        h := rw.Header()\n        h.Set(\"Content-Security-Policy\",\n            \"default-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'self'\")\n        h.Set(\"X-Content-Type-Options\", \"nosniff\")\n        h.Set(\"Referrer-Policy\", \"same-origin\")\n        h.Set(\"X-Frame-Options\", \"DENY\")  // belt-and-braces; CSP frame-ancestors is the modern path\n        if r.TLS != nil {\n            h.Set(\"Strict-Transport-Security\", \"max-age=31536000; includeSubDomains\")\n        }\n        next.ServeHTTP(rw, r)\n    })\n}\n```\n\nThe inline `<script>` in `layout.html` for CSRF wiring (added in the CSRF advisory) will need either a nonce, a hash in CSP, or external-file extraction. Easiest path: a nonce per request (`crypto/rand`, base64) injected into both the CSP header and the script's `nonce=\"\"` attribute.","state":0,"publishedAt":"2026-06-08T23:08:54+00:00","modifiedAt":"2026-06-25T23:11:13.4582015+00:00","affected":[{"ecosystem":"Go","name":"github.com/juev/nebula-mesh","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.3.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/juev/nebula-mesh/security/advisories/GHSA-w7w5-5gcp-38rw","https://github.com/forgekeep/nebula-mesh/commit/b45fda5476c41ffcff1ca23058aef0fb851359c1","https://github.com/forgekeep/nebula-mesh/releases/tag/v0.3.1","https://github.com/juev/nebula-mesh"],"sourceUrl":"https://github.com/advisories/GHSA-w7w5-5gcp-38rw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-w7w5-5gcp-38rw","identifiers":["GHSA-w7w5-5gcp-38rw","CVE-2026-47723","GO-2026-5698"]},"retained":false,"historicalAffected":[]}],"coverage":[]}