Skip to content

fix(core): validate lowercase SVG animation attribute names#69161

Merged
atscott merged 1 commit into
angular:mainfrom
SkyZeroZx:fix/atributename-ssr
Jun 10, 2026
Merged

fix(core): validate lowercase SVG animation attribute names#69161
atscott merged 1 commit into
angular:mainfrom
SkyZeroZx:fix/atributename-ssr

Conversation

@SkyZeroZx

@SkyZeroZx SkyZeroZx commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Normalize SVG animation attributeName lookup to also recognize lowercase attributename before allowing dynamic animation value bindings.

Add runtime and platform-server SSR regression coverage for lowercase attributename retargeting.

This would be similar to GHSA-jrmj-c5cx-3cw6

This only happens in SSR mode, which, despite throwing an exception on the client, doesn't actually sanitize/render the element.

@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Jun 4, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 4, 2026
@SkyZeroZx SkyZeroZx marked this pull request as ready for review June 4, 2026 19:50
@SkyZeroZx SkyZeroZx force-pushed the fix/atributename-ssr branch from 69bff06 to 4535194 Compare June 4, 2026 19:53

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should resolve this issue in Domino to maintain consistent casing behavior, given that the browser ignores case sensitivity in this context.

@pullapprove pullapprove Bot requested a review from alan-agius4 June 4, 2026 20:27
@SkyZeroZx

Copy link
Copy Markdown
Contributor Author

We should resolve this issue in Domino to maintain consistent casing behavior, given that the browser ignores case sensitivity in this context.

I'll open a PR on Domino.

@SkyZeroZx

Copy link
Copy Markdown
Contributor Author

PR in domino angular/domino#31

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some further investigation into this morning's issue regarding the case-insensitivity of attributeName.

It appears the attribute is case-sensitive. Executing element.setAttribute('attributeName') versus its lowercase counterpart creates two distinct attributes on the element, with the lowercase version failing to trigger the intended behavior.

Now, the problem is that the browser tokenizer, on initial parsing will normalize attributename to attributeName and thus triggering the sanitizer on the client.

Overall, Domino is doing the right thing here, attributes for SVG are case sensitive when using the JS APIs, for the extra security let's go with this change instead.

@pullapprove pullapprove Bot requested a review from alan-agius4 June 5, 2026 09:04

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: fw-security

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jun 5, 2026
Comment thread packages/platform-server/test/integration_spec.ts Outdated
Comment thread packages/core/test/render3/integration_spec.ts
Normalize SVG animation attributeName lookup to also recognize lowercase attributename before allowing dynamic animation value bindings.

Add runtime and platform-server SSR regression coverage for lowercase attributename retargeting.
@SkyZeroZx SkyZeroZx force-pushed the fix/atributename-ssr branch from 4535194 to d5e689a Compare June 5, 2026 11:21

@josephperrott josephperrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed-for: fw-security

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 9, 2026
@atscott atscott merged commit e640692 into angular:main Jun 10, 2026
28 of 31 checks passed
@atscott

atscott commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants