angular/packages/compiler/test
Alan Agius 7c42e2ebeb fix(compiler): prevent XSS via SVG animation attributeName and MathML/SVG URLs
This commit implements a security fix to prevent XSS vulnerabilities where SVG animation elements (`<animate>`, `<set>`, etc.) could be used to modify the `href` or `xlink:href` attributes of other elements to `javascript:` URLs.

The fix introduces a runtime validation step:
- A new [ɵɵValidateAttribute](cci:1://file:///usr/local/google/home/alanagius/git/angular/packages/core/src/sanitization/sanitization.ts:276:0-288:1) instruction is used when `attributeName` is bound on SVG animation elements.
- If executed, a `RuntimeError` is thrown, preventing the binding.
- The compiler now identifies `attributeName` on SVG animation elements as security-sensitive and injects this validation.

Additionally, the DOM security schema has been updated to include a comprehensive list of MathML and SVG elements that accept `href` or `xlink:href` attributes, ensuring they are correctly treated as `SecurityContext.URL` and sanitized. This prevents malicious URLs from being bound to these attributes.

http://b/463880509
2025-12-01 10:28:38 +01:00
..
expression_parser fix(compiler): lexer support for template literals in object literals (#61601) 2025-05-26 10:24:17 +00:00
i18n build: move private testing helpers outside platform-browser/testing (#61571) 2025-05-21 16:04:42 +00:00
ml_parser refactor(compiler): prevent object methods being recognised as entities (#58100) 2025-04-02 11:35:54 +00:00
output refactor(compiler): convert scripts within packages/compiler to relative imports (#60655) 2025-04-01 11:59:14 +00:00
render3 refactor(compiler): convert scripts within packages/compiler to relative imports (#60655) 2025-04-01 11:59:14 +00:00
schema build: move private testing helpers outside platform-browser/testing (#61571) 2025-05-21 16:04:42 +00:00
selector build: move private testing helpers outside platform-browser/testing (#61571) 2025-05-21 16:04:42 +00:00
shadow_css refactor(compiler): convert scripts within packages/compiler to relative imports (#60655) 2025-04-01 11:59:14 +00:00
BUILD.bazel build: move private testing helpers outside platform-browser/testing (#61571) 2025-05-21 16:04:42 +00:00
compiler_facade_interface_spec.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
integration_spec.ts build: move private testing helpers outside platform-browser/testing (#61571) 2025-05-21 16:04:42 +00:00
style_url_resolver_spec.ts refactor(compiler): convert scripts within packages/compiler to relative imports (#60655) 2025-04-01 11:59:14 +00:00
util_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00