CVSS Assessment
| Metric |
Value |
| Score |
8.3 / 10.0 |
| Severity |
High |
| Vector |
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L |
CVSS v3.1 Calculator
Summary
The Gmail setup flow builds Pub/Sub push endpoints as https://...?...token=<secret> and registers that full URL on the subscription. This exposes the shared secret to URL-bearing telemetry surfaces (reverse-proxy logs, access logs, traces, analytics, copy/paste artifacts).
Verification also found additional plaintext token leakage in local/application logging:
- setup prints
pushEndpoint directly,
- setup
--json output includes raw hookToken and pushToken,
- watcher/setup command logging prints
gog ... --token <pushToken> --hook-token <hookToken>.
Affected Code
- URL token construction:
source_code/src/hooks/gmail-setup-utils.ts:315
- Pub/Sub endpoint registration with full URL:
source_code/src/hooks/gmail-setup-utils.ts:238
source_code/src/hooks/gmail-setup-utils.ts:250
- Setup flow token source and sink wiring:
source_code/src/hooks/gmail-ops.ts:107
source_code/src/hooks/gmail-ops.ts:189
source_code/src/hooks/gmail-ops.ts:194
source_code/src/hooks/gmail-ops.ts:201
- Additional plaintext leakage:
source_code/src/hooks/gmail-ops.ts:277
source_code/src/hooks/gmail-ops.ts:259
source_code/src/hooks/gmail-ops.ts:260
source_code/src/hooks/gmail-ops.ts:269
source_code/src/hooks/gmail.ts:237
source_code/src/hooks/gmail.ts:241
source_code/src/hooks/gmail-ops.ts:361
source_code/src/hooks/gmail-watcher.ts:68
// source_code/src/hooks/gmail-setup-utils.ts
const baseUrl = `https://${dnsName}${pathArg}`;
return params.token ? `${baseUrl}?token=${params.token}` : baseUrl;
// source_code/src/hooks/gmail-setup-utils.ts
await runGcloud([
"pubsub",
"subscriptions",
"update",
subscription,
"--project",
projectId,
"--push-endpoint",
pushEndpoint,
]);
Attack Surface
How is this reached?
Authentication required?
Entry point: runGmailSetup() provisioning path (ensureTailscaleEndpoint() -> ensureSubscription()) plus setup/watcher log emission of sensitive values.
Exploit Conditions
Complexity:
User interaction:
Prerequisites: Attacker can read URL-bearing logs/telemetry or command output that contains the push token (directly or via full endpoint URL).
Impact Assessment
Scope:
What can an attacker do?
| Impact Type |
Level |
Description |
| Confidentiality |
High |
Shared webhook auth secret (pushToken) is exposed in URL/log output. |
| Integrity |
High |
Stolen token can be replayed to forge Gmail push events into ingestion flow. |
| Availability |
Low |
Forged events can create noise and operational disruption. |
Steps to Reproduce
- Run Gmail setup with Tailscale endpoint generation (for example
openclaw webhooks gmail setup ... --tailscale funnel).
- Observe generated endpoint includes query token:
https://<tailscale-host>/<path>?token=<pushToken>.
- Confirm that endpoint is applied to Pub/Sub with
--push-endpoint.
- Observe setup/watcher logs for leaked values:
- printed
push endpoint,
Starting gog ... --token ... --hook-token ...,
- optional
--json summary with raw tokens.
- Replay authenticated-looking webhook requests using the leaked token.
Recommended Fix
- Remove query-token endpoint construction by default in setup flow.
- Move to authenticated push with OIDC verification end-to-end (subscription auth + receiver verification), and avoid URL-based shared secrets.
- Eliminate plaintext token logging:
- do not print endpoint query strings,
- do not print command args containing secrets,
- remove raw token fields from setup JSON output or redact them.
- If temporary compatibility is required, gate query-token mode behind an explicit insecure flag and mark it deprecated.
References
- CWE: CWE-598 - Use of GET Request Method With Sensitive Query Strings
CVSS Assessment
Summary
The Gmail setup flow builds Pub/Sub push endpoints as
https://...?...token=<secret>and registers that full URL on the subscription. This exposes the shared secret to URL-bearing telemetry surfaces (reverse-proxy logs, access logs, traces, analytics, copy/paste artifacts).Verification also found additional plaintext token leakage in local/application logging:
pushEndpointdirectly,--jsonoutput includes rawhookTokenandpushToken,gog ... --token <pushToken> --hook-token <hookToken>.Affected Code
source_code/src/hooks/gmail-setup-utils.ts:315source_code/src/hooks/gmail-setup-utils.ts:238source_code/src/hooks/gmail-setup-utils.ts:250source_code/src/hooks/gmail-ops.ts:107source_code/src/hooks/gmail-ops.ts:189source_code/src/hooks/gmail-ops.ts:194source_code/src/hooks/gmail-ops.ts:201source_code/src/hooks/gmail-ops.ts:277source_code/src/hooks/gmail-ops.ts:259source_code/src/hooks/gmail-ops.ts:260source_code/src/hooks/gmail-ops.ts:269source_code/src/hooks/gmail.ts:237source_code/src/hooks/gmail.ts:241source_code/src/hooks/gmail-ops.ts:361source_code/src/hooks/gmail-watcher.ts:68Attack Surface
How is this reached?
Authentication required?
Entry point:
runGmailSetup()provisioning path (ensureTailscaleEndpoint()->ensureSubscription()) plus setup/watcher log emission of sensitive values.Exploit Conditions
Complexity:
User interaction:
Prerequisites: Attacker can read URL-bearing logs/telemetry or command output that contains the push token (directly or via full endpoint URL).
Impact Assessment
Scope:
What can an attacker do?
pushToken) is exposed in URL/log output.Steps to Reproduce
openclaw webhooks gmail setup ... --tailscale funnel).https://<tailscale-host>/<path>?token=<pushToken>.--push-endpoint.push endpoint,Starting gog ... --token ... --hook-token ...,--jsonsummary with raw tokens.Recommended Fix
References