← Back to blog
// Post

"GeoServer: from unauthenticated XXE to a root shell — what your team needs to know"

GeoServer is the piece that publishes maps and geospatial data on the web — city halls, government agencies, energy, water utilities, agriculture, mining and logistics. It usually sits on the internet, because that's exactly its job.

CVE-2025-53607 (GHSA-cggp-wx63-hrxr), independently reported by three researchers — one of them from DeepLook Labs — was rated as XXE with file read and SSRF, CVSS 8.2. That sounds "high, but not critical". It isn't. Chained with GeoServer's own default settings, the outcome is remote command execution as root, starting from an anonymous request.

The summary for decision-makers

  • No login, no user interaction. The attack starts with a WFS request, a service that ships enabled and open by default.
  • The file it reads is the worst possible one: the user registry, including the administrator's password hash.
  • No password cracking needed. The leaked hash is enough to forge an admin session, thanks to a default key almost nobody changes.
  • Admin becomes a shell. Legitimate admin features allow writing an executable file to the server. In the official Docker image, the process runs as root.
  • There is no configuration workaround for the XXE. The fix is to upgrade.

The chain in four steps

// From anonymous request to root shell01 · XXEWFS, no loginreads users.xml02 · Leakerror returnsthe admin hash03 · Adminforged cookievia default key04 · RCEH2 writes a JSPshell as root
  1. Unauthenticated XXE. With strict=true, GeoServer validates the XML against a schema chosen by the attacker. The root cause is small: a validation helper calls a SAX method that silently replaces the restricted entity resolver with a handler that allows everything.
  2. Leak in the response itself. The validation error message isn't sanitized and comes back whole over HTTP — along with the contents of users.xml.
  3. Forged admin session. The RememberMe token is signed with the username, an expiry, the stored password hash and a key. In the default data directory, that key is literally geoserver. With the leaked hash, you can build a valid cookie without knowing the password.
  4. Command execution. As admin, the attacker creates an H2 datastore (GeoServer still ships driver 1.1.119) and a SQL view that uses CSVWRITE to write a JSP into Tomcat's webroot. A plain WFS request runs the view — and the JSP becomes a shell.

No single step looks catastrophic on its own. It's the chaining that turns an "8.2" into full compromise — exactly the kind of chain we hunt for in bug bounty.

Who's exposed

Component Vulnerable Fixed
GeoServer ≤ 2.27.5 · 2.28.0 – 2.28.3 2.27.6 · 2.28.4 · 3.0.0
GeoTools gt-xsd-core ≤ 33.5 · 34.0 – 34.3 33.6 · 34.4 · 35.0

The initial schema fetch (SSRF) was handled separately in GHSA-rg89-jmrw-x26f. We recommend going straight to 2.27.7, 2.28.6 or 3.0.2, which close both. And note: the same code path is used by CSW and WCS, so blocking WFS alone doesn't solve it.

What to do today

  • Upgrade GeoServer to 2.27.7, 2.28.6 or 3.0.2.
  • Block outbound connections from the GeoServer host — the chain depends on it fetching a file from the attacker's infrastructure.
  • Change the RememberMe key (or disable the feature).
  • Take /geoserver/web and /geoserver/rest off the internet. Administration doesn't need to be public.
  • Don't run Tomcat as root, and keep the webapps directory read-only.
  • Remove the H2 driver and datastores if you don't use them.

To check whether someone has already tried: look for OWS requests with strict=true and an external schemaLocation, unexpected outbound connections from the server, H2 datastores or SQL views nobody created, and new .jsp files in the webroot.

The lesson

The advisory describes the bug correctly — file read and SSRF. The true impact only shows up when someone asks "which file, and what can I do with it?". Severity on paper and impact in practice are different things, which is why every finding we deliver comes with a proof of concept.

Each of the defenses above would break the chain on its own. Defense in depth isn't red tape: it's what turns a critical bug into an incident that never happened.

The full technical write-up, with the line-by-line root cause analysis, is at wallesonmoura.com.br.

Running GeoServer — or any other exposed application — and want to know what a hunter would find in it? Request a PoC.

Credits

Independently reported by ColdFusionX, chudyPB and Walleson Moura (@ph0r3nsic) of DeepLook Labs. Advisory coordination by Jody Garnett, fix by Pierre Mauduit and analysis by axl8713.