GHSA-GHMH-JHMJ-WCMF

GHSA-GHMH-JHMJ-WCMF is a medium-severity security vulnerability in github.com/juev/nebula-mesh (go), affecting versions <= 0.3.1. It is fixed in 0.3.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

nebula-mesh's stores enrollment tokens unhashed in SQLite

internal/store/sqlite.go:1177,1192,1221,1245, the enrollment_tokens.token column holds the raw UUID token. ConsumeToken does WHERE token = ? against the raw string. Compare with operator_api_keys.key_hash, which is SHA-256 hex (constructed in internal/api/middleware.go:51-53).

Affected

All released versions up to v0.3.0.

Threat model

Read access to nebula-mgmt.db: backup, snapshot, file-system access, future SQL-injection sink. The principle of defense-in-depth: API keys are hashed at rest; enrollment tokens, which grant the same lifecycle authority over a host's identity, are not.

An attacker who reads the DB before a legitimate agent enrolls can consume the single-use token first, mint a cert against their own keypair, and take the agent's intended Nebula identity.

Impact

Affected versions

github.com/juev/nebula-mesh (<= 0.3.1)

Security releases

github.com/juev/nebula-mesh → 0.3.2 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

  1. Schema migration: rename enrollment_tokens.tokentoken_hash (or add the new column and drop the old after backfill of pending rows).
  2. Store SHA-256 of token on create:
    sum := sha256.Sum256([]byte(token))
    row.TokenHash = hex.EncodeToString(sum[:])
    
  3. ConsumeToken accepts the raw token, hashes once, looks up by hash, atomically marks consumed.

Side bonus: take this opportunity to switch the token format from uuid.New().String() (122 bits) to hex.EncodeToString(crypto/rand 32 bytes) (256 bits), matching the project's session-token and API-key conventions. UUIDs are recognisable in logs and crash dumps; opaque hex blends in.

TOTP recovery codes appear to already be SHA-256 hashed at rest (internal/web/totp.go:74-78), confirming that pattern is intentional elsewhere, just missed here.

Frequently Asked Questions

  1. What is GHSA-GHMH-JHMJ-WCMF? GHSA-GHMH-JHMJ-WCMF is a medium-severity security vulnerability in github.com/juev/nebula-mesh (go), affecting versions <= 0.3.1. It is fixed in 0.3.2.
  2. Which versions of github.com/juev/nebula-mesh are affected by GHSA-GHMH-JHMJ-WCMF? github.com/juev/nebula-mesh (go) versions <= 0.3.1 is affected.
  3. Is there a fix for GHSA-GHMH-JHMJ-WCMF? Yes. GHSA-GHMH-JHMJ-WCMF is fixed in 0.3.2. Upgrade to this version or later.
  4. Is GHSA-GHMH-JHMJ-WCMF exploitable, and should I be worried? Whether GHSA-GHMH-JHMJ-WCMF is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-GHMH-JHMJ-WCMF is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-GHMH-JHMJ-WCMF? Upgrade github.com/juev/nebula-mesh to 0.3.2 or later.

Other vulnerabilities in github.com/juev/nebula-mesh

Stop the waste.
Protect your environment with Kodem.