9router/open-sse/utils
@aaronjmars 52c38cf94c
fix(security): scope OAuth callback postMessage targets and re-enable TLS verification on DNS-bypass fetch (#998)
Two findings, neither blocked by anything else:

1. src/app/callback/page.js — the OAuth callback page posted the
   { code, state } payload to window.opener with targetOrigin "*", so any
   page that opened the popup against the well-known redirect_uri received
   the live OAuth code. The expectedOrigins list was already computed but
   never used. Iterate over it and pass the origin per send.

2. open-sse/utils/proxyFetch.js — createBypassRequest() set
   rejectUnauthorized: false on the HTTPS request that runs after the
   Google-DNS-resolved real-IP fallback (used for cloudcode-pa.googleapis,
   GitHub Copilot, Cursor, AWS LLM endpoints). Combined with servername:
   parsedUrl.hostname this gave SNI-correct connections that nonetheless
   ignored cert validation, so an on-path attacker could swap in their
   own cert and read the user's API tokens / prompts. Drop the flag.

Detected by Aeon + semgrep (javascript.browser.security.wildcard-postmessage-configuration
+ problem-based-packs.insecure-transport.js-node.bypass-tls-verification).
Severity: HIGH (#1) / MEDIUM (#2).
CWEs: CWE-1385 (#1), CWE-295 (#2).

Co-authored-by: aeonframework <aeon@aeonframework.dev>
2026-05-10 21:10:48 +07:00
..
bypassHandler.js feat(chat): Enhance bypass handling and introduce CC filter naming feature 2026-03-13 09:41:40 +07:00
claudeCloaking.js add GPT 5.5 model 2026-04-24 09:51:05 +07:00
claudeHeaderCache.js Fix : Updated Anthropic-Beta header. 2026-04-05 07:46:26 +07:00
clientDetector.js Fix GitHub Copilot agent mode with Antigravity 2026-04-26 17:47:13 +08:00
cursorChecksum.js fix: update Cursor client version to 3.1.0 for Composer 2 compatibility (#525) 2026-04-08 15:37:51 +07:00
cursorProtobuf.js fix: force Agent mode in Cursor protobuf when User-Agent contains Claude Code (closes #643) (#692) 2026-04-22 10:24:58 +07:00
error.js - Updated markAccountUnavailable function to accept resetsAtMs for precise cooldown management. 2026-04-24 11:36:16 +07:00
ollamaTransform.js Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
proxyFetch.js fix(security): scope OAuth callback postMessage targets and re-enable TLS verification on DNS-bypass fetch (#998) 2026-05-10 21:10:48 +07:00
reasoningContentInjector.js feat: add STT support, Gemini TTS, and expand usage tracking 2026-05-05 10:32:59 +07:00
requestLogger.js Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
sessionManager.js Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
stream.js Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
streamHandler.js fix: Update abort method in pipeWithDisconnect to return a promise for better error handling 2026-03-14 11:38:33 +07:00
streamHelpers.js feat(ollama): Enhance Ollama support by adding new models, updating API format handling, and integrating translation functionality. 2026-03-12 15:24:10 +07:00
usageTracking.js Fix bug 2026-04-11 11:36:33 +07:00