🇰🇷 한글 설명
Angular의 SSR 환경에서 Hydration 과정 중 DOM Clobbering 취약점이 발견되었습니다. 공격자가 예측 가능한 ID인 'ng-state'를 가진 요소를 조작하여 Angular가 상태 데이터를 잘못된 요소로부터 읽어오도록 유도할 수 있습니다. 이로 인해 애플리케이션의 런타임 상태가 오염될 수 있습니다.
💡 쉬운 설명
웹사이트가 화면을 그릴 때 사용하는 특정 이름표(ID)를 해커가 가짜로 만들어낼 수 있는 문제입니다. 해커가 만든 가짜 이름표 때문에 웹사이트가 중요한 정보를 엉뚱한 곳에서 읽어와 오류가 발생하거나 조작될 수 있습니다.
🇺🇸 원문 (English)
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.1, 21.2.17, and 20.3.25, to optimize client-side bootstrap in Server-Side Rendered (SSR) environments, Angular supports Hydration via provideClientHydration(). During SSR, Angular serializes the application's runtime state (such as cached HttpClient responses) and outputs it into the HTML stream as a <script> tag with a predictable identifier. During client bootstrap, Angular recovers this state by looking up the element via document.getElementById('ng-state') and parsing its text content. Because the DOM element lookup for the state container is predictable and relies solely on the ID selector (ng-state), it is susceptible to DOM Clobbering. If the application binds untrusted user input or CMS content to element properties such as id (e.g., <div [id]="userInput"> or <a id="ng-state">) before the genuine <script> tag is parsed by the browser, the attacker-controlled element takes precedence in the DOM lookup. During hydration, when Angular calls document.getElementById('ng-state'), the browser returns the attacker's clobbered element. Angular then attempts to parse the text content or attributes of this clobbered element as JSON. This vulnerability is fixed in 22.0.1, 21.2.17, and 20.3.25.
📍 영향받는 시스템
Angular versions prior to 22.0.1, 21.2.17, and 20.3.25
⚔️ 공격 벡터
사용자 입력값이 HTML ID 속성에 바인딩될 때 'ng-state' ID를 가진 요소를 삽입하여 DOM lookup을 가로채는 방식
🛡️ 대응 방법
Angular를 최신 패치 버전(22.0.1, 21.2.17, 20.3.25 이상)으로 업데이트하십시오.
🔧 검증 코드
출력된 @angular/core의 버전이 취약점이 해결된 버전(22.0.1, 21.2.17, 20.3.25 중 하나)보다 높은지 확인하십시오.
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server