🇰🇷 한글 설명
follow-redirects는 Node.js에서 리다이렉트를 자동으로 따라가는 HTTP/HTTPS 클라이언트 래퍼입니다. 1.16.0부터 1.16.2 이전 버전에서는 sensitiveHeaders 옵션을 instanceof Array로 검사하여, 다른 JavaScript realm에서 생성된 배열이 빈 목록으로 대체되는 문제가 있습니다. 이로 인해 공격자가 제어하는 교차 출처 리다이렉트가 발생하면 민감 헤더가 리다이렉트 대상으로 전달될 수 있습니다.
💡 쉬운 설명
웹 요청이 다른 주소로 자동 이동할 때, 로그인 정보가 담긴 보안 헤더가 의도치 않게 외부 서버로 넘어갈 수 있는 문제입니다. 1.16.2 이상 버전으로 업데이트하면 해결됩니다.
🇺🇸 원문 (English)
follow-redirects is a Node.js HTTP and HTTPS client wrapper that automatically follows redirects. From 1.16.0 until 1.16.2, the documented sensitiveHeaders option is checked with value instanceof Array, so an array created in another JavaScript realm is replaced with an empty list even though Array.isArray recognizes it. When a request then follows an attacker-controlled cross-origin redirect, a custom credential header named in that discarded list can be forwarded to the redirect destination. This issue is fixed in version 1.16.2.
📍 영향받는 시스템
follow-redirects 1.16.0 이상 1.16.2 미만을 사용하는 Node.js 애플리케이션
⚔️ 공격 벡터
공격자가 제어하는 서버로의 교차 출처 리다이렉트를 유도하여 민감한 인증 헤더를 탈취
🛡️ 대응 방법
follow-redirects를 1.16.2 이상으로 업데이트 (npm update follow-redirects)
🔧 검증 코드
출력된 버전이 1.16.0 이상 1.16.2 미만이면 취약하며, 1.16.2 이상이면 패치된 상태입니다.
npm ls follow-redirects 2>/dev/null | grep follow-redirects