🇰🇷 한글 설명
Effect TypeScript 프레임워크에서 Next.js App Router 내의 RpcServer.toWebHandler 사용 시, AsyncLocalStorage 기반 API가 동시 요청의 컨텍스트를 잘못 읽어 다른 사용자의 인증 정보가 노출될 수 있는 취약점입니다. 버전 3.20.0 이상으로 업그레이드하면 해결됩니다.
💡 쉬운 설명
웹 서버가 여러 사용자의 요청을 동시에 처리할 때, 한 사용자의 로그인 정보가 다른 사용자에게 잘못 전달될 수 있습니다. 이는 인증 시스템의 격리 오류로 인해 발생합니다.
🇺🇸 원문 (English)
Effect is a TypeScript framework that consists of several packages that work together to help build TypeScript applications. Prior to version 3.20.0, when using `RpcServer.toWebHandler` (or `HttpApp.toWebHandlerRuntime`) inside a Next.js App Router route handler, any Node.js `AsyncLocalStorage`-dependent API called from within an Effect fiber can read another concurrent request's context — or no context at all. Under production traffic, `auth()` from `@clerk/nextjs/server` returns a different user's session. Version 3.20.0 contains a fix for the issue.
📍 영향받는 시스템
Effect < 3.20.0 (Next.js App Router와 RpcServer.toWebHandler 사용 시)
⚔️ 공격 벡터
동시성 환경에서 여러 요청을 발송하면 AsyncLocalStorage 컨텍스트 혼동으로 인해 다른 사용자의 세션 정보 획득
🛡️ 대응 방법
Effect를 버전 3.20.0 이상으로 업그레이드하고 Next.js 애플리케이션 재배포
🔧 검증 코드
설치된 Effect 버전이 3.20.0 이상이면 안전하고, 그 이하면 즉시 업그레이드 필요
npm list effect 2>/dev/null | grep -E 'effect@|^─ effect' | head -1