Production leaks server stack traces in tRPC error responses #23
Labels
No labels
area/auth
area/backend
area/ci
area/deploy
area/e2e
area/frontend
area/shared
blocked
good-first-issue
needs-info
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
celilo/lunacycle#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Error responses from the production API include a full
stackfield, exposing internal paths and framework internals to any unauthenticated caller.Reproduce — note this needs no valid credentials:
Impact. Standard information disclosure. Stack traces reveal internal structure and framework versions, and give an attacker feedback while probing. Minified single-file bundle paths (
/$bunfs/root/server-linux-x64) limit the damage somewhat, but line/column offsets still leak, and any future unminified or differently-packaged build would leak more.tRPC omits
stackin production whenNODE_ENV=production; it is presumably unset or non-production in the deployed unit. Worth confirming how the systemd unit is built rather than assuming — the fix may be an env var in the celilo deploy rather than a code change, or an expliciterrorFormatterthat stripsstackregardless of environment. The explicit formatter is the more robust option since it does not depend on deployment env being right.Found while investigating the first-ever production run of the smoke checks (#20).