{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "6.0"
              },
              {
                "fixed": "8.6.4"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "a7e04b01eab44f9f027fab5f1081eb18d9453212"
            },
            {
              "fixed": "edc1033c7963fcffd160d85cf430f49aaf4a1374"
            },
            {
              "fixed": "ff17ef190caaeaa9002ac3d1c7969ec5315c345e"
            },
            {
              "fixed": "b7896ad27b553403868e2cbb2710cc4b5fdcd4c8"
            }
          ],
          "repo": "https://github.com/mapserver/mapserver",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-xqj6-vjqr-33vv"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54355.json"
  },
  "details": "MapServer is a system for developing web-based GIS applications. From 6.0 until 8.6.4, MapServer's OpenLayers HTML output for SERVICE=WMS\u0026REQUEST=GetMap\u0026FORMAT=application/openlayers reflects an attacker-controlled X-Forwarded-Host value received as HTTP_X_FORWARDED_HOST through msBuildOnlineResource(), processLine(), and the [mapserv_onlineresource] substitution in src/maputil.c and src/maptemplate.c without escaping it for a single-quoted JavaScript string. When the deployment trusts the forwarded header and does not configure a fixed ows_onlineresource or MS_ONLINERESOURCE value, embedded single quotes can escape the generated URL string. An unauthenticated attacker can craft a URL that executes arbitrary JavaScript in the MapServer site origin when opened by a victim, enabling access to sessions or tokens, same-origin data and requests, and actions as the victim. This issue is fixed in version 8.6.4.",
  "id": "CVE-2026-54355",
  "modified": "2026-09-19T03:30:27.564269242Z",
  "published": "2026-09-17T20:24:32.522Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MapServer/MapServer/releases/tag/rel-8-6-4"
    },
    {
      "type": "WEB",
      "url": "https://mapserver.org/development/changelog/changelog-8-6.html#changelog-8-6"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54355.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/MapServer/MapServer/security/advisories/GHSA-xqj6-vjqr-33vv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54355"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MapServer/MapServer/commit/edc1033c7963fcffd160d85cf430f49aaf4a1374"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MapServer/MapServer/commit/ff17ef190caaeaa9002ac3d1c7969ec5315c345e"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MapServer/MapServer/pull/7517"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MapServer/MapServer/pull/7518"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "MapServer: Reflected XSS in OpenLayers HTML Output via `HTTP_X_FORWARDED_HOST`"
}