Skip to content

fix(core): add missing ATTRIBUTE_NO_BINDING for SVG set element values/from#68032

Open
mohammadmseet-hue wants to merge 3 commits intoangular:mainfrom
mohammadmseet-hue:fix-svg-set-values
Open

fix(core): add missing ATTRIBUTE_NO_BINDING for SVG set element values/from#68032
mohammadmseet-hue wants to merge 3 commits intoangular:mainfrom
mohammadmseet-hue:fix-svg-set-values

Conversation

@mohammadmseet-hue
Copy link
Copy Markdown

Summary

Add missing set|values and set|from entries to the ATTRIBUTE_NO_BINDING security context, matching the existing protection on <animate>.

Problem

PR #67797 added ATTRIBUTE_NO_BINDING protection for SVG animation attributes to prevent javascript: URI injection via animated href. The fix protected <animate> completely (attributeName, to, from, values) but only partially protected <set> (attributeName, to).

The <set> element's values and from attributes were not registered in either:

  1. Compile-time: dom_security_schema.tsset|values and set|from missing from ATTRIBUTE_NO_BINDING list
  2. Runtime: sanitization.tsSECURITY_SENSITIVE_ELEMENTS['set'] missing values and from

Per SVG Animation (SMIL) specification, <set> inherits the values attribute from AnimationElement. The first value in the semicolon-separated list is used as the target value, equivalent to the to attribute.

Fix

Add set|values and set|from to both the compile-time security schema and runtime validation check, matching the existing entries for <animate>.

Test plan

  • Verified animate|values and animate|from are already protected
  • Verified set|values and set|from are NOT protected before this fix
  • Fix adds identical entries to both compile-time and runtime checks

@pullapprove pullapprove bot requested a review from alan-agius4 April 4, 2026 05:00
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Apr 4, 2026
@ngbot ngbot bot added this to the Backlog milestone Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant