🇰🇷 한글 설명
fast-uri 라이브러리의 canonicalizeHost() 함수가 HTTP 계열 스킴 처리 시 WHATWG URL 파서의 동작을 검증 없이 수용하여 호스트를 임의로 재작성하는 취약점입니다. 이 과정에서 '@' 기호 앞의 데이터가 삭제되거나 탭, 줄바꿈 문자가 제거되어, 보안 정책을 우회하고 의도하지 않은 목적지로 트래픽을 유도할 수 있습니다.
💡 쉬운 설명
웹 주소를 분석하는 도구가 주소에 포함된 특수 문자를 멋대로 지워버리는 문제입니다. 이로 인해 보안 검사를 통과한 주소가 실제로는 공격자가 원하는 엉뚱한 사이트로 연결될 수 있습니다.
🇺🇸 원문 (English)
fast-uri is a dependency-free RFC 3986 URI parser and serializer for Node.js. In versions from 2.4.2 through 2.4.7, from 3.1.3 through 3.1.8, and from 4.0.1 through 4.2.2, for HTTP-family schemes the canonicalizeHost() function passes the parsed host to the WHATWG URL parser and adopts its hostname without checking that the parser consumed the entire input as a host, so the authority can be silently rewritten: data before an at-sign is dropped and tab, carriage-return, and line-feed characters are stripped, with no error reported. An application that enforces host-based policy such as denylists, loopback filtering, redirect validation, or outbound proxy routing on one representation can then see the canonical host diverge from what it checked, allowing traffic to be steered to an unintended destination. The issue is fixed in fast-uri 2.4.8, 3.1.9, and 4.2.3, and users should upgrade to one of these versions or later. As a workaround, reject an authority that contains more than one at-sign or any tab, carriage-return, or line-feed before calling fast-uri, or treat any non-empty parse error as fatal and compare hosts only from the same parse result.
📍 영향받는 시스템
fast-uri 2.4.2-2.4.7, 3.1.3-3.1.8, 4.0.1-4.2.2
⚔️ 공격 벡터
조작된 URI(at-sign 또는 제어 문자가 포함된 주소)를 입력하여 호스트 검증 로직을 우회함
🛡️ 대응 방법
fast-uri를 2.4.8, 3.1.9 또는 4.2.3 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 fast-uri의 버전이 취약한 버전 범위에 포함되는지 확인하십시오.