The vulnerability is a reflected Cross-Site Scripting (XSS) issue in LibreNMS. The root cause is the improper handling of user-supplied input from GET parameters, which is then used to dynamically construct the page title. Specifically, the 'instance' and 'vmid' parameters in the 'proxmox' application are not sufficiently sanitized. These parameters are incorporated into the $pagetitle array within apps/proxmox.inc.php. This array is then imploded into a string, $title, which is passed to the LegacyController::index function. Inside this function, the $title is directly embedded into a JavaScript snippet that sets document.title. An attacker can provide a malicious payload in the 'instance' or 'vmid' parameters, which includes JavaScript code. This code then gets executed in the context of the user's browser, leading to XSS. The fix involves two parts: properly escaping the output in LegacyController.php using Js::from() (equivalent to json_encode) and also applying htmlspecialchars() to the input parameters in apps/proxmox.inc.php as an additional layer of defense.