🇰🇷 한글 설명
Angular의 HttpClient에서 프로토콜 상대 URL(//로 시작하는 URL)을 사용할 때 XSRF 토큰이 유출되는 취약점입니다. 해당 URL을 동일 출처(Same-Origin)로 잘못 판단하여 XSRF 보호 메커니즘이 작동하지 않고 토큰을 헤더에 포함시키게 됩니다. 이로 인해 공격자 제어 도메인으로 XSRF 토큰이 노출될 수 있습니다.
💡 쉬운 설명
웹사이트가 보안을 위해 사용하는 비밀번호 같은 토큰이 잘못된 주소 입력 방식으로 인해 외부 사이트로 새어나갈 수 있는 문제입니다. 공격자는 이 토큰을 가로채서 사용자를 대신해 위험한 요청을 보낼 수 있습니다.
🇺🇸 원문 (English)
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to versions 19.2.16, 20.3.14, and 21.0.1, there is a XSRF token leakage via protocol-relative URLs in angular HTTP clients. The vulnerability is a Credential Leak by App Logic that leads to the unauthorized disclosure of the Cross-Site Request Forgery (XSRF) token to an attacker-controlled domain. Angular's HttpClient has a built-in XSRF protection mechanism that works by checking if a request URL starts with a protocol (http:// or https://) to determine if it is cross-origin. If the URL starts with protocol-relative URL (//), it is incorrectly treated as a same-origin request, and the XSRF token is automatically added to the X-XSRF-TOKEN header. This issue has been patched in versions 19.2.16, 20.3.14, and 21.0.1. A workaround for this issue involves avoiding using protocol-relative URLs (URLs starting with //) in HttpClient requests. All backend communication URLs should be hardcoded as relative paths (starting with a single /) or fully qualified, trusted absolute URLs.
📍 영향받는 시스템
Angular versions prior to 19.2.16, 20.3.14, and 21.0.1
⚔️ 공격 벡터
프로토콜 상대 URL(//)을 이용한 HttpClient 요청을 통해 XSRF 토큰을 공격자 도메인으로 유출
🛡️ 대응 방법
Angular를 19.2.16, 20.3.14 또는 21.0.1 이상의 버전으로 업데이트하거나, HttpClient 요청 시 //로 시작하는 URL 대신 절대 경로(/) 또는 완전한 URL을 사용하십시오.
🔧 검증 코드
출력된 @angular/core의 버전이 취약점이 해결된 버전(19.2.16, 20.3.14, 21.0.1 이상)인지 확인하십시오.