The vulnerability is a classic stored Cross-Site Scripting (XSS) issue. Node information, specifically the long_name and short_name, is received from an external source (MQTT) and stored in the application's database without proper sanitization. This user-provided data is then rendered on multiple pages of the web dashboard without being properly escaped for the HTML context.
The analysis of the patch commit 4086e2b5f61615a813b70b25bc76095083552135 reveals a widespread pattern of insecurely constructing HTML by concatenating strings containing this raw node data. This generated HTML is then assigned to the innerHTML property of DOM elements, or used in contexts where HTML is interpreted, such as Bootstrap tooltips with data-bs-html="true".
The fix implemented in the commit is a major frontend refactoring. It replaces all instances of insecure innerHTML assignments with the use of safe DOM creation APIs (document.createElement, textContent, etc.), encapsulated in new helper functions within src/malla/static/js/dom.js. This ensures that any data from the database is treated as text and not as executable HTML, effectively mitigating the XSS vulnerability across the application.