GeoServer exposes the built-in WFS 2.0 stored query urn:ogc:def:query:OGC-WFS::GetFeatureById through the public GetFeature operation. The stored query substituted the caller's ID parameter into an XML template without escaping, then parsed the result without GeoServer's entity resolver. An unauthenticated caller could inject XML, including an xi:include , into the query.
A single unauthenticated WFS request can:
read a local text file readable by the GeoServer process;
fetch an attacker selected HTTP or HTTPS URL (server-side request forgery);
receive the fetched text in the Illegal property name error response.
No authentication, custom stored query or CreateStoredQuery access is required. Contents are echoed when a layer is published to anonymous users; otherwise the file is still read but not returned.
StoredQuery.compile() replaced the ${ID} token in the GetFeatureById template ( ) using plain string replacement, so quotes and angle brackets in the value could close the rid attribute and add new FES elements. The result was parsed with new Parser(new WFSConfiguration()) without the catalog entity resolver used elsewhere in the class, so XInclude and external entities were resolved with ordinary URI access.
Restrict or disable the WFS service for anonymous users using service security, or disable WFS if it is not required.
Stored query parsing now uses the GeoServer entity resolver, and the GeoTools PreventLocalEntityResolver checks redirects.
GeoServer 2.27.7, 2.28.6, 3.0.2
GeoTools 33.7, 34.6, 35.2
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
