Introduction
An unauthenticated caller can make a GeoServer instance read its own security configuration and user database, then watch the stolen text echoed back inside an ordinary WFS error message. That is CVE-2026-120705, an XML injection in GeoServer's public WFS GetFeatureById stored query that CISA added to its Known Exploited Vulnerabilities catalog on November 27, 2026.
GeoServer is an OSGeo project: an open source Java server, licensed under the GPL and built on the GeoTools GIS toolkit, that publishes and edits geospatial data through Open Geospatial Consortium standards such as WFS and WMS. It is widely deployed in scientific and public data sharing pipelines. The USGS Water Mission Area, for example, describes a clustered Dockerized GeoServer deployment serving over 5 million requests per month. Its WFS service exists to distribute vector data, which is why an unauthenticated flaw in that path deserves close attention.
Technical Information
The vulnerable operation is WFS 2.0 GetFeature, invoked against the predefined stored query urn:ogc:def:query:OGC-WFS::GetFeatureById. The bug has two parts that only work together.
First, StoredQuery.compile() substitutes the caller's ID value into the GetFeatureById XML template using plain string replacement, producing markup of the form:
<fes:ResourceId rid='${ID}'/>
Quotes and angle brackets in the ID value can close the rid attribute and inject new FES elements, so an attacker controls part of the resulting XML document, including the ability to introduce an xi:include element.
Second, the resulting XML was parsed with a parser that did not use the catalog entity resolver applied elsewhere in the class:
Parser p = new Parser(new WFSConfiguration());
The reload parser ran with setXIncludeAware(true) and a NullEntityResolver that permitted file: access. XInclude and external entity references therefore resolved with ordinary URI access, reaching local files and arbitrary HTTP(S) URLs.
Classification
The primary CVE record classifies this as CWE-91 (XML Injection). GitHub's advisory also associates it with CWE-611 (improper restriction of XML external entity references) and CWE-918 (server side request forgery). The published CVSS 3.1 assessment is:
| Attribute | Value |
|---|---|
| Severity and score | High, 8.6 |
| Attack vector | Network |
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Changed |
| Confidentiality | High |
| Integrity | None (this assessment) |
| Availability | None (this assessment) |
The exact vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N. The absence of scored integrity or availability impact applies to this vulnerability's published assessment, not to every possible attack chain.
Disclosure and SSRF conditions
The maintainer advisory documents local text file reads within the GeoServer process's permissions and retrieval of attacker selected HTTP or HTTPS URLs. Retrieved text can appear in an Illegal property name error. If a layer is published to anonymous users, the content is echoed back; otherwise, the advisory states the file is still read but not returned. The XML processing imposes content compatibility limitations, so arbitrary binary files may not be readable.
Attack flow
- An unauthenticated attacker sends a WFS GetFeature request using the built-in
GetFeatureByIdstored query with a craftedIDvalue. - The
IDvalue contains quotes and angle brackets that close theridattribute and inject anxi:includeelement pointing at afile:path or HTTP(S) URL. - GeoServer substitutes the value into the template without escaping and reparses the document with XInclude enabled and no hardened entity resolver.
- The server reads the referenced local file or fetches the remote URL.
- When the targeted layer is published to anonymous users, the retrieved text is returned inside an
Illegal property nameerror response.
Eye Security demonstrated using this read to obtain users.xml (usernames and password hashes) together with the security configuration. In the broader research chain, that disclosure is combined with CVE-2026-129245 (remember me authentication) and additional flaws involving administrator controlled SQLite/HSQLDB JDBC extension loading to reach unauthenticated code execution. Those later capabilities are not intrinsic to CVE-2026-120705 alone.
Proof of Concept
A fully working, public proof of concept exists. It is the "Unauthenticated WFS GetFeatureById XML injection" stage (GHSA-39mw-5chv-jh47) of a five-link pre-authentication GeoServer RCE chain researched and disclosed by Jonah Burgess (CryptoCat), with Eye Security (Niels Teusink) and Quikko also credited on the advisory.
The public artifacts include the GitHub repository Crypto-Cat/geoserver-unauth-rce-poc, which contains a complete Python exploit client (geoserver_preauth_rce.py, roughly 29 KB), a prebuilt HSQLDB payload database pair (payload.properties, payload.script), and a payload-src/ directory with the Java translet source and database generator. A technical writeup at cryptocat.me provides per-stage root cause analysis, the XInclude injection payload, example execution output, and patch diffing.
In the CryptoCat variant, the injection is placed via an anonymous x/WFS stored query (bypass CVE-2026-129243) whose escaped text is reparsed into live markup and disclosed via the public DescribeStoredQueries operation. The escaped XInclude elements embedded in the stored-query text are:
<wfs:Query typeNames=""> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="" href="file:///absolute/data/security/config.xml" parse="text"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="" href="file:///absolute/data/security/usergroup/default/users.xml" parse="xml"/> </wfs:Query>
This read returns the active remember-me <key> from security/config.xml and the administrator password digest from users.xml, which the broader chain uses to forge an admin remember-me cookie (CVE-2026-129245) and then achieve RCE via HSQLDB OTHER-column deserialization through a JDBC user-group service (CVE-2026-129242).
Running the PoC, per the repo README:
python3 geoserver_preauth_rce.py -u http://127.0.0.1:18080/geoserver -c id
Example output against the official docker.osgeo.org/geoserver:3.0.0 image (GeoServer running as root):
[*] Probing anonymous WFS stored-query errors for the data-directory path [+] data directory: /opt/geoserver_data [*] Persisting an anonymous x/WFS stored query with deferred XInclude [+] DescribeStoredQueries disclosed the remember-me key and admin password digest [*] Forging a remember-me cookie and exchanging it for a session [+] administrator JSESSIONID accepted by the REST API [*] Uploading the HSQLDB payload database and request via REST [+] registered JDBC user-group service 'jdbc_geoserver_poc' [*] Triggering deserialisation through a user-property lookup [+] command executed (exit code 0) [+] output of: id ------------------------------------------------------------ uid=0(root) gid=0(root) groups=0(root)
Preconditions and scope: network access to the WFS endpoint and REST API; the stock admin account enabled in the default file user service; a Linux target (payload executes /bin/sh -c, command up to 512 printable ASCII bytes). The HSQLDB gadget stores a PriorityQueue with a BeanComparator that triggers TemplatesImpl.getOutputProperties() to load a compiled XSLT translet whose constructor runs the command. The PoC was not independently executed as part of this assessment, but the code, payload artifacts, and reproduction steps are publicly available and corroborated by the official vendor advisory.
Patch Information
GeoServer fixed the bug in its October 19, 2026 releases: GeoServer 3.0.2, 2.28.6, and 2.27.7, which bundle GeoTools 35.2, 34.6, and 33.7 carrying the library half of the fix. The full CVE details appeared in advisory GHSA-39mw-5chv-jh47 on November 23, 2026. The 2.28.6 release notes list the fix as GEOS-12293 [CVE-2026-120705] Unauthenticated WFS GetFeatureById XML injection, with engineering tickets GEOS-12199 (GeoServer) and GEOT-7938 (GeoTools).
The advisory states the fix targets the second part of the bug: stored query parsing now uses the GeoServer entity resolver, and the GeoTools PreventLocalEntityResolver checks redirects. Rather than hunting down every injection vector, the fix removes what injected XML can reach.
Part 1: GeoServer PR #9928
Merged into main on October 12, 2026 (merge commit be516f34d0934caa001fae5aaae57efd170a8899) and labelled for backport to 2.27.x, 2.28.x, and 3.0.x, PR #9928 touches 5 files (+211/-15). The central change in StoredQuery.java attaches an entity resolver to the parser built in compile():
// parse Parser p = new Parser(new WFSConfiguration()); + EntityResolver entityResolver = getEntityResolver(); + if (entityResolver != null) { + p.setEntityResolver(entityResolver); + }
A new helper looks up that resolver, and validate() now calls it instead of reading catalog.getResourcePool().getEntityResolver() directly:
private EntityResolver getEntityResolver() { return catalog != null ? catalog.getResourcePool().getEntityResolver() : null; }
The PR applies the same pattern in StoredQueryProvider.parseStoredQuery(Resource, Parser), which parses stored-query definitions saved in the data directory, closing the same XInclude/XXE path when those files are reloaded:
p.setRootElementType(WFS.StoredQueryDescriptionType); + EntityResolver entityResolver = getEntityResolver(); + if (entityResolver != null) { + p.setEntityResolver(entityResolver); + }
As a side effect, a stored query that includes an external resource may now fail to parse, so DropStoredQuery catches the parse failure and deletes the file by name through a new StoredQueryProvider.removeStoredQueryByName(). New tests (reloadingAStoredQueryRespectsTheConfiguredEntityResolver and testDropUnparseableStoredQuery) check the behaviour.
One caveat: the Javadoc on the new helper notes that the built-in DEFAULT query has no catalog, "so none is applied," and DEFAULT appears to be the GetFeatureById query itself. The reviewed diffs do not show how the GetFeatureById path ends up with a resolver at runtime, and they do not change the plain string replacement of ${ID}. Two practical implications follow: if you backport by hand, apply the whole GEOS-12293 change set rather than just PR #9928; and after upgrading, confirm that an injected xi:include in the ID parameter is rejected.
Part 2: GeoTools commit 361a0131
The GeoTools change ("[GEOT-7938] Improved redirect-following checks in PreventLocalEntityResolver") hardens the resolver so it cannot be tricked. Previously, PreventLocalEntityResolver checked a URI against its allow-list and then returned null, which told the parser to fetch the URI itself and follow HTTP redirects without re-validation. An attacker could serve an allowed-looking http://attacker/x.xsd that redirected to an internal or disallowed address. In PreventLocalEntityResolver.java (+111/-12), the resolver now fetches allow-listed http(s) URIs itself:
String uri = absolutizeSystemId(baseURI, systemId); // check if the absolute systemId is an allowed URI if (isAllowedUri(uri)) { // only http(s) can redirect; fetch it here so the redirect target gets re-validated too if (uri.regionMatches(true, 0, "http", 0, 4)) { return fetchAllowedHttpUri(uri); } return null; }
The new fetchAllowedHttpUri() disables automatic redirects (connection.setInstanceFollowRedirects(false)) and follows each Location header by hand, re-checking every redirect target against the allow-list and requiring http(s):
if (!isAllowedHttpUri(resolvedLocation)) { throw new SAXException(ERROR_MESSAGE_BASE + "redirect to disallowed URL " + resolvedLocation); }
The commit adds a redirect cap (MAX_REDIRECTS, default 5), connect and read timeouts (default 30 seconds), rejection of HTTP status codes 400 and above, and rejection of malformed Location headers. The DescribeFeatureType exception now goes through the same isAllowedUri() check on the absolute URI.
How the two fixes work together
The fix is layered. GeoServer ensures stored-query XML is parsed with the catalog's restrictive resolver, so XInclude and external entities can no longer quietly read file: URIs or arbitrary URLs. GeoTools ensures an allow-listed http(s) URL cannot be redirected somewhere it should not go. Because the GeoTools part lives in the gt-metadata artifact, anyone embedding GeoServer or GeoTools must upgrade both: org.geoserver:gs-wfs-core to 2.27.7, 2.28.6, or 3.0.2, and org.geotools:gt-metadata to 33.7, 34.6, or 35.2.
Detection Methods
There are three places to find evidence: the inbound WFS request (containing XML markup), the server's response (a WFS exception), and possibly an outbound fetch from the GeoServer JVM. If the targeted layer is not anonymous, the file is still read but not returned, so a response that leaks nothing does not mean nothing happened.
Web, proxy, and WAF log hunting
Focus on requests to /geoserver/wfs or /geoserver/ows that use GetFeature with a storedQuery_id of urn:ogc:def:query:OGC-WFS::GetFeatureById and an ID value containing quotes or angle brackets; xi:include, XInclude, or xmlns:xi; DOCTYPE or ENTITY syntax; or file: or http(s):// references. Also search for sensitive data-directory names: security/config.xml, users.xml, roles.xml, and masterpw.info.
The probes watchTowr's honeypots captured on 2026-11-25 used the related CVE-2026-129243 step. DugganUSA reports a POST to /geoserver/wfs with the User-Agent GeoServer-RCE-PoC, a CreateStoredQuery with service="x/WFS", a stored-query id of gssec followed by hex characters, and escaped XInclude elements pointing at file:///opt/geoserver_data/security/config.xml and .../security/usergroup/default/users.xml. Treat the User-Agent and gssec prefix as hunting strings, not proof, since the User-Agent is easy to change. CybaVerse suggests counting 4xx/5xx responses to stored-query traffic per source IP, because the in-the-wild probes were error based.
One blind spot: standard access logs only record query strings, so an XInclude payload sent in a POST XML body will not appear unless your WAF or reverse proxy logs request bodies.
Threadlinqs published a free KQL rule covering the prefix bypass, stored-query writes, and XInclude injection together:
let lookback = 24h; W3CIISLog | where TimeGenerated > ago(lookback) | where csUriStem has_any ("/wfs", "/ows") | extend q = tolower(url_decode(coalesce(csUriQuery, ""))) | extend PrefixedService = q matches regex @"service=[^&]*/", StoredQueryWrite = q matches regex @"request=(create|drop)storedquery", XIncludeInject = q has_any ("xi:include", "xmlns:xi", "<xi:") | where PrefixedService or StoredQueryWrite or XIncludeInject | summarize Hits = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), Statuses = make_set(scStatus, 10), Paths = make_set(csUriStem, 10) by cIP, sIP, PrefixedService, StoredQueryWrite, XIncludeInject | order by Hits desc
Sigma rules
Several experimental rules are public: Decryption Digest provides an XInclude-injection rule for live alerting plus a 30-day hunt version; Adverse Trace (f4n6) flags GetFeatureById/service=WFS queries containing <, >, SYSTEM, or DOCTYPE; and CybaVerse ships a pack with 8 Sigma rules and 13 KQL hunts. The Decryption Digest rule:
title: GeoServer WFS XInclude Injection Attempt CVE-2026-120705 status: experimental logsource: category: webserver detection: selection_uri: cs-uri-stem|contains: - '/geoserver/ows' - '/geoserver/wfs' selection_payload: cs-uri-query|contains|any: - 'xi:include' - 'XInclude' - 'xinclude' cs-bytes|contains|any: - 'xi:include' - 'XInclude' - 'xinclude' condition: selection_uri and (selection_payload) falsepositives: - Internal GeoServer administration scripts using XML templates level: high
Check the field names against your schema before use: this rule matches body content via cs-bytes, which normally holds a byte count, so you will likely need to map it to a real request-body field.
WAF and IPS signatures
Decryption Digest published a ModSecurity/CRS rule that inspects the request body and arguments for XInclude on the WFS and OWS paths; deploy it in detection-only mode first:
SecRule REQUEST_URI "@rx /geoserver/(ows|wfs)" "id:926120705, phase:2, block, capture, t:none,t:urlDecodeUni, msg:'GeoServer XInclude XML Injection Attempt CVE-2026-120705', ... chain"
SecRule REQUEST_BODY|ARGS "@rx (?i)(xi:include|XInclude|xinclude)" "capture, setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'"
Check Point's IPS protection CPAI-2026-19173 targets the companion flaw CVE-2026-129243 (the x/WFS service-prefix bypass) rather than this CVE, logging as "Web Server Enforcement Violation" with attack information "GeoServer Authentication Bypass (CVE-2026-129243)"; it can still catch the chained probes. As of November 28, InfraStack found no CDN or WAF vendor emergency rule specific to this CVE.
Active scanning of your own servers
A community Nuclei template, http/cves/2026/CVE-2026-120705.yaml, was proposed in projectdiscovery/nuclei-templates PR #18095 and was still unmerged at the time of checking. It sends an xi:include pointing at an Interactsh URL and reports a hit only when all three conditions hold: an out-of-band HTTP callback arrives, the response contains ows:ExceptionReport, and the response contains either Could not find feature with specified id or and no fallback element was found. Those two strings are also useful response-side hunting terms.
Host and data-directory checks
The main indicator GeoServer itself has published is unexpected stored queries in wfs/query and workspaces/*/wfs/query, especially ids starting with gssec. This only catches the chained variant: CVE-2026-120705 needs no custom stored query, so the GetFeatureById path leaves nothing on disk. CybaVerse's read-only checkers (check-geoserver-cve-2026-120705.sh and Check-GeoServerCve2026120705.ps1) rate the gs-wfs-core and gt-metadata jar versions against the advisory's affected ranges and count stored-query files containing XInclude, DOCTYPE, ENTITY, or file: text. A file read through XInclude creates no file-write event in EDR and does not always appear in geoserver.log, so web-layer coverage is your most reliable signal for the read itself.
Outbound (SSRF) and follow-on behaviour
Alert when the GeoServer Java process connects to external HTTP/HTTPS destinations not on an approved list, RFC1918 or loopback addresses, or cloud metadata endpoints. CybaVerse's Q10 hunt covers JVM connections to public addresses and to SMB (port 445). Because a successful read leads to the later chain steps, also watch for /geoserver/rest/security or /geoserver/rest/resource calls from outside your admin networks, administrator sessions that start from a remember-me cookie with no login, new JDBC user/group or role services, and the JVM starting shells.
Affected Systems and Versions
| Component | Affected versions | Fixed version |
|---|---|---|
org.geoserver:gs-wfs-core | Through 2.27.6 | 2.27.7 |
org.geoserver:gs-wfs-core | 2.28.0 through 2.28.5 | 2.28.6 |
org.geoserver:gs-wfs-core | 3.0.0 through 3.0.1 | 3.0.2 |
org.geotools:gt-metadata | Through 33.6 | 33.7 |
org.geotools:gt-metadata | 34.0 through 34.5 | 34.6 |
org.geotools:gt-metadata | 35.0 through 35.1 | 35.2 |
The public PoC was demonstrated against the official docker.osgeo.org/geoserver:3.0.0 image. Exploitation requires network access to the WFS endpoint; the file disclosure echo additionally depends on a layer being published to anonymous users.
Vendor Security History
GeoServer follows coordinated vulnerability disclosure, accepts private reports through its security mailing list or GitHub, and backports fixes to stable and maintenance branches. The process is volunteer based and does not promise a response time. CISA's retrospective on CVE-2024-36401 (advisory AA25-266A) documents attackers exploiting two GeoServer instances and moving laterally to additional servers, deploying persistence tooling and web shells including China Chopper. The second GeoServer was exploited on July 24, 2024, after that older vulnerability entered CISA's catalog on July 15, 2024, which shows the consequences of delaying available security fixes. That case is a separate historical vulnerability and is not evidence that those actors exploited CVE-2026-120705.
References
- NVD: CVE-2026-120705
- MITRE CVE Record: CVE-2026-120705
- GeoServer Advisory GHSA-39mw-5chv-jh47
- GitHub Security Advisories API: GHSA-39mw-5chv-jh47
- GeoServer PR #9928 (GEOS-12199)
- GeoServer PR #9928 API
- GeoServer PR #9928 Files
- GeoTools commit 361a0131 (GEOT-7938)
- GeoServer 2.28.6 Release Announcement
- GeoServer Security Update, November 2026
- GeoServer 2.27.7 Release
- GeoServer 2.28.6 Release
- GeoServer 3.0.2 Release
- JIRA GEOS-12199
- JIRA GEOT-7938
- CISA KEV Catalog entry
- CISA: Three KEV Additions, November 27, 2026
- Canadian Centre for Cyber Security AV26-1207
- CISA AA25-266A Incident Response Lessons
- Eye Security Research: Unauthenticated RCE in GeoServer
- Cloud Security Alliance Research Note
- The Hacker News: GeoServer Flaws Exploited
- PoC Repository: Crypto-Cat/geoserver-unauth-rce-poc
- PoC README (raw)
- PoC Repository Contents API
- CryptoCat Writeup
- KEV mirror: CVE-2026-120705
- DugganUSA: GeoServer Exploitation Analysis
- Decryption Digest: Unauthenticated RCE Chain
- CybaVerse Detection Pack README
- f4n6 Security Feed
- Threadlinqs Threat Intel TL-2026-6860
- Check Point CPAI-2026-19173
- Nuclei Templates PR #18095
- Nuclei Templates PR #18095 Files
- InfraStack: CVE-2026-120705
- Mallory.ai Story
- OSGeo: GeoServer Project
- GeoServer Service Security Documentation
- Companion Advisory GHSA-rv5g-g2r9-58rj (CVE-2026-129243)



