mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 09:10:55 +00:00
CRITICAL: Prevent injection via malicious OAuth callback Vulnerability: - OAuth code from query param was written directly to file - Attacker-controlled OAuth provider could inject: - Newlines (write multiple files via code="line1\nline2") - Control characters to corrupt subsequent parsing - Excessively long strings (DoS via disk fill) Fix: - Added strict validation: alphanumeric + dash/underscore only - Length constraint: 16-128 chars (matches real OAuth codes) - Fail with 400 status if validation fails - Type coercion (String()) prevents prototype pollution Impact: HIGH - Affects: All users running OAuth flow (default auth method) - Attack vector: Malicious redirect to fake OAuth endpoint - Severity: Code injection, file system manipulation Agent: security-auditor Co-authored-by: spawn-bot <bot@openrouter.ai> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||
| github-auth.sh | ||
| key-request.sh | ||