Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft X-Forwarded-Host with </script><script> payload
-
ExploitLure victim to OpenLayers GetMap URL
-
ExecutionHeader value breaks out of script block
-
ImpactArbitrary JavaScript executes under MapServer origin
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the deployment actually serves the WMS OpenLayers output path - selected by FORMAT=application/openlayers or template=openlayers - AND that an attacker-controlled value reaches the online-resource string: specifically a client-supplied X-Forwarded-Host or X-Forwarded-Proto header (typical when MapServer sits behind a reverse proxy that passes these through), or an exposed attacker-controlled PATH_INFO or map= value. The victim must load the crafted output (UI:R), so this is not a silent server-side compromise. No authentication is required (PR:N confirmed by CVSS vector). Limiting factors: deployments that do not expose the OpenLayers format, or that strip/override X-Forwarded-* at the proxy and do not pass attacker-controlled PATH_INFO/map= values, are not reachable via the header path; the requirement for victim interaction further constrains real-world exploitation. Versions 8.6.5 and later are not affected. |
| Impact | This is a reflected XSS (CWE-79) with a CVSS 3.1 score of 6.1 and vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - network-reachable, low complexity, no privileges, but requiring victim interaction (UI:R), with a scope change (S:C) because the injected script executes in the victim's browser under the MapServer origin and only low confidentiality/integrity impact (no availability impact). The vuln.today decision label is 'this_month' (an elevated-but-not-emergency priority), consistent with a serious reflected XSS that is not yet mass-exploited. The CVE is NOT listed in CISA KEV and no EPSS probability was supplied, so there is no evidence of active exploitation; however, this is a bypass of the prior fix (GHSA-xqj6-vjqr-33vv / commit edc1033), and the GHSA-52rr-p4x5-2x6x advisory contains a complete, reproduced PoC that the reporter confirmed executes JavaScript in headless Chromium against a patched 8.6.4 build. The signals are internally consistent rather than conflicting: a medium-CVSS reflected XSS whose real-world risk is gated by the UI:R requirement and by whether a deployment actually forwards attacker-controlled headers. This warrants prompt patching where MapServer serves OpenLayers output behind a proxy that passes client X-Forwarded-* headers, but it is not a drop-everything network RCE. No EPSS score was provided, so probabilistic exploitation likelihood cannot be quantified from the input. |
| Exploit ScenarioDerived | An unauthenticated attacker crafts a request to a MapServer WMS endpoint producing OpenLayers output (FORMAT=application/openlayers or template=openlayers) and supplies an X-Forwarded-Host (or X-Forwarded-Proto) header containing '</script><script>...</script>'; when a proxy forwards that header to MapServer, the value is inlined into the text/html page and the '</script>' breaks out of the OpenLayers script block at the HTML parser layer. The attacker lures a victim to the crafted URL, and arbitrary JavaScript then runs in the victim's browser under the MapServer origin. A reproduced, reporter-confirmed PoC exists in the GHSA-52rr-p4x5-2x6x advisory, demonstrating script execution (not mere reflection) in headless Chromium. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 20, 2026
Reflected cross-site scripting in MapServer's WMS OpenLayers viewer output (FORMAT=application/openlayers or template=openlayers) lets an unauthenticated attacker execute arbitrary JavaScript in a victim's browser under the MapServer origin. The online-resource URL interpolated into a single-quoted JavaScript string is built from request-derived values (X-Forwarded-Host, X-Forwarded-Proto, and in some deployments PATH_INFO or map=), and the escaping added for GHSA-xqj6-vjqr-33vv only neutralizes the JavaScript quote context, not the byte sequence that closes the surrounding script element at the HTML parser layer. MapServer 6.0 through 8.6.4 are affected (8.6.4 still carries the incomplete earlier fix); 8.6.5 resolves it, victim interaction is required (UI:R), there is no indication of active exploitation in the supplied intelligence, and the vendor advisory includes a reproduced proof-of-concept whose execution the reporter confirmed in headless Chromium.
RemediationAI
Vendor-released patch: upgrade to MapServer 8.6.5 (https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5), which contains commits 2e4229ff66f6eac1b270755a0ce0ce8debee4432 and 57a5d592a4270137c20f33459d59d370b5374426 and is documented in advisory GHSA-52rr-p4x5-2x6x. Note that 8.6.4 is not a safe version: it shipped the incomplete GHSA-xqj6-vjqr-33vv fix that only escaped the JavaScript quote context. If upgrading cannot happen immediately, remove or block the OpenLayers output path - refuse FORMAT=application/openlayers and template=openlayers at the reverse proxy - accepting that MapServer's built-in simple viewer stops working for any client that relied on it; alternatively, have the proxy strip or overwrite X-Forwarded-Host and X-Forwarded-Proto with fixed trusted values and avoid exposing attacker-controlled PATH_INFO or map= values in the query string, accepting that legitimate virtual-host or online-resource behaviour will be reduced if the proxy was previously relied on to set them. Because exploitation requires the victim to load the crafted response (UI:R), restricting who can reach the OpenLayers endpoint also limits exposure.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
MapServer is a C/C++ CGI/MapScript engine for publishing WMS and other OGC services; the OpenLayers response is emitted by src/maptemplate.c and served with Content-Type text/html (mapservutil.c for both the WMS FORMAT=application/openlayers path and the template=openlayers path). The online-resource value is copied verbatim from request-controlled headers in src/maputil.c and then escaped with msEscapeJSonLikeString(ol, '\'') from src/mapstring.cpp, which handles only the single quote, backslash and control characters - everything else, including '<' and '>', passes through unchanged. That is sufficient for JavaScript string-literal context but irrelevant to HTML parsing: inside a <script> element the only terminator is the byte sequence '</script', so a value such as </script><script>...</script> closes the element and the following script runs, regardless of the surrounding JS quoting. This is CWE-79 (improper neutralization of input during web page generation), a reflected XSS rather than a server-side compromise. The Scope metric is changed (S:C) because code executes in the victim's browser under the MapServer origin, with low confidentiality and integrity impact and no availability impact; the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N gives 6.1. The issue is the same sink as GHSA-xqj6-vjqr-33vv, fixed via commit edc1033 in 8.6.4, which closed only the single-quote breakout and left the script-element exit open on the supposedly patched build.
Know when Mapserver gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Network-delivered reflected XSS, no auth (PR:N) and low complexity to craft the payload (AC:L), but victim must load the page (UI:R); script runs in the browser under MapServer origin (S:C) with low C/I and no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.org
MapServer is a system for developing web-based GIS applications. From 6.0 until 8.6.5, MapServer's WMS OpenLayers output, selected by FORMAT=application/openlayers or template=openlayers, substitutes a request-derived online-resource value into a single-quoted JavaScript string in src/maptemplate.c. The prior remediation for GHSA-xqj6-vjqr-33vv used msEscapeJSonLikeString() to protect the JavaScript string but did not neutralize angle brackets, so attacker-controlled X-Forwarded-Host or X-Forwarded-Proto values can still terminate the script element at the HTML parser layer. Deployments that expose attacker-controlled PATH_INFO or map= values reaching the same string are also affected. An unauthenticated attacker can cause arbitrary JavaScript to execute in a victim's browser under the MapServer origin when the victim loads the crafted output. This issue is fixed in version 8.6.5.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
MapServer is a system for developing web-based GIS applications. Rated high severity (CVSS 8.9), this vulnerability is r
Stack-based buffer overflow in MapServer before 6.0.6, 6.2.x before 6.2.4, 6.4.x before 6.4.5, and 7.0.x before 7.0.4 al
Unauthenticated SQL injection in MapServer 8.4.0 through 8.6.3 lets remote attackers who can reach a PostGIS-backed quer
In MapServer before 7.0.3, OGR driver error messages are too verbose and may leak sensitive information if data connecti
Denial of service in MapServer 6.4.0 through 8.6.2 allows remote unauthenticated attackers to crash the server by submit
Second-order SQL injection in MapServer's PostgreSQL JOIN implementation, present through 8.6.4, lets an attacker who ca
SQL injection vulnerability in the msPostGISLayerSetTimeFilter function in mappostgis.c in MapServer before 6.4.1, when
Reflected XSS in MapServer 6.0 through 8.6.1 allows unauthenticated remote attackers to inject arbitrary HTML and JavaSc
Reflected cross-site scripting in MapServer's OGC API Features HTML output lets an attacker run arbitrary JavaScript und
Reflected cross-site scripting (CWE-79) in MapServer's OpenLayers HTML output affects versions 6.0 through 8.6.3 and is
MapServer versions 4.2 through 8.6.0 are vulnerable to a heap buffer overflow in the SLD (Styled Layer Descriptor) parse
MapServer before 7.0.8, 7.1.x and 7.2.x before 7.2.3, 7.3.x and 7.4.x before 7.4.5, and 7.5.x and 7.6.x before 7.6.3 doe
EUVD-2026-131827
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB