🇰🇷 한글 설명
NextAuth.js 5.0.0-beta.0부터 5.0.0-beta.32 버전에서 서버 설정 오류 발생 시 인증 객체가 존재하지 않음에도 불구하고 참(true)으로 평가되는 취약점이 발견되었습니다. 이로 인해 인증이 필요한 경로가 설정 오류 시 모든 사용자에게 공개될 수 있는 'Fail Open' 현상이 발생합니다.
💡 쉬운 설명
로그인 확인 과정에서 서버 설정에 문제가 생기면, 시스템이 오류를 '로그인 성공'으로 잘못 판단하는 문제입니다. 이 때문에 로그인을 하지 않은 사람도 권한이 필요한 페이지에 마음대로 들어갈 수 있습니다.
🇺🇸 원문 (English)
NextAuth.js provides authentication for Next.js. From next-auth 5.0.0-beta.0 until 5.0.0-beta.32, applications that gate access by checking only for the existence of the auth object returned by the auth() wrapper can fail open when Auth.js has a server configuration error. In middleware, Route Handlers, React Server Components, and other auth() entry points, a non-OK session response is parsed into a truthy error object instead of null, so checks such as !!auth and if (req.auth) evaluate to true for unauthenticated requests. A provider missing both the issuer and authorization endpoint triggers InvalidEndpoints, and an unset AUTH_SECRET or another server configuration error can produce the same behavior. There is no impact while configuration is valid, but after a deployment becomes misconfigured, routes protected only by session existence silently grant access to every visitor. This issue is fixed in next-auth 5.0.0-beta.32.
📍 영향받는 시스템
NextAuth.js 5.0.0-beta.0 ~ 5.0.0-beta.32
⚔️ 공격 벡터
서버 설정 오류(AUTH_SECRET 미설정 등)를 유도하거나 발생한 상태에서 인증 없이 보호된 경로에 접근
🛡️ 대응 방법
NextAuth.js 버전을 5.0.0-beta.32 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 5.0.0-beta.32 미만인 경우 해당 취약점에 노출된 상태입니다.
npm list next-auth | grep -E 'next-auth@5\.0\.0-beta\.[0-9]+'
💻 영향받는 소프트웨어
IBM WebSphere Application Server