CVE-2026-104140 QGIS: Stored XSS in WFS3 getFeatures HTML page via unescaped feature attribute values

Medium 6.1 Published Updated

Attackers can inject malicious scripts into QGIS Server WFS3 HTML responses, allowing session hijacking or unauthorized actions when users view feature data.

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-104140?

CVE-2026-104140 is a medium-severity cross-site scripting vulnerability in QGIS, published on 12 Oct 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

QGIS is a free, open source, cross-platform geographic information system. Prior to 3.44.12 and 4.0.0 through 4.2.3, QGIS Server renders feature data in WFS3 (OGC API Features) HTML responses without HTML escaping. Attacker-controlled feature.properties values from a published writable vector layer reach resources/server/api/ogc/templates/wfs3/getFeatures.html through QgsServerOgcApiHandler::htmlDump and the if_nullptr_null_str callback. A user who opens an items HTML page can execute stored markup or script in the QGIS Server origin, which can expose the viewer's session data or issue authenticated requests with the viewer's privileges. This issue is fixed in version 3.44.12.

Weakness: CWE-79

Which versions are affected by CVE-2026-104140?

How do I fix CVE-2026-104140?

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-104140 being exploited?

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

Sources

Also known as DEBIAN-CVE-2026-104140, GHSA-cr49-pm9v-m788, UBUNTU-CVE-2026-104140.

Is CVE-2026-104140 in your software?

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

Check your SBOMs for free