GHSA-v2jf-442r-6mjh: nebula-mesh: Signed-poll nonce LRU is in-memory and bounded; replay survives restart + eviction
internal/api/pop/nonce.go:25,40,86 + internal/api/server.go:38 — the signed-poll nonce cache is an in-process LRU sized at 65,536 entries. internal/api/updates.go:31 sets pollClockSkew = 5 time.Minute as the replay window. Affected All released versions through v0.3.0 that have shipped the ADR 0004 signed-poll path.
Published Jun 26, 2026
Affected packages
github.com/juev/nebula-mesh
- Ecosystem
- Go
- Affected
- <= 0.3.3
- Fixed in
- 0.3.4
- Check
go list -m github.com/juev/nebula-mesh
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
internal/api/pop/nonce.go:25,40,86 + internal/api/server.go:38 — the signed-poll nonce cache is an in-process LRU sized at 65,536 entries. internal/api/updates.go:31 sets pollClockSkew = 5 * time.Minute as the replay window.
Affected
All released versions through v0.3.0 that have shipped the ADR 0004 signed-poll path. (If this is gated behind a feature flag, on a side branch, or not yet on a release tag, please flag — this advisory may not apply to the released artifact yet.)
Threat model
A captured signed-poll request can be replayed:
- After any process restart — the in-memory LRU is wiped, so the original nonce becomes "unseen" again. Replay succeeds if the original timestamp is still within the 5-minute skew.
- After forced eviction — an attacker with control of any single host can flood >65,536 nonces under their own host_id, driving the global LRU to evict the victim's recorded nonce. Replay then succeeds.
Impact is bounded: a replayed poll fetches the /api/v1/agent/updates body. That body can include a freshly-minted enrollment token if a rekey is pending (updates.go:249-260) — at which point the attacker holds a single-use token they can redeem under their own keypair.
Suggested fix
Two options, either acceptable:
- Persist nonces in SQLite keyed by
(host_id, nonce)withON CONFLICT DO NOTHING, retained for the timestamp-skew window. Adds one transactional INSERT per poll; bounded by the skew window (~5 min worth of rows server-wide). - Per-host cap on the LRU instead of a global 65k cap, so one host cannot evict another's records. Combined with shorter skew (≤30s) to bound the post-restart replay window.
Option 1 is more robust; option 2 is lower-implementation-effort.
Credited to ak2k.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-49258
Nebula Mesh: Web UI lacks ownership checks, enabling cross-operator access to hosts and networks (read, block, delete)
high8.8No fixJun 26, 2026GHSA-ghmh-jhmj-wcmf
nebula-mesh's stores enrollment tokens unhashed in SQLite
medium5.0Jun 22, 2026GHSA-6vgg-xhvh-38ff
nebula-mesh: POST /api/v1/hosts/{id}/mobile-bundle response lacks Cache-Control: no-store
low2.3Jun 12, 2026CVE-2026-47768
nebula-mesh: Newly-minted operator API key exposed in redirect URL (Referer, history, proxy logs)
medium5.5Jun 10, 2026CVE-2026-48025
nebula-mesh: Decrypted CA private key persists in heap after signing
mediumJun 10, 2026CVE-2026-48058
nebula-mesh: Session and OIDC state cookies lack the Secure attribute
medium4.6Jun 10, 2026
