🇰🇷 한글 설명
Node.js용 HTTP/1.1 클라이언트인 Undici의 특정 버전에서 교차 출처 리다이렉트 시 Cookie 헤더를 삭제하지 않는 취약점이 발견되었습니다. 이로 인해 사용자의 쿠키가 제3자 사이트나 공격자가 제어하는 리다이렉션 대상지로 유출될 수 있습니다. 해당 문제는 버전 5.26.2에서 패치되었습니다.
💡 쉬운 설명
웹사이트를 이용하다가 다른 사이트로 자동으로 연결될 때, 원래 사이트의 중요한 로그인 정보(쿠키)가 새 사이트로 몰래 전달될 수 있는 문제입니다. 공격자가 중간에 가로채거나 엉뚱한 곳으로 정보를 보내도록 유도할 수 있습니다.
🇺🇸 원문 (English)
Undici is an HTTP/1.1 client written from scratch for Node.js. Prior to version 5.26.2, Undici already cleared Authorization headers on cross-origin redirects, but did not clear `Cookie` headers. By design, `cookie` headers are forbidden request headers, disallowing them to be set in RequestInit.headers in browser environments. Since undici handles headers more liberally than the spec, there was a disconnect from the assumptions the spec made, and undici's implementation of fetch. As such this may lead to accidental leakage of cookie to a third-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the third party site. This was patched in version 5.26.2. There are no known workarounds.
📍 영향받는 시스템
Undici version < 5.26.2
⚔️ 공격 벡터
공격자가 제어하는 오픈 리다이렉터(Open Redirector)를 통해 사용자의 쿠키를 외부 사이트로 유출시키는 방식
🛡️ 대응 방법
Undici 라이브러리를 버전 5.26.2 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 결과의 버전 번호가 5.26.2 미만인지 확인하십시오.
npm list undici | grep undici