CVE-2026-77325: MapServer: Reflected XSS in WMS OpenLayers output via the `X-Forwarded-Host` header

Published Nov 20, 2026
·
Updated

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

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade MapServer to a version that resolves this vulnerability.

    Fixed in 8.6.5

Event History

Nov 20, 2026
CVE Published
via MITRE·07:10 PM
Data Sourced
via MITRE·07:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

MapServer versions from 6.0 through 8.6.5 are affected when WMS OpenLayers output is enabled or requested using FORMAT=application/openlayers or template=openlayers. Deployments where untrusted X-Forwarded-Host, X-Forwarded-Proto, PATH_INFO, or map= values can reach the generated online-resource string are exposed.

2

What does an attacker need to exploit it?

The attacker does not need authentication, but must be able to craft a request that influences one of the affected request-derived values and cause a victim to load the resulting OpenLayers output. Successful exploitation executes arbitrary JavaScript in the victim's browser under the MapServer origin.

3

Is a reverse-proxy deployment affected?

It can be affected if the proxy permits attacker-controlled X-Forwarded-Host or X-Forwarded-Proto headers to reach MapServer. Those values are used in the vulnerable output and can be used to inject script content.

4

What is the available fix?

The issue is fixed in MapServer 8.6.5. The provided data does not specify a workaround for deployments that cannot immediately update.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203