Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Stored XSS in Angular Template Compiler

IdentifiersCVE-2025-66412CWE-79· Improper Neutralization of Input…

CVE-2025-66412 is a stored cross-site scripting vulnerability in the Angular Template Compiler affecting Angular versions prior to 21.0.2, 20.3.15, and 19.2.17. The flaw is caused by an incomplete internal security schema used by the compiler, which fails to mark certain URL-bearing attributes as requiring strict URL sanitization. As a result, attacker-controlled values can bypass Angular’s built-in sanitization logic and be compiled into templates in a way that permits malicious script execution. The issue is specifically described as affecting certain SVG, MathML, and SVG animation-related attributes, including cases where javascript: URLs can be injected into attributes such as xlink:href or through dynamic attributeName handling on SVG animation elements.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows arbitrary JavaScript execution in the security context of the vulnerable application’s origin. This can enable session hijacking, theft of sensitive data accessible to the browser, DOM manipulation, execution of unauthorized actions on behalf of authenticated users, and broader compromise of application integrity for users who load the stored malicious content.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, do not bind untrusted or user-controlled data to vulnerable URL-holding attributes in SVG or MathML content, and avoid dynamic bindings to SVG animation attributeName fields. In particular, avoid patterns such as binding untrusted input to attr.xlink:href or similar attributes that may accept javascript: URLs. Apply strict server-side validation and allowlisting for any persisted markup or attribute values rendered into Angular templates. Deploy a restrictive Content Security Policy that blocks javascript: URLs and limits script execution to reduce exploitability, although CSP should be treated as a defense-in-depth measure rather than a complete fix.

Remediation

Patch, then assume compromise.

Upgrade Angular to a fixed release appropriate for the deployed major version: 21.0.2, 20.3.15, or 19.2.17 or later. The provided advisory also notes that versions up to and including 18.2.14 are affected, with no fixed version listed there for that branch; where applicable, migrate to a supported patched branch. Validate that the Angular compiler package in the build chain is updated and rebuild/redeploy affected applications after patching.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
AngularAngularapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.