CVE-2024-47528: Librenms/librenms Cross-Site Scripting Vulnerability
LOWCVE-2024-47528 is a LOW (CVSS 4.8) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Librenms/librenms libraries in the Packagist ecosystem. The issue involves librenms vulnerable to stored cross-site scripting via file upload. Remediation is available by upgrading affected packages to version 24.9.0.
CVE-2024-47528 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2024-47528
To remediate this vulnerability, upgrade all affected Librenms/librenms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade librenms/librenms to 24.9.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for librenms/librenms
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-47528, inspect your project dependencies for Librenms/librenms:
inspect dependencies for librenms/librenms
Analyze the terminal output to locate any version of Librenms/librenms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 24.9.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Librenms/librenms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-47528 Affected Librenms/librenms Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
librenms/librenms
|
Packagist |
< 24.9.0
|
24.9.0
|
References
Frequently Asked Questions
What is CVE-2024-47528?
Which Librenms/librenms versions are affected?
What version fixes CVE-2024-47528?
Is librenms/librenms affected?
What is the CVSS score of CVE-2024-47528?
What CWE is associated with CVE-2024-47528?
How can I check Packagist dependencies for CVE-2024-47528?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x8gm-j36p-fppf",
"modified" : "2024-12-19T20:14:29Z",
"published" : "2024-10-01T22:27:32Z",
"aliases" : [ "CVE-2024-47528" ],
"summary" : "LibreNMS vulnerable to Stored Cross-site Scripting via File Upload",
"details" : "### Summary\nStored Cross-Site Scripting (XSS) can archive via Uploading a new Background for a Custom Map.\n\n### Details\nUsers with \"admin\" role can set background for a custom map, this allow the upload of SVG file that can contain XSS payload which will trigger onload. This led to Stored Cross-Site Scripting (XSS).\n\n### PoC\n1. Login using an Admin role account.\n\n2. Go over to \"$URL/maps/custom\", the Manage Custom Maps.\n\n\n3. Create a new map then choose to edit it.\n4. Choose the \"Set Background\" option.\n\n\n5. Choose to upload a SVG file that have this content.\n```svg\n<svg xmlns=\"http://www.w3.org/2000/svg\" onload=\"alert(document.domain)\">\n <circle cx=\"50\" cy=\"50\" r=\"40\" />\n</svg>\n```\n\n6. Once uploaded, there should be a link to the SVG return in the POST request to the API \"$URL/maps/custom/1/background\".\n\n\n7. Go over to that link on browser, should see a pop-up.\n\n\n### Impact\nAttacker can use this to perform malicious java script code for malicious intent.\nThis would impact other Admin role users and the Global Read role users. Normal users does not have permission to read the file, so they are not affected.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "librenms/librenms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "24.9.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/librenms/librenms/security/advisories/GHSA-x8gm-j36p-fppf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47528"
}, {
"type" : "WEB",
"url" : "https://github.com/librenms/librenms/commit/d959bf1b366319eda16e3cd6dfda8a22beb203be"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/librenms/librenms"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116", "CWE-434", "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-01T22:27:32Z",
"nvd_published_at" : "2024-10-01T21:15:08Z"
}
}