🇰🇷 한글 설명
next-intl은 Next.js용 국제화 라이브러리입니다. 4.9.1 이전 버전에서 localePrefix를 'as-needed'로 설정한 경우, 미들웨어가 상대 경로 리다이렉트 대상을 잘못 해석하여 scheme-relative URL(//)이나 URL 파서가 제거하는 제어 문자를 통해 외부 호스트로 리다이렉트할 수 있습니다. 이 문제는
[email protected]에서 패치되었습니다.
💡 쉬운 설명
사용자가 신뢰하는 사이트에서 시작했지만 자동으로 악성 외부 사이트로 이동될 수 있는 취약점입니다. 피싱 등에 악용될 수 있으므로 라이브러리를 최신 버전으로 업데이트해야 합니다.
🇺🇸 원문 (English)
next-intl provides internationalization for Next.js. Applications using the `next-intl` middleware prior to version 4.9.1with `localePrefix: 'as-needed'` could construct URLs where path handling and the WHATWG URL parser resolved a relative redirect target to another host (e.g. scheme-relative `//` or control characters stripped by the URL parser), so the middleware could redirect the browser off-site while the user still started from a trusted app URL. The problem has been patchedin `
[email protected]`.
📍 영향받는 시스템
next-intl 4.9.1 미만 버전을 사용하고 localePrefix를 'as-needed'로 설정한 Next.js 애플리케이션
⚔️ 공격 벡터
공격자가 조작된 URL(예: //evil.com 또는 제어 문자 포함)을 전달하여 미들웨어의 리다이렉트를 외부 도메인으로 유도하는 오픈 리다이렉트 공격
🛡️ 대응 방법
next-intl을 4.9.1 이상 버전으로 업데이트 (npm install next-intl@latest)
🔧 검증 코드
출력된 버전이 4.9.1 이상이면 패치 적용됨, 4.9.1 미만이거나 결과가 없으면 취약하거나 미설치 상태이므로 프로젝트 의존성을 확인해야 함
npm ls next-intl 2>/dev/null | grep next-intl