GHSA-mrqc-3276-74f8: PinchTab: API Bearer Token Exposed in URL Query Parameter via Server Logs and Intermediary Systems
SummaryPinchTab `v0.7.8` through `v0.8.3` accepted the API token from a `token` URL query parameter in addition to the `Authorization` header. When a valid API credential is sent in the URL, it can be exposed through request URIs recorded by intermediaries or client-side tooling, such as reverse proxy access logs, browser history, shell history, clipboard history, and tracing systems that capture full URLs.This issue is an unsafe credential transport pattern rather than a direct authentication bypass. It only affects deployments where a token is configured and a client actually uses the query-parameter form. PinchTab's security guidance already recommended `Authorization: Bearer <token>`, but `v0.8.3` still accepted `?token=` and included first-party flows that generated and consumed URLs containing the token.This was addressed in v0.8.4 by removing query-string token authentication and requiring safer header- or session-based authentication flows.Details**Issue 1 — Query-string token accepted in `v0.7.8` through `v0.8.3` (`internal/handlers/middleware.go`):**
The `v0.8.3` authentication middleware accepted credentials from the URL query string:This means any client sending `GET /health?token=<secret>` in `v0.8.3` would authenticate successfully without using the `Authorization` header. I verified the same query-token auth pattern is present in the historical tag range starting at `v0.7.8`, and it is removed in `v0.8.4`.**Issue 2 — First-party setup and dashboard flows in `v0.8.3` generated and consumed `?token=` URLs:**
The `v0.8.3` setup flow generated dashboard URLs containing the token in the query string:The `v0.8.3` dashboard frontend also supported one-click login from that same query-string token:That combination materially increased the chance that users would open, copy, paste, bookmark, or log URLs containing live credentials before the token was scrubbed from the visible address bar.**Issue 3 — Exposure depends on surrounding systems recording the URL:**
PinchTab's own request logger records `r.URL.Path`, not the full raw query string, so the leak is not primarily through PinchTab's structured application log. The risk comes from surrounding systems or client tooling that record the full request URI, such as:reverse proxies and load balancersbrowser history or bookmarksshell history containing full `curl` commandsclipboard or terminal history when the wizard prints and copies a tokenized URLtracing or monitoring systems that capture full request URLsPoC**Step 1 — Confirm auth is required**Expected in token-protected affected deployments:**Step 2 — Authenticate using the vulnerable query-parameter pattern**Expected:This demonstrates that the token is accepted from the URL.**Step 3 — Observe the exposure vector**
If the request traverses a system that records the full URI, the token may appear in logs or local history, for example:In `v0.8.3`, a first-party reproduction path also exists without any external proxy: run the setup wizard, copy the printed dashboard URL containing `?token=...`, and note that the live credential is now present in clipboard history and any place that URL is pasted.ImpactExposure of a valid API token through unsafe URL-based transport when a client uses the `?token=` authentication form.Lower barrier for credential compromise where reverse proxies, browser history, shell history, clipboard history, or tracing systems retain full request URIs.The `v0.8.3` wizard/dashboard flow increased the practical likelihood of this exposure by generating and consuming tokenized URLs as a first-party login pattern.Practical risk depends on actual use of the query-token pattern; deployments that use only `Authorization: Bearer <token>` are not affected by this issue in practice.This is not a direct authentication bypass. An attacker still needs access to a secondary source that captured the URL containing the token.Suggested RemediationReject query-string token authentication and accept credentials only through the `Authorization` header or controlled session mechanisms.Avoid generating user-facing URLs that contain live credentials.Document header-based auth as the only supported non-browser API authentication pattern.Recommend token rotation for users who may previously have used query-parameter authentication.**Screenshot Capture**
<img width="1162" height="164" alt="ภาพถ่ายหน้าจอ 2569-03-18 เวลา 12 46 08" src="https://github.com/user-attachments/assets/e68b4469-dafd-400d-a6e1-f74d368cc8ac" />
CVSS v3.1: 4.3