Description

A critical security flaw, tracked as CVE-2025-66412, has been found in the Angular template compiler, affecting applications running versions below 19.2.17, 20.3.15, or 21.0.2. This vulnerability involves the compiler's failure to adequately sanitize URL-bearing attributes within SVG animation elements. This failure creates a path where untrusted data, if stored and later rendered via vulnerable template bindings, could bypass Angular's security measures. Successful exploitation of this flaw requires untrusted input to be processed by a vulnerable component that handles these SVG elements. The underlying mechanism for this issue is that Angular’s internal security schema does not classify several SVG animation elements as security-sensitive. This bypass occurs when untrusted values are dynamically bound to the attributeName property and subsequently mapped to the dangerous URL attributes. Because these elements are not marked as security-sensitive, Angular's default sanitization process is silently bypassed. This allows for the insertion and execution of content that was not intended to run within the application's domain, granting unauthorized access or actions via template manipulation. To mitigate this risk, organizations must take immediate action by upgrading to the patched Angular releases (19.2.17, 20.3.15, or 21.0.2). For environments that cannot immediately upgrade, such as those still running Angular 18.x or earlier, applying strict Content Security Policy (CSP) rules that specifically block unsafe URL schemes is essential. Additionally, developers should immediately audit and ensure that untrusted data is never bound to SVG or MathML URL attributes and avoid dynamic manipulation of security-sensitive animation properties until their entire system is fully patched.