Skip to main content

MapServer CVE-2026-54355

| EUVDEUVD-2026-82433 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-09-17 GitHub_M
5.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft GetMap application/openlayers URL
  2. Delivery
    Inject single-quote payload via X-Forwarded-Host
  3. Exploit
    Lure victim to open link
  4. Execution
    Header reflected unescaped into JS string
  5. Persist
    Arbitrary JavaScript runs in site origin
  6. Impact
    Steal 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

MapServer 6.0, < 8.6.4

Affected Packages

euvd mapserver_6_0 fix: 8.6.4

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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
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
vuln.today AI 4.7 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Sep 17, 2026 - 21:19 EUVD

DescriptionCVE.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

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular open-source GIS/WMS web server, common but domain-specific deployments
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy