Summary
In dynamic-field.template.ts, the onclick for multi-media remove is:
onclick="removeMediaFromMultiple('${fieldId}', '${escapeJsAttr(url)')"
fieldId derives from field.name and is interpolated without escaping. A crafted field name containing ' or " can break the JS string context → stored XSS via the schema/field-definition path.
Root fix
Slug-validate field_name on write (allow only [a-z0-9_-]). This closes the sink for all similar id/name-from-field_name sinks in the template, not just this one.
Scope
Explicitly scoped out of #1029 (which fixed the media value/url sinks). Pre-existing issue, not introduced by that PR.
Related
Summary
In
dynamic-field.template.ts, theonclickfor multi-media remove is:onclick="removeMediaFromMultiple('${fieldId}', '${escapeJsAttr(url)')"fieldIdderives fromfield.nameand is interpolated without escaping. A crafted field name containing'or"can break the JS string context → stored XSS via the schema/field-definition path.Root fix
Slug-validate
field_nameon write (allow only[a-z0-9_-]). This closes the sink for all similarid/name-from-field_namesinks in the template, not just this one.Scope
Explicitly scoped out of #1029 (which fixed the media
value/urlsinks). Pre-existing issue, not introduced by that PR.Related
packages/core/src/templates/components/dynamic-field.template.ts—fieldId/fieldNameinterpolated intoid,name,onclickattrs throughout