GHSA-xqq2-4j46-vwp7: PinchTab has Unauthenticated Blind SSRF in Task Scheduler via Unvalidated callbackUrl
SummaryPinchTab v0.8.3 contains a server-side request forgery issue in the optional scheduler's webhook delivery path. When a task is submitted to `POST /tasks` with a user-controlled `callbackUrl`, the v0.8.3 scheduler sends an outbound HTTP `POST` to that URL when the task reaches a terminal state. In that release, the webhook path validated only the URL scheme and did not reject loopback, private, link-local, or other non-public destinations.Because the v0.8.3 implementation also used the default HTTP client behavior, redirects were followed and the destination was not pinned to validated IPs. This allowed blind SSRF from the PinchTab server to attacker-chosen HTTP(S) targets reachable from the server.This issue is narrower than a general unauthenticated internet-facing SSRF. The scheduler is optional and off by default, and in token-protected deployments the attacker must already be able to submit tasks using the server's master API token. In PinchTab's intended deployment model, that token represents administrative control rather than a low-privilege role. Tokenless deployments lower the barrier further, but that is a separate insecure configuration state rather than impact created by the webhook bug itself.PinchTab's default deployment model is local-first and user-controlled, with loopback bind and token-based access in the recommended setup. That lowers practical risk in default use, even though it does not remove the underlying webhook issue when the scheduler is enabled and reachable.This was addressed in v0.8.4 by validating callback targets before dispatch, rejecting non-public IP ranges, pinning delivery to validated IPs, disabling redirect following, and validating `callbackUrl` during task submission.Details**Issue 1 - Webhook dispatch validated only scheme in v0.8.3 (`internal/scheduler/webhook.go`):**
The vulnerable `sendWebhook()` implementation accepted any `http` or `https` URL and dispatched the outbound request without destination IP validation:In v0.8.3 there was no hostname resolution and no rejection of loopback, private, link-local, or other non-public addresses before dispatch.**Issue 2 - `callbackUrl` was accepted without server-side validation in v0.8.3 (`internal/scheduler/task.go`):**
The task submission schema accepted a user-controlled `callbackUrl`, and the v0.8.3 request validation logic did not validate it:This meant a user-supplied `callbackUrl` flowed into webhook delivery without early rejection.**Issue 3 - Redirects were followed in v0.8.3:**
The v0.8.3 webhook client used the default `http.Client`, so redirects were followed. That made the SSRF broader than the initially supplied URL alone, because an attacker-controlled external endpoint could redirect the server to a second destination.PoC**Prerequisites**PinchTab `v0.8.3``scheduler.enabled: true` because the scheduler is off by defaultThe attacker can submit tasks to `POST /tasks`In token-protected deployments, this requires the master API tokenIn deployments intentionally or accidentally running without a token, the barrier is lower, but that is separate from the webhook bug itselfAn attacker-controlled HTTP listener to receive and log the outbound requestEnable scheduler if required:Restart PinchTab after changing config.**Execution**
Submit a task with an attacker-controlled `callbackUrl`. A valid `tabId` is not required because the webhook fires for terminal task states, including failure:Confirm the task was accepted:Poll task state:Example result:Query the attacker-controlled receiver for the inbound POST:**Observation**The task is accepted and reaches a terminal state.The attacker-controlled receiver logs an inbound POST originating from the PinchTab server's egress address.The webhook includes the task snapshot payload and PinchTab-specific headers, confirming server-side delivery.In v0.8.3, the same dispatch path can be directed at internal or non-public HTTP targets reachable from the server.This PoC demonstrates blind outbound request capability; it does not by itself demonstrate response-body disclosure or automatic cloud credential theft.ImpactBlind SSRF from the PinchTab server to attacker-chosen HTTP(S) targets when the optional scheduler is enabled and reachable.Potential interaction with internal HTTP services or metadata endpoints that are reachable from the server but not from the attacker directly.Limited direct confidentiality impact because the webhook is a fixed outbound POST and the response body is not returned to the attacker through the task API.Potential low-integrity impact where internal services accept unauthenticated POST requests and perform state-changing actions.Practical risk is lower in the documented default local-first deployment model, where loopback bind, generated tokens, and a disabled scheduler reduce exposure.Suggested RemediationApply the same outbound destination controls used for safer HTTP egress paths to scheduler webhook delivery. Specifically:Resolve the hostname of `callbackUrl` before dispatch and reject loopback, private, link-local, multicast, unspecified, and other non-public IP ranges.Pin delivery to the validated IP set instead of relying on fresh DNS resolution during connect.Reject redirects or re-validate every redirect target before following it.Validate `callbackUrl` during task submission so unsafe targets fail early instead of only at delivery time.Optionally add an allowlist for approved webhook destinations if operators need narrowly scoped internal receivers.Evidence Capture**Exploit****Verify**
CVSS v3.1: 4.1