GHSA-6vgg-xhvh-38ff: nebula-mesh POST /api/v1/hosts/{id}/mobile-bundle Response Lacks Cache-Control: Vulnerability

LOW
CWE-525
Published
Advisory Summary

GHSA-6vgg-xhvh-38ff is a LOW post /api/v1/hosts/{id}/mobile-bundle response lacks cache-control: vulnerability (CWE-525: Use of Web Browser Cache Containing Sensitive Information) affecting nebula-mesh libraries in the Go ecosystem. The issue involves post /api/v1/hosts/{id}/mobile-bundle response lacks cache-control: no-store. Remediation is available by upgrading affected packages to version 0.3.2.

GHSA-6vgg-xhvh-38ff at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6vgg-xhvh-38ff
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-525: Use of Web Browser Cache Containing Sensitive Information
Affected Product nebula-mesh
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-6vgg-xhvh-38ff

To remediate this vulnerability, upgrade all affected nebula-mesh dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/juev/nebula-mesh fixed: 0.3.2
Upgrade github.com/juev/nebula-mesh to 0.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/juev/nebula-mesh

How to Check if You Are Affected

To determine whether your application is affected by GHSA-6vgg-xhvh-38ff, inspect your project dependencies for nebula-mesh:

inspect dependencies for github.com/juev/nebula-mesh

Analyze the terminal output to locate any version of nebula-mesh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-525: Use of Web Browser Cache Containing Sensitive Information, where the web application does not use an appropriate caching policy that specifies the extent to which each web page and associated form fields should be cached. In nebula-mesh, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`internal/api/mobile_bundle.go:62-66` sets only `Content-Type: application/yaml`. The Web-UI sibling at `internal/web/handlers.go:1316-1321` sets `Cache-Control: no-store`, `Pragma: no-cache`, `Expires: 0`, `X-Content-Type-Options: nosniff` — and has a test asserting it. The API path was missed. ## Affected All released versions up to v0.3.0. ## Threat model The endpoint returns a freshly minted X25519 private key inline. Without `no-store`, any intermediary proxy or CDN that caches `200 OK` YAML responses retains the private key for its cache TTL. Same applies to browser disk cache for direct API hits. Combined with the cross-tenant authz advisory (critical), even a corrected authz layer would still leak via cache after fix. ## Suggested fix Copy the four headers from the Web sibling: ```go w.Header().Set("Content-Type", "application/yaml; charset=utf-8") w.Header().Set("Cache-Control", "no-store") w.Header().Set("Pragma", "no-cache") w.Header().Set("Expires", "0") w.Header().Set("X-Content-Type-Options", "nosniff") ``` Mirrors `internal/web/handlers.go:1316-1321`. Add a parallel test to the existing web-side coverage. ## Suggested patch Verified locally: `go vet`, `go test -race -count=1 ./...`, `golangci-lint v2.12` all clean. ```diff diff --git a/internal/api/mobile_bundle.go b/internal/api/mobile_bundle.go index fc09da0..73152eb 100644 --- a/internal/api/mobile_bundle.go +++ b/internal/api/mobile_bundle.go @@ -58,8 +58,15 @@ func (s *Server) handleMobileBundle(w http.ResponseWriter, r *http.Request) { return } - // Return YAML bundle with proper content-type + // Return YAML bundle with proper content-type. The bundle inlines a + // freshly-minted X25519 private key, so suppress every layer of cache + // between server and operator (intermediate proxies/CDNs, browser disk + // cache). Mirrors the Web-UI sibling at internal/web/handlers.go. w.Header().Set("Content-Type", "application/yaml; charset=utf-8") + w.Header().Set("Cache-Control", "no-store") + w.Header().Set("Pragma", "no-cache") + w.Header().Set("Expires", "0") + w.Header().Set("X-Content-Type-Options", "nosniff") w.WriteHeader(http.StatusOK) if _, err := w.Write(bundle); err != nil { s.logger.Error("write mobile bundle response", "error", err) diff --git a/internal/api/mobile_bundle_test.go b/internal/api/mobile_bundle_test.go index dcb8cd9..da08b01 100644 --- a/internal/api/mobile_bundle_test.go +++ b/internal/api/mobile_bundle_test.go @@ -52,6 +52,19 @@ func TestHandleMobileBundle_Success(t *testing.T) { t.Errorf("Content-Type = %q, want 'application/yaml; charset=utf-8'", ct) } + // Bundle inlines a private key — every cache between server and operator + // must drop the response. Mirrors the Web-UI sibling's headers. + for header, want := range map[string]string{ + "Cache-Control": "no-store", + "Pragma": "no-cache", + "Expires": "0", + "X-Content-Type-Options": "nosniff", + } { + if got := w.Header().Get(header); got != want { + t.Errorf("%s = %q, want %q", header, got, want) + } + } + // Verify body is valid YAML with expected keys var yamlData map[string]interface{} if err := yaml.Unmarshal(w.Body.Bytes(), &yamlData); err != nil { ```

GHSA-6vgg-xhvh-38ff Affected nebula-mesh Versions

1 component(s)
Fixed Versions:
0.3.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/juev/nebula-mesh
Go
< 0.3.2
0.3.2

References

Frequently Asked Questions

What is GHSA-6vgg-xhvh-38ff?
GHSA-6vgg-xhvh-38ff is a security vulnerability in nebula-mesh involving POST /api/v1/hosts/{id}/mobile-bundle response lacks Cache-Control: no-store under CWE-525: Use of Web Browser Cache Containing Sensitive Information.
Which nebula-mesh versions are affected?
Affected versions include releases prior to 0.3.2 across affected packages: github.com/juev/nebula-mesh.
What version fixes GHSA-6vgg-xhvh-38ff?
Upgrading to 0.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/juev/nebula-mesh affected?
Yes, github.com/juev/nebula-mesh is affected in releases prior to 0.3.2. Upgrade your dependency to 0.3.2 or later.
What CWE is associated with GHSA-6vgg-xhvh-38ff?
GHSA-6vgg-xhvh-38ff is classified under CWE-525: Use of Web Browser Cache Containing Sensitive Information (The web application does not use an appropriate caching policy that specifies the extent to which each web page and associated form fields should be cached.).
How can I check Go dependencies for GHSA-6vgg-xhvh-38ff?
Run the dependency tree command: 'inspect dependencies for github.com/juev/nebula-mesh'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6vgg-xhvh-38ff",
  "modified" : "2026-06-12T18:30:09Z",
  "published" : "2026-06-12T18:30:09Z",
  "aliases" : [ ],
  "summary" : "nebula-mesh: POST /api/v1/hosts/{id}/mobile-bundle response lacks Cache-Control: no-store",
  "details" : "`internal/api/mobile_bundle.go:62-66` sets only `Content-Type: application/yaml`. The Web-UI sibling at `internal/web/handlers.go:1316-1321` sets `Cache-Control: no-store`, `Pragma: no-cache`, `Expires: 0`, `X-Content-Type-Options: nosniff` — and has a test asserting it. The API path was missed.\n\n## Affected\nAll released versions up to v0.3.0.\n\n## Threat model\nThe endpoint returns a freshly minted X25519 private key inline. Without `no-store`, any intermediary proxy or CDN that caches `200 OK` YAML responses retains the private key for its cache TTL. Same applies to browser disk cache for direct API hits. Combined with the cross-tenant authz advisory (critical), even a corrected authz layer would still leak via cache after fix.\n\n## Suggested fix\nCopy the four headers from the Web sibling:\n\n```go\nw.Header().Set(\"Content-Type\", \"application/yaml; charset=utf-8\")\nw.Header().Set(\"Cache-Control\", \"no-store\")\nw.Header().Set(\"Pragma\", \"no-cache\")\nw.Header().Set(\"Expires\", \"0\")\nw.Header().Set(\"X-Content-Type-Options\", \"nosniff\")\n```\n\nMirrors `internal/web/handlers.go:1316-1321`. Add a parallel test to the existing web-side coverage.\n\n## Suggested patch\n\nVerified locally: `go vet`, `go test -race -count=1 ./...`, `golangci-lint v2.12` all clean.\n\n```diff\ndiff --git a/internal/api/mobile_bundle.go b/internal/api/mobile_bundle.go\nindex fc09da0..73152eb 100644\n--- a/internal/api/mobile_bundle.go\n+++ b/internal/api/mobile_bundle.go\n@@ -58,8 +58,15 @@ func (s *Server) handleMobileBundle(w http.ResponseWriter, r *http.Request) {\n \t\treturn\n \t}\n \n-\t// Return YAML bundle with proper content-type\n+\t// Return YAML bundle with proper content-type. The bundle inlines a\n+\t// freshly-minted X25519 private key, so suppress every layer of cache\n+\t// between server and operator (intermediate proxies/CDNs, browser disk\n+\t// cache). Mirrors the Web-UI sibling at internal/web/handlers.go.\n \tw.Header().Set(\"Content-Type\", \"application/yaml; charset=utf-8\")\n+\tw.Header().Set(\"Cache-Control\", \"no-store\")\n+\tw.Header().Set(\"Pragma\", \"no-cache\")\n+\tw.Header().Set(\"Expires\", \"0\")\n+\tw.Header().Set(\"X-Content-Type-Options\", \"nosniff\")\n \tw.WriteHeader(http.StatusOK)\n \tif _, err := w.Write(bundle); err != nil {\n \t\ts.logger.Error(\"write mobile bundle response\", \"error\", err)\ndiff --git a/internal/api/mobile_bundle_test.go b/internal/api/mobile_bundle_test.go\nindex dcb8cd9..da08b01 100644\n--- a/internal/api/mobile_bundle_test.go\n+++ b/internal/api/mobile_bundle_test.go\n@@ -52,6 +52,19 @@ func TestHandleMobileBundle_Success(t *testing.T) {\n \t\tt.Errorf(\"Content-Type = %q, want 'application/yaml; charset=utf-8'\", ct)\n \t}\n \n+\t// Bundle inlines a private key — every cache between server and operator\n+\t// must drop the response. Mirrors the Web-UI sibling's headers.\n+\tfor header, want := range map[string]string{\n+\t\t\"Cache-Control\":         \"no-store\",\n+\t\t\"Pragma\":                \"no-cache\",\n+\t\t\"Expires\":               \"0\",\n+\t\t\"X-Content-Type-Options\": \"nosniff\",\n+\t} {\n+\t\tif got := w.Header().Get(header); got != want {\n+\t\t\tt.Errorf(\"%s = %q, want %q\", header, got, want)\n+\t\t}\n+\t}\n+\n \t// Verify body is valid YAML with expected keys\n \tvar yamlData map[string]interface{}\n \tif err := yaml.Unmarshal(w.Body.Bytes(), &yamlData); err != nil {\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juev/nebula-mesh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.3.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juev/nebula-mesh/security/advisories/GHSA-6vgg-xhvh-38ff"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/forgekeep/nebula-mesh/commit/c13d5b2c013b4b323bc0c87a6ecc6afba6384ee5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juev/nebula-mesh"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-525" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-12T18:30:09Z",
    "nvd_published_at" : null
  }
}