The vulnerability GHSA-vhgq-r8gx-5fpv in ibexa/admin-ui-assets is an XSS issue stemming from its dependency, ibexa/taggify. The ibexa/admin-ui-assets package was patched by updating its taggify dependency to version 1.2.2 of a fork (ibexa/taggify).
The core XSS vulnerability existed in the ibexa/taggify library (versions prior to 1.2.2 of the fork). Specifically, the Taggify JavaScript function, present in various forms (taggify.js, taggify.es6.js, taggify-script.js), used element.innerHTML = ... to render user-supplied content in two places:
- When setting the label for individual tags (
tag.label).
- When setting the main input label for the Taggify component (
finalParams.inputLabel).
If an attacker could control the content of these labels (e.g., by creating or editing content that uses tags, or by influencing the configuration of the Taggify component), they could inject arbitrary HTML and JavaScript. This script would then be executed in the context of the user viewing the tags or the Taggify component, leading to a persistent XSS attack. Since this is in the back office, users with roles like Editor or Administrator could be targeted, and the injected XSS could potentially be reflected in the front office, affecting end-users.
The patch in ibexa/taggify (commit f477177d73fbbc407d10b3ad0d5278ed6741965b) mitigates this by replacing innerHTML assignments with innerText. innerText does not parse HTML, thereby preventing the injection of executable scripts or malicious HTML structures.
The vulnerable function in a runtime profile would be Taggify, as it's the main function responsible for these unsafe DOM manipulations. The specific unsafe operations occur within this function's logic for rendering tag elements and initializing its own UI components.