{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:librenms:librenms:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "21.3.0"
              }
            ],
            "source": "CPE_RANGE"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "d24730818f617898a6c0edd9654c649b02373ae7"
            }
          ],
          "repo": "https://github.com/librenms/librenms",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {},
  "details": "In LibreNMS \u003c 21.3.0, a stored XSS vulnerability was identified in the API Access page due to insufficient sanitization of the $api-\u003edescription variable. As a result, arbitrary Javascript code can get executed.",
  "id": "CVE-2021-31274",
  "modified": "2026-07-08T05:37:24.892349931Z",
  "published": "2021-09-08T18:15:10.660Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://community.librenms.org/t/vulnerability-report-cross-site-scripting-xss-in-the-api-access-page/15431"
    },
    {
      "type": "FIX",
      "url": "https://github.com/librenms/librenms/pull/12739"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/librenms/librenms"
    }
  ],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}