{"id":"CVE-2026-53603","aliases":["CVE-2026-53603","GHSA-q4vm-pq3q-8wgq","GO-2026-5991"],"related":[],"kind":"vulnerability","state":"published","title":"nebula-mesh: Operator session tokens stored in plaintext in the database","summary":"nebula-mesh is a self-hosted control plane for Slack Nebula mesh VPN. Prior to version 0.3.8, Operator session tokens are stored in plaintext in the operator_sessions table (the token column is the PRIMARY KEY). The session token is a 32-byte random hex value sent directly in a cookie and valid for 24 hours. Anyone who can read the database (backup, snapshot, file copy, or SQL-level disclosure) obtains every active session token and can hijack operator sessions directly, with no further authentication. This issue has been patched in version 0.3.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"nebula-mesh is a self-hosted control plane for Slack Nebula mesh VPN. Prior to version 0.3.8, Operator session tokens are stored in plaintext in the operator_sessions table (the token column is the PRIMARY KEY). The session token is a 32-byte random hex value sent directly in a cookie and valid for 24 hours. Anyone who can read the database (backup, snapshot, file copy, or SQL-level disclosure) obtains every active session token and can hijack operator sessions directly, with no further authentication. This issue has been patched in version 0.3.8.","source":"cvelist"},{"lang":"en","text":"## Impact\n\nOperator session tokens are stored in plaintext in the `operator_sessions` table (the `token` column is the PRIMARY KEY). The session token is a 32-byte random hex value sent directly in a cookie and valid for 24 hours.\n\n- `internal/models/operator.go:61` — `OperatorSession.Token` holds the plaintext token.\n- `internal/store/sqlite_operators.go:590` — `CreateOperatorSession` inserts `sess.Token` verbatim.\n- `internal/store/sqlite_operators.go:603,642,681,698` — lookups/updates/deletes use `WHERE token = ?` against the plaintext value.\n\nAnyone who can read the database (backup, snapshot, file copy, or SQL-level disclosure) obtains every active session token and can hijack operator sessions directly, with no further authentication.\n\nThis is functionally identical to the plaintext enrollment-token issue fixed in GHSA-ghmh-jhmj-wcmf. API keys (`OperatorAPIKey.KeyHash`) and enrollment tokens (`EnrollmentToken.TokenHash`) already store only a SHA256 hash; session tokens were missed.\n\n## Patches\n\nStore only a SHA256 hash of the session token, mirroring API keys and enrollment tokens:\n1. Add a `HashSessionToken` helper (alongside the existing token-hash helpers).\n2. Migration to add a `token_hash` column.\n3. Update `CreateOperatorSession`, `PromoteOperatorSession`, and `GetOperatorBySession` to write/look up by hash.\n4. Drop the plaintext `token` column in a follow-up migration.\n\nSessions are ephemeral (24h TTL), so all active sessions can be invalidated on deployment — no backward compatibility needed.\n\n## Workarounds\n\nRestrict and encrypt database backups; rotate the operator database. These mitigate exposure but do not fix the underlying storage of plaintext tokens.\n\n## Resources\n\n- `internal/models/operator.go:58-66`\n- `internal/store/sqlite_operators.go:577-698`\n- Migration `005_operators.up.sql:27`\n- Prior related advisory: GHSA-ghmh-jhmj-wcmf","format":"markdown","source":"ghsa"},{"lang":"en","text":"nebula-mesh: Operator session tokens stored in plaintext in the database in github.com/forgekeep/nebula-mesh","format":"markdown","source":"go"}],"published":"2026-07-14T20:17:04.000Z","modified":"2026-09-08T21:05:26.920Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-312","CWE-522"],"affected":[{"ranges":[{"version":"< 0.3.8","status":"affected"}],"vendor":"forgekeep","product":"nebula-mesh","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.8"}],"ecosystem":"Go","package":"github.com/forgekeep/nebula-mesh","purl":"pkg:golang/github.com/forgekeep/nebula-mesh","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.8"}],"ecosystem":"Go","package":"github.com/forgekeep/nebula-mesh","purl":"pkg:golang/github.com/forgekeep/nebula-mesh","source":"go"}],"references":[{"url":"https://github.com/forgekeep/nebula-mesh/security/advisories/GHSA-q4vm-pq3q-8wgq","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/forgekeep/nebula-mesh/commit/7cb01bab281ded557f8b6c81dab5f48d4c10182e","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/forgekeep/nebula-mesh/releases/tag/v0.3.8","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/forgekeep/nebula-mesh","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-09-08T17:48:58.655Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-53603","url":"https://www.cve.org/CVERecord?id=CVE-2026-53603","licence":"CVE Terms of Use","modified":"2026-09-08T17:49:14.966Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q4vm-pq3q-8wgq","url":"https://github.com/advisories/GHSA-q4vm-pq3q-8wgq","licence":"CC-BY-4.0","modified":"2026-07-21T19:19:01.389Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5991","url":"https://pkg.go.dev/vuln/GO-2026-5991","licence":"CC-BY-4.0","modified":"2026-07-21T19:15:35.721Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-53603","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53603","licence":"Public domain","modified":"2026-09-08T21:05:26.920Z"}],"updatedAt":"2026-11-25T22:59:36.402Z","epss":{"score":0.00204,"percentile":0.10943,"date":"2026-12-01T12:00:22.000Z"}}