The vulnerability is a classic cross-site scripting (XSS) issue within the Umbraco backoffice. Authenticated users could inject HTML and script content into input fields, such as an entity's name. When an action like 'delete' or 'trash' was performed on that entity, a confirmation dialog would appear. This dialog would render the entity's name without proper output encoding or sanitization.
The root cause was identified in the frontend code, specifically in how Lit-based web components handled localized strings containing user-provided data. The unsafe pattern involved combining Lit's unsafeHTML directive with the application's localize.string() method. This combination rendered the string as raw HTML but failed to escape the arguments (e.g., the entity name) interpolated into it.
The patch addresses this systematically by introducing a new, safe helper method: localize.htmlString(). This new function ensures that all arguments are securely HTML-escaped before being included in the final string, which is then rendered. The fix involved replacing all instances of the vulnerable unsafeHTML(localize.string(...)) pattern across numerous backoffice components, primarily focusing on confirmation modals, with the new safe localize.htmlString() method. This prevents attackers from injecting executable scripts into the confirmation dialogs.