nebula-mesh CVE-2026-48058
MEDIUMLifecycle Timeline
2DescriptionCVE.org
internal/web/session.go and internal/web/oidc.go set HttpOnly and SameSite=Lax on every cookie but never Secure. A single plaintext request to the origin (operator on a LAN, mistyped URL, HTTP→HTTPS not strictly enforced, reverse proxy misconfiguration) discloses the session.
Affected
All released versions up to v0.3.1.
Impact
An attacker who can observe one HTTP request to the origin recovers the session cookie and impersonates the operator for the remainder of its 24h TTL. The OIDC state cookie has a narrower 10-minute window but enables CSRF on the OIDC callback during that window.
Cookie sites
internal/web/session.go-Login,StartAuthenticatedSession,CompleteTwoFactor,Logoutinternal/web/oidc.go-HandleLogin(state set),HandleCallback(state clear)
Suggested fix
Driven by an explicit cookie_secure config option, inferred true when tls_cert+tls_key are configured and false otherwise. rate_limit.trust_proxy_header is deliberately not used as a signal - that flag controls XFF parsing for rate-limit IPs and does not promise the proxy speaks TLS to clients. Operator behind a TLS-terminating proxy sets cookie_secure: true explicitly.
Logout and OIDC state-clear cookies also pick up matching HttpOnly + SameSite=Lax so browsers reliably replace the original.
Reproducer
Start nebula-mgmt without tls_cert/tls_key (the documented "behind a reverse proxy" deployment). Hit any login flow over the local listener:
curl -i -X POST -d 'username=admin&password=…' http://127.0.0.1:8080/ui/loginThe Set-Cookie: nebula_session=… line will lack Secure. A subsequent unencrypted hop reveals the cookie verbatim.
Operational migration
Operators flipping cookie_secure on a running deployment should expect a one-time logout: existing browser cookies have the old attribute set and the new delete-cookie won't match.
AnalysisAI
Session and OIDC state cookies in nebula-mesh up to v0.3.1 are transmitted without the Secure attribute, allowing a network-adjacent attacker who can observe a single plaintext HTTP request to recover the session cookie and fully impersonate the operator for up to 24 hours. The OIDC state cookie carries an additional CSRF risk during its 10-minute validity window, enabling an attacker to hijack the OIDC callback flow. A working reproducer is included in the GHSA advisory; no public exploit framework distribution is known and this vulnerability is not listed in the CISA KEV catalog at time of analysis.
Technical ContextAI
nebula-mesh (Go package pkg:go/github.com/juev/nebula-mesh) is a web-based management interface for Nebula mesh networks. The affected code lives in two source files: internal/web/session.go (handling Login, StartAuthenticatedSession, CompleteTwoFactor, and Logout cookie lifecycle) and internal/web/oidc.go (HandleLogin state-set and HandleCallback state-clear). Both files apply HttpOnly and SameSite=Lax cookie attributes correctly but omit the Secure flag entirely. CWE-614 (Sensitive Cookie in HTTPS Session Without Secure Attribute) is the root cause class: without Secure, browsers transmit these cookies over plaintext HTTP connections, making them visible to any observer on the path. The vulnerability is particularly acute in the documented 'behind a reverse proxy' deployment pattern, where TLS is terminated at the proxy and nebula-mgmt binds a plain HTTP listener locally - operators accessing the management UI via HTTP on the LAN will have their cookies exposed in cleartext.
RemediationAI
Upgrade nebula-mesh to v0.3.2, which introduces a cookie_secure configuration option. The fix is confirmed in commit ffdd67dbf221d9a5855c39fbe11b49c245048d85 (https://github.com/forgekeep/nebula-mesh/commit/ffdd67dbf221d9a5855c39fbe11b49c245048d85) and documented in GHSA-rqfj-vv8r-xhqc (https://github.com/juev/nebula-mesh/security/advisories/GHSA-rqfj-vv8r-xhqc). After upgrading, operators running behind a TLS-terminating reverse proxy must explicitly set cookie_secure: true in their configuration, since the flag is only auto-inferred as true when tls_cert and tls_key are directly configured on nebula-mgmt. Note that toggling cookie_secure on a live deployment causes a one-time forced logout for all active sessions, because browsers cannot match and evict cookies whose Secure attribute has changed. As a compensating control prior to patching, operators should restrict access to the nebula-mesh HTTP listener to trusted localhost-only interfaces and enforce that the reverse proxy enforces HTTPS-only with HSTS, preventing any browser-initiated plaintext requests from reaching the origin.
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-rqfj-vv8r-xhqc