CVE-2026-42030 MapServer: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in OpenLayers viewer

Medium 6.1 Published Updated

An unauthenticated attacker can inject arbitrary HTML/JavaScript into users' browsers via crafted WMS URLs in MapServer's OpenLayers viewer.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-42030?

CVE-2026-42030 is a medium-severity cross-site scripting vulnerability in MapServer, published on 8 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

MapServer is a system for developing web-based GIS applications. From version 6.0 to before version 8.6.2, a reflected XSS vulnerability in MapServer's WMS server allows an unauthenticated attacker to inject arbitrary HTML/JavaScript into the browser of any user who opens a crafted WMS URL. The vulnerability is triggered via FORMAT=application/openlayers combined with an unsanitized SRS parameter in WMS 1.3.0 requests. This issue has been patched in version 8.6.2.

Weakness: CWE-80

Which versions are affected by CVE-2026-42030?

It affects 1 product.

Products include Osgeo Mapserver.

How do I fix CVE-2026-42030?

Upgrade to a fixed version.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-42030 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42030 exists.

Sources

Also known as DEBIAN-CVE-2026-42030, GHSA-4g9f-ph64-hg2x, UBUNTU-CVE-2026-42030.

Is CVE-2026-42030 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free