Skip to content

TrustedTypes: SVGAnimatedString.baseVal#42502

Merged
hamishwillee merged 2 commits intomdn:mainfrom
hamishwillee:tt_svg_animatedstring_baseval
Jan 6, 2026
Merged

TrustedTypes: SVGAnimatedString.baseVal#42502
hamishwillee merged 2 commits intomdn:mainfrom
hamishwillee:tt_svg_animatedstring_baseval

Conversation

@hamishwillee
Copy link
Collaborator

The SVGAnimatedString can represent the base and animated values of various elements in SVG.

In the context of SVGScriptElement.href it can be used to set the baseVal of the script. This is an injection sink.

Technically right place for all the information is SVGAnimatedString.baseVal since that defines the property, but that can be used to reflect numerous attributes, and only one is a problem case. So what I have done is put TT info in the SVGScriptElement.href. For SVGAnimatedString.baseVal I have put the disclaimer and explanation, but I link to the other doc for security considerations and the example.

Related docs work tracked in #41507

@hamishwillee hamishwillee requested a review from a team as a code owner December 23, 2025 03:20
@hamishwillee hamishwillee requested review from sideshowbarker and removed request for a team December 23, 2025 03:20
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Dec 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 23, 2025

Co-authored-by: sideshowbarker <mike@w3.org>
@hamishwillee
Copy link
Collaborator Author

Thanks for the review @sideshowbarker !

@hamishwillee hamishwillee merged commit a809326 into mdn:main Jan 6, 2026
7 checks passed
@hamishwillee hamishwillee deleted the tt_svg_animatedstring_baseval branch January 6, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants