# Unauthenticated endpoint with privileged side effects

Route reachable without credentials that spawns processes, writes shared state, or runs raw SQL

_Area: Web access control and IDOR. Seen in 3 disclosed reports; latest 2026-06-18. Updated 2026-10-31._

## How it works
An endpoint that performs a privileged action is reachable without credentials, or its authorization check runs too late to matter. The code assumes "only trusted callers reach this handler" or "the auth filter already ran," but neither holds: the route is exposed, or the check is a post-execution filter. The privileged side effect (process spawn, raw query, global write) happens before or without any caller check.

## Where it shows up
- Auth is opt-in (e.g. `AUTH_ENFORCE` default off) and the service binds `0.0.0.0` by default [E1](https://bugbountylibrary.com/r/ghsa%3AGHSA-p75f-6fp4-p57w.md)
- "Connect"/"install"/"run" endpoints that take a caller-supplied command, args, or query string [E1](https://bugbountylibrary.com/r/ghsa%3AGHSA-p75f-6fp4-p57w.md)[E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-xhw7-j96h-c3g5.md)
- Authorization implemented as a result/response filter or `OnResultExecuting`, i.e. after the handler body [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-xhw7-j96h-c3g5.md)
- Handler binds a body parameter straight into a raw SQL or process API with no caller check [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-xhw7-j96h-c3g5.md)
- Module-level mutable globals written by one endpoint and read by a privileged sibling [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-w3x5-7c4c-66p9.md)
- Wrapped third-party UI packages whose own route table and auth defaults differ from the wrapper [E1](https://bugbountylibrary.com/r/ghsa%3AGHSA-p75f-6fp4-p57w.md)

## How to review
For each privileged handler, confirm the authorization decision is made before any side effect and cannot be skipped. The invariant: every path that spawns a process, executes raw SQL, or mutates shared state must have a caller-identity check that runs first and fails closed. Check the filter/attribute type (pre-handler vs post-handler), the default of any auth flag, the bind address, and whether a body parameter reaches a dangerous sink unchecked. For shared globals, trace every writer and confirm each is authenticated and scoped per request.

## Variants seen
- Unauthenticated process spawn via MCP stdio connect with caller command/args [E1](https://bugbountylibrary.com/r/ghsa%3AGHSA-p75f-6fp4-p57w.md)
- Post-handler auth filter bypass allowing arbitrary SQL through an admin page [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-xhw7-j96h-c3g5.md)
- Unauthenticated write to a module global that poisons a privileged restore path [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-w3x5-7c4c-66p9.md)

## Impact and severity
Led to arbitrary local process execution as the service user [E1](https://bugbountylibrary.com/r/ghsa%3AGHSA-p75f-6fp4-p57w.md), arbitrary SQL execution by any registered user [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-xhw7-j96h-c3g5.md), and admin takeover escalating to RCE [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-w3x5-7c4c-66p9.md). Severity is high to critical. Worse when defaults are insecure (auth off, 0.0.0.0 bind), when the sink is raw SQL or process launch, and when the poisoned state feeds a second privileged endpoint.

## Evidence
- E1: https://bugbountylibrary.com/r/ghsa%3AGHSA-p75f-6fp4-p57w.md
- E2: https://bugbountylibrary.com/r/ghsa%3AGHSA-xhw7-j96h-c3g5.md
- E3: https://bugbountylibrary.com/r/ghsa%3AGHSA-w3x5-7c4c-66p9.md
