🇰🇷 한글 설명
Node.js용 URI 파서인 fast-uri에서 스킴(scheme) 유무에 따라 호스트를 처리하는 방식이 달라지는 호스트 혼동 취약점이 발견되었습니다. 이로 인해 보안 정책 검사 시 사용된 호스트와 실제 접속되는 호스트가 달라져 정책 우회가 가능해집니다.
💡 쉬운 설명
주소를 해석하는 프로그램이 주소 앞에 'http://' 같은 형식이 있느냐 없느냐에 따라 서로 다른 주소로 인식하는 문제입니다. 이를 이용해 공격자는 보안 검사를 통과하면서도 실제로는 엉뚱한 위험한 사이트로 접속하게 만들 수 있습니다.
🇺🇸 원문 (English)
fast-uri is a URI parser for Node.js. It canonicalizes a host to its ASCII form only when the input carries an explicit scheme, so a scheme-relative reference such as a host preceded by two slashes is returned with its host verbatim and no error set. As a result fast-uri's own entry points disagree with each other: parse, resolve, normalize, and equal can yield different hosts for the same input depending only on whether a scheme is written out, and equal can return opposite verdicts for the same pair of hosts. An application that extracts a host with fast-uri to check it against a policy list and then resolves the same reference can make its decision on one host while the destination is another, enabling host confusion and policy bypass. The affected versions are 2.4.2 up to but not including 2.4.5, 3.1.3 up to but not including 3.1.6, and 4.0.1 up to but not including 4.1.3. The issue is fixed in 2.4.5, 3.1.6, and 4.1.3, which canonicalize the host consistently across the resolve path. Users should upgrade to a patched version.
📍 영향받는 시스템
fast-uri 2.4.2~2.4.4, 3.1.3~3.1.5, 4.0.1~4.1.2
⚔️ 공격 벡터
스킴이 생략된 상대 경로(예: //example.com)를 사용하여 보안 정책 검사 로직을 우회하는 호스트 혼동 공격
🛡️ 대응 방법
fast-uri를 패치된 버전인 2.4.5, 3.1.6 또는 4.1.3 이상으로 업그레이드하십시오.
🔧 검증 코드
출력된 fast-uri의 버전을 확인하여 취약한 버전 범위에 해당하는지 체크합니다.