🇰🇷 한글 설명
Angular의 @angular/platform-server DOM 에뮬레이션 파서에서 불완전한 DOCTYPE을 포함한 HTML을 처리할 때 무한 루프가 발생하는 취약점입니다. 공격자가 제어하는 HTML을 서버 측 렌더링(SSR) 과정에서 처리할 경우, CPU 점유율이 100%로 치솟아 서비스 거부(DoS) 상태를 유발할 수 있습니다.
💡 쉬운 설명
특수하게 조작된 웹 페이지 코드를 서버에 보내면 서버가 코드를 읽다가 무한 반복에 빠져 멈춰버리는 문제입니다. 이로 인해 웹사이트가 응답하지 않거나 다른 사용자들이 접속할 수 없게 됩니다.
🇺🇸 원문 (English)
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 20.3.31, 21.2.23, and 22.1.6, the @angular/platform-server DOM emulation parser can enter an infinite synchronous loop when Angular server-side rendering processes attacker-controlled HTML containing an incomplete DOCTYPE that ends with whitespace at end of input. In Domino lib/HTMLParser.js, after_doctype_name_state emits doctype and EOF tokens without advancing nextchar or leaving the fixed-lookahead state, so the scanner repeatedly handles the same EOF marker. A remote unauthenticated attacker can use this condition through server-side HTML parsing paths such as innerHTML binding to consume a Node.js SSR worker at full CPU, starve the event loop, and stop concurrent and subsequent requests. This issue is fixed in versions 20.3.31, 21.2.23, and 22.1.6.
📍 영향받는 시스템
@angular/platform-server (20.3.31, 21.2.23, 22.1.6 미만 버전)
⚔️ 공격 벡터
서버 측 렌더링(SSR) 과정에서 innerHTML 바인딩 등을 통해 조작된 HTML 입력값 전달
🛡️ 대응 방법
Angular 프레임워크를 최신 보안 패치 버전(20.3.31, 21.2.23, 22.1.6 이상)으로 업데이트
🔧 검증 코드
출력된 버전이 취약한 버전 범위(20.3.31, 21.2.23, 22.1.6 미만)에 해당하는지 확인
npm list @angular/platform-server