9router/open-sse
@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
..
config Update DeepSeek model pricing and add V4 Pro (#938) 2026-05-09 10:11:39 +07:00
executors feat: add CommandCode provider support 2026-05-07 23:01:33 +07:00
handlers Add Cloudflare Workers AI image generation (#973) 2026-05-09 09:53:39 +07:00
rtk Enhance chat handling and introduce Caveman feature 2026-04-30 18:00:38 +07:00
services feat: add CommandCode provider support 2026-05-07 23:01:33 +07:00
transformer feat: enhance request handling and error management in chatCore and streamToJsonConverter 2026-02-15 12:02:53 +07:00
translator feat: enhance CommandCode integration with improved message handling 2026-05-07 23:02:07 +07:00
utils 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
.npmignore Update jsconfig.json and package.json to correct open-sse path references from relative to local directory. 2026-01-05 10:37:09 +07:00
index.js Refactor config 2026-03-12 16:20:46 +07:00