Angular Platform Vulnerability Lets Attackers Execute Code Through Malicious SVG Animations
## Cybersecurity: Angular Template Compiler Security Update
Cybersecurity: Angular Template Compiler Security Update
The Angular team has released critical security updates to address a high-severity vulnerability identified in the Angular Template Compiler.
This vulnerability, tracked as CVE-2025-66412, allows attackers to bypass security protections and execute malicious code within a user's browser.
The flaw is classified as a Stored Cross-Site Scripting (XSS) issue, originating from an incomplete security schema within the Angular compiler.
Metric Details
CVE ID CVE-2025-66412
The Angular team has released critical security updates to address a high-severity vulnerability identified in the Angular Template Compiler.
Severity High (CVSS 8.5)
Vulnerability Type Stored XSS via SVG Animation
Angular automatically sanitizes untrusted data to prevent script injection. However, the flaw affects specific SVG (Scalable Vector Graphics) animation and MathML attributes, revealing a blind spot in security handling.
The vulnerability arises in SVG animation elements, such as <animate> or <set> , which use the attributeName attribute to define animated properties. The compiler failed to validate this attribute correctly, allowing exploitation.
Session Hijacking: Attackers can capture authentication tokens and cookies. Data Theft: Sensitive data may be extracted and sent to external servers. Unauthorized Actions: Scripts can perform actions appearing as user-initiated.
The vulnerability impacts multiple major versions of the @angular/compiler package. The Angular team has released patches for versions 19, 20, and 21. Versions 18 and older require immediate upgrading as they are unpatched.
Developers are advised to update to the latest patched versions (v19.2.17, v20.3.15, or v21.0.2) promptly. If immediate upgrading is not possible, ensure no untrusted data binds to SVG animation attributes. Implement a Content Security Policy (CSP) to block JavaScript URLs, mitigating the attack vector.
Based on reporting by GBHackers.
