-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 KL-001-2025-001: Checkmk NagVis Reflected Cross-site Scripting Title: Checkmk NagVis Reflected Cross-site Scripting Advisory ID: KL-001-2025-001 Publication Date: 2025-02-04 Publication URL: https://korelogic.com/Resources/Advisories/KL-001-2025-001.txt 1. Vulnerability Details Affected Vendor: Checkmk Affected Product: Checkmk/NagVis Affected Version: Checkmk 2.3.0p2, NagVis 1.9.40 Platform: GNU/Linux CWE Classification: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CVE ID: CVE-2024-13722 2. Vulnerability Description The "NagVis" component within Checkmk is vulnerable to reflected cross-site scripting. An attacker can craft a malicious link that will execute arbitrary JavaScript in the context of the browser once clicked. The attack can be performed on both authenticated and unauthenticated users. 3. Technical Description Checkmk version 2.3.0.p2 ships with a component named "NagVis", which is an addon for the network management system "Nagios". When receiving an HTTP POST request for the "userfiles/gadgets/std_table.php" file, the query and body parameters contained within the request are processed by the script. Specifically, the script accepts the "members" body parameter, which is then parsed as a JSON object. The "summary_state" property of the "members" JSON object is reflected into the page response without validation. A POST request containing a malicious "summary_state" value can inject arbitrary JavaScript via the HTML "script" tag into the page response. When rendered in a browser, the attacker controlled JavaScript executes, enabling an attacker to perform actions as the currently logged-in user. The "members" JSON object must be supplied via a POST body parameter, so exploitation of this issue relies on a cross-origin HTTP request originating from an attacker controlled web page. The malicious website (e.g. https://attacker.com/foo.html) can contain an HTML "form" tag with an "action" attribute pointing at the URL for the "std_table.php" script. Additional JavaScript on the attacker controlled page can automatically submit the form once a user loads the page. The browser will send a POST request cross-origin and redirect the browser to the HTTP response of the POST request, thereby executing the malicious JavaScript on the NagVis web page. 4. Mitigation and Remediation Recommendation This issue has been remediated in Nagvis 1.9.42 and Checkmk 2.3.0p10, both release 2024-07-15. 5. Credit This vulnerability was discovered by Jaggar Henry and Jim Becher of KoreLogic, Inc. 6. Disclosure Timeline 2024-06-11 : KoreLogic reports vulnerability details to Checkmk Security Team. 2024-06-12 : Checkmk acknowledges receipt. 2024-06-21 : Checkmk requests an extension of embargo to 90 business days. 2024-07-15 : Checkmk/NagVis release versions featuring remediation for the reported vulnerability. Checkmk neglects to inform KoreLogic of this event. 2024-11-22 : KoreLogic requests an update from Checkmk but receives no reply. 2025-02-04 : KoreLogic public disclosure. 7. Proof of Concept 1) Serve the following HTML from a web server (e.g. python -m http.server) 2) View the URL serving the file in a web browser:
The contents of this advisory are copyright(c) 2025 KoreLogic, Inc. and are licensed under a Creative Commons Attribution Share-Alike 4.0 (United States) License: http://creativecommons.org/licenses/by-sa/4.0/ KoreLogic, Inc. is a founder-owned and operated company with a proven track record of providing security services to entities ranging from Fortune 500 to small and mid-sized companies. We are a highly skilled team of senior security consultants doing by-hand security assessments for the most important networks in the U.S. and around the world. We are also developers of various tools and resources aimed at helping the security community. https://www.korelogic.com/about-korelogic.html Our public vulnerability disclosure policy is available at: https://korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy -----BEGIN PGP SIGNATURE----- iQJOBAEBCAA4FiEEB12WYZwbVwYTJ/b2DKLsCTlWkekFAmeifQgaHGRpc2Nsb3N1 cmVzQGtvcmVsb2dpYy5jb20ACgkQDKLsCTlWkenH9A/9HbdXRQhFQB7TanohCQbc +8IUlxco4s/+wjZjByamtfLTgbizaoLlAfewKRJCVFyx9NhWp8nbOMcSYDvxOPcX Rn/+VYjyXz78IOHFYePfTi48iUDdzJIKvMHksRhxZ/x/u6spAJVO/I8KrQcJ7Pcg chY4lTqaaN+Ne9D5QLvdNuJjqV/JmQ4xsJerI2kobOnis5NEw3qcVRcuhfj9wlgS BiXdPNqaU6tZ65yjpZtdy6lSBQn4TTiUF/6LfjzhihbJp4oEFRDYBYKFmZeSdpaK j0oNwOvyCBGPW5+7MC8VuaefSCiSOmy+5pbK//M/xw5xcWTUuHscDtCtrlz8KSuE tbHiJoLFSQaoG7nKcVPWfZcNPENoK4MvtDBTObClWc39059vlJiQ4Re1sQTe4dKV idBPtbVhZkOXGzmR+TyrsZzS3GxRW8DCSnbCtayQpMDfGzRhJzrinUwrv99pDyPI kG11ixyp9JvOI74NiNqxrM9XXXX+wctywx/2KqrVhaiZGV5/UerHevu7k5CrMpOK THRHmekqXkiQnMR5Z3qIn84LuiQHmzEVfy8NiVmlrbBOWn/KnWN2jTn7tE8pBWvZ 0c3iUwI+mK5GWKp0eJuLm72/tiDVKN6QGmOnoxsNmYc+/8TWkqktedCWL+Za0lzZ VmgVmjgTwkguN0tCRFUA3Cc= =F+n5 -----END PGP SIGNATURE-----