Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft GetMap application/openlayers URL
-
DeliveryInject single-quote payload via X-Forwarded-Host
-
ExploitLure victim to open link
-
ExecutionHeader reflected unescaped into JS string
-
PersistArbitrary JavaScript runs in site origin
-
ImpactSteal session/tokens, act as victim
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 a specific non-default deployment: the MapServer instance must trust the forwarded HTTP_X_FORWARDED_HOST header AND must NOT configure a fixed ows_onlineresource metadata value or MS_ONLINERESOURCE environment variable - when either is pinned, the attacker-controlled host is not reflected and the flaw does not trigger. The vulnerable endpoint is specifically the OpenLayers HTML output (SERVICE=WMS&REQUEST=GetMap&FORMAT=application/openlayers), where the value flows through msBuildOnlineResource()/processLine() and the [mapserv_onlineresource] substitution into a single-quoted JavaScript string without escaping. Exploitation is further limited by required user interaction (a victim must open the crafted link, UI:P) though no authentication is needed (PR:N); impact is confined to the victim's browser session in the MapServer origin, not the server itself. |
| Impact | This is a reflected cross-site scripting (CWE-79) flaw in MapServer's OpenLayers HTML output, and the signals point to a moderate, conditionally-exploitable issue rather than a top priority. The vendor CVSS 4.0 score is 5.3 (medium), with AV:N/AC:L but critically AT:P (a specific attack requirement) and UI:P (passive user interaction) - meaning exploitation depends on both a non-default configuration and a victim opening the attacker's link. The impact metrics tellingly place all vulnerable-system impacts at N (VC:N/VI:N/VA:N) and shift harm to the subsequent (browser) system (SC:H/SI:H), which is the correct modeling for XSS: MapServer itself is not compromised; the victim's session in the site origin is. No EPSS score, CISA KEV listing, or public exploit is present in the provided data, so there is no evidence of active exploitation - status is 'no public exploit identified at time of analysis.' However, the fix PR ships a concrete regression test that injects HTTP_X_FORWARDED_HOST="with'single'quote" and greps for the unescaped reflection, which effectively documents the exact trigger and lowers the bar for a researcher to reproduce it. The dominant risk-limiting factor is the configuration gate: the header must be trusted and no fixed ows_onlineresource / MS_ONLINERESOURCE is set. Where that gate is open, unauthenticated reflected XSS against a GIS front-end is a real credential/session-theft vector. |
| Exploit ScenarioDerived | An attacker crafts a malicious GetMap URL (SERVICE=WMS&REQUEST=GetMap&FORMAT=application/openlayers) and lures a logged-in MapServer user into opening it, supplying a poisoned X-Forwarded-Host header (or relying on a proxy that forwards it) whose embedded single quotes break out of the generated JavaScript URL string. When rendered, arbitrary JavaScript executes in the MapServer site origin, allowing theft of session cookies/tokens and same-origin actions as the victim. No public exploit is identified, but the vendor's fix PR includes a regression test demonstrating the exact unescaped reflection. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Reflected cross-site scripting (CWE-79) in MapServer's OpenLayers HTML output affects versions 6.0 through 8.6.3 and is fixed in 8.6.4. When a deployment trusts the X-Forwarded-Host header and does not pin a fixed ows_onlineresource metadata value or MS_ONLINERESOURCE environment variable, an unauthenticated remote attacker can supply a host value containing embedded single quotes that escapes the single-quoted JavaScript URL emitted for SERVICE=WMS&REQUEST=GetMap&FORMAT=application/openlayers; a victim who opens the crafted link executes attacker-controlled JavaScript in the MapServer site origin, exposing sessions or tokens, same-origin data and requests, and actions as the victim. Impact is confined to the victim's browser session on the MapServer origin rather than the server itself, and exploitation is constrained by the non-default configuration prerequisite and by the need for user interaction, so the assessed risk is moderate; no public exploit identified at time of analysis and CVSS is 5.3.
RemediationAI
Upgrade to MapServer 8.6.4, which contains the escaping fix; this is the only complete remediation and is available per the vendor advisory GHSA-xqj6-vjqr-33vv and the rel-8-6-4 release. If immediate upgrade is not possible, the most effective compensating control is to pin the online resource so the attacker-controlled host is never reflected: set a fixed ows_onlineresource metadata value in the WEB section of each mapfile or export a fixed MS_ONLINERESOURCE environment variable - either eliminates the vulnerability path, but requires per-mapfile configuration and may break legitimate multi-host or proxy-based URL generation. A second control is to stop trusting client-supplied X-Forwarded-Host: configure the reverse proxy or web server to overwrite (or strip) the header on inbound requests and accept it only from known proxy IPs, with the trade-off that legitimate deployments relying on dynamic host detection will serve incorrect absolute URLs. Because the issue only manifests in the OpenLayers output, disabling or blocking GET requests with FORMAT=application/openlayers also removes the attack surface, at the cost of losing that output format for users who need it. Note that applying upstream patches requires rebuilding MapServer, and that the fix is squarely in the escaping routine (msEscapeJSonLikeString in src/mapstring.cpp) plus associated tests, so partial or local patches to only one call site should be avoided in favor of the released 8.6.4 build or the referenced commits.
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
The flaw is a classic reflected XSS caused by missing output encoding in a generated HTML/JavaScript template. MapServer builds the online resource URL for the WMS OpenLayers output by calling msBuildOnlineResource() (src/maputil.c), which derives the server's base URL in part from the HTTP_X_FORWARDED_HOST request header - a header that reverse proxies legitimately set but that is fully attacker-controllable if the origin trusts client-supplied values. That value is then passed through processLine() in src/maptemplate.c and substituted for the [mapserv_onlineresource] template token inside the OpenLayers HTML output, where the URL is embedded in a single-quoted JavaScript string. Because the substitution path did not escape single quotes for the JavaScript context, a value such as one containing an apostrophe terminates the string literal and allows arbitrary script injection into the generated page (CWE-79, Improper Neutralization of Input During Web Page Generation). The upstream fix reworks the escaping primitive in src/mapstring.cpp: the previous msEscapeJSonString() is generalized into msEscapeJSonLikeString(const char *pszString, char chQuote), which escapes the caller-specified quote character (single quote for the JavaScript string context) rather than only double quotes, and msEscapeJSonString() becomes a thin wrapper around it. Regression tests were added under the msautotest WMS suite, including a mapfile without a configured online resource and a harness that injects HTTP_X_FORWARDED_HOST="with'single'quote" to verify the quote is escaped in the output. CPE data (cpe:2.3:a:mapserver:mapserver:*:*:*:*:*:*:*:*) and the EUVD record confirm the affected range as MapServer 6.0 up to but not including 8.6.4.
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
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
Unauthenticated reflected XSS (PR:N/UI:R, S:C for browser-origin impact) gated on a non-default trusted-header configuration (AC:H); limited confidentiality/integrity of the victim session (C:L/I:L), no availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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&REQUEST=GetMap&FORMAT=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.
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
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
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-82433
NVD
CVE.org
EPSS
GitHub
Exploit-DB