{"id":"CVE-2021-31274","aliases":["CVE-2021-31274","GHSA-2r2w-jrh2-p4gr"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-site Scripting in LibreNMS","summary":"In LibreNMS < 21.3.0, a stored XSS vulnerability was identified in the API Access page due to insufficient sanitization of the $api->description variable. As a result, arbitrary Javascript code can get executed.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In LibreNMS < 21.3.0, a stored XSS vulnerability was identified in the API Access page due to insufficient sanitization of the $api->description variable. As a result, arbitrary Javascript code can get executed.","source":"cvelist"},{"lang":"es","text":"En LibreNMS versiones anteriores a 21.3.0, se ha identificado una vulnerabilidad de tipo XSS almacenada en la página de acceso a la API debido a un saneo insuficiente de la variable $api-)description. Como resultado, puede ser ejecutado código Javascript arbitrario","source":"nvd"}],"published":"2021-09-08T17:12:29.000Z","modified":"2026-06-17T03:51:31.777Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:S/C:N/I:P/A:N","score":3.5,"rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"21.3.0"}],"ecosystem":"Packagist","package":"librenms/librenms","purl":"pkg:composer/librenms/librenms","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"21.3.0"}],"vendor":"librenms","product":"librenms","cpe":"cpe:2.3:a:librenms:librenms:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://community.librenms.org/t/vulnerability-report-cross-site-scripting-xss-in-the-api-access-page/15431","tags":["vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms/pull/12739","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31274","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31274","url":"https://www.cve.org/CVERecord?id=CVE-2021-31274","licence":"CVE Terms of Use","modified":"2024-08-03T22:55:53.692Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2r2w-jrh2-p4gr","url":"https://github.com/advisories/GHSA-2r2w-jrh2-p4gr","licence":"CC-BY-4.0","modified":"2024-02-16T08:06:25.660Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31274","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31274","licence":"Public domain","modified":"2026-06-17T03:51:31.777Z"}],"updatedAt":"2026-11-25T22:58:03.811Z","epss":{"score":0.00774,"percentile":0.56951,"date":"2026-12-01T12:00:22.000Z"}}