{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "8.3.0"
              }
            ],
            "source": [
              "DESCRIPTION",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "ebb62eb3036a726314ab3e1c3e9263a41608b17b"
            },
            {
              "fixed": "ba316dd1d8de1291102da3f20f64240729ff899e"
            }
          ],
          "repo": "https://github.com/openemr/openemr",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-rmmr-8498-463g"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40507.json"
  },
  "details": "OpenEMR before 8.3.0 contains a reflected cross-site scripting vulnerability in the patient portal template import handler. The templateHtml GET parameter is reflected into the page response without sanitization. An attacker can craft a URL that executes arbitrary JavaScript in the browser of any authenticated user with Forms Administration permissions who visits the link, enabling session hijacking.",
  "id": "CVE-2026-40507",
  "modified": "2026-09-11T03:30:18.145511090Z",
  "published": "2026-08-19T14:48:49.751Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40507.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/openemr/openemr/releases/tag/v8_3_0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/openemr/openemr/security/advisories/GHSA-rmmr-8498-463g"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40507"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/openemr-reflected-xss-via-templatehtml-parameter-in-patient-portal"
    },
    {
      "type": "FIX",
      "url": "https://github.com/openemr/openemr/commit/ba316dd1d8de1291102da3f20f64240729ff899e"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/openemr/openemr"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenEMR \u003c 8.3.0 Reflected XSS via templateHtml Parameter in Patient Portal"
}