Summary The Pusher-compatible REST API includes bodymd5 in the HMAC signature string but never computes or verifies the MD5 of the received HTTP body, allowing anyone who observes a signed request to replay it with an entirely different body.
Details In pusher/http.go, the Handler function extracts bodymd5 from the URL query string (line 169) and includes it verbatim in stringToSign (line 175). It then verifies HMAC(stringToSign, secret) == authsignature. After verification succeeds, handleEvents reads and parses r.Body (lines 201-212) without ever computing md5(body) and comparing it against the bodymd5 that was signed. The Pusher protocol specification explicitly requires the server to verify this digest to prevent body-substitution attacks. There is also no authtimestamp staleness check, so replays are valid indefinitely.
PoC 1. Capture a legitimate signed POST to /apps/<appid>/events?authkey=K&authtimestamp=T&authversion=1.0&bodymd5=LEGITMD5&authsignature=SIG carrying body {"name":"safe-event","channel":"ch","data":"..."} (e.g., from TLS-terminating load-balancer logs). 2. Send a new request with the same query string parameters but a different body: {"name":"injected-event","channel":"admin","data":"malicious-payload"} 3. The server accepts the request (HMAC over stringToSign matches the original) and broadcasts the injected event to all subscribers of admin.
Impact An attacker who can read any single signed Pusher API request (from logs, a shared proxy, or a network tap) can broadcast arbitrary events to any channel indefinitely, potentially forging server-side events, corrupting application state, or delivering phishing messages to WebSocket clients.
Fix After reading r.Body, compute hex(md5(body)) and compare it to the bodymd5 query parameter using a constant-time comparison before proceeding. Additionally, reject requests whose authtimestamp is more than 600 seconds from the current time.
Summary The telemetry subsystem embeds a hardcoded auth token ("secret") in the public source and transmits raw CLI arguments—including --secret, --jwtsecret, and --httprpcsecret values—to a third-party telemetry endpoint.
Details In telemetry/config.go line 12, var authToken = "secret" is committed in the public repository and used to authenticate to https://telemetry.anycable.io. In telemetry/telemetry.go, clusterFingerprint() (line 320) calls both anycableFileConfig(c.ConfigFilePath) (line 333), which reads the full TOML config file contents, and anycableCLIArgs() (line 402), which reads os.Args[1:] verbatim—including any --secret=..., --jwtsecret=..., --httprpcsecret=... arguments. Both raw values are passed to generateDigest() (line 373), meaning the actual secret strings flow through the code path and are included in telemetry data sent to the third-party server. Since the hardcoded authToken = "secret" is public, any attacker who can perform DNS hijacking or is positioned on the network path can intercept and read the telemetry payload containing operator credentials.
PoC 1. Read telemetry/config.go in the public repo to find authToken = "secret". 2. Set up a DNS spoof for telemetry.anycable.io pointing to an attacker-controlled server. 3. Start anycable-go with --secret=my-production-secret. 4. The server sends a POST to the attacker's endpoint with the telemetry JSON payload. The clusterFingerprint field contains data derived from raw os.Args including --secret=my-production-secret.
Impact In MITM/DNS-hijack scenarios, production secrets (JWT secrets, broadcast keys, RPC auth) are exposed to third parties. The hardcoded authToken = "secret" provides no protection since it is known to anyone reading the open-source code.
Fix 1. Remove the hardcoded authToken from source; generate or require operator configuration at build time or deployment time. 2. Remove anycableCLIArgs() from the fingerprint computation, or sanitize it to exclude values of secret-bearing flags before hashing. 3. Add a documented opt-out mechanism for telemetry.