# GeoTools Remote Code Execution (RCE) vulnerability in evaluating XPath expressions

Advisory record · `GHSA-w3pj-wh35-fq8w`

- **Identifiers:** `GHSA-w3pj-wh35-fq8w` · `CVE-2024-36404`
- **State:** Confirmed
- **Severity:** CVSS 9.8 Critical
- **Critical:** Yes: CVSS 9+, CVSS 7+ and EPSS
- **Weakness (CWE):** [CWE-95](https://cwe.mitre.org/data/definitions/95.html)
- **Tags:** [Code injection](https://agentprime.io/advisories/tag/code-injection.md)
- **Published:** 5 Feb 2025
- **Updated:** 4 Feb 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 5 Feb 2025, 15:32 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Critical

Critical, because:

- CVSS score 9.8: 9.0 or more.
- CVSS score 9.8 (7.0 or more) and EPSS 0.76 (0.1 or more): a high score and a real chance of exploitation in the next 30 days.

How we decide what’s critical: <https://agentprime.io/advisories/critical.md>

## Affected packages

- `org.geotools:gt-app-schema` (Maven): affected `>=30.0, <30.4 || >=31.0, <31.2 || >=29.0, <29.6 || <28.6`; fixed in `30.4`, `31.2`, `29.6`, `28.6`
- `org.geotools:gt-complex` (Maven): affected `>=30.0, <30.4 || >=31.0, <31.2 || >=29.0, <29.6 || <28.6`; fixed in `30.4`, `31.2`, `29.6`, `28.6`
- `org.geotools.xsd:gt-xsd-core` (Maven): affected `>=30.0, <30.4 || >=31.0, <31.2 || >=29.0, <29.6 || <28.6`; fixed in `30.4`, `31.2`, `29.6`, `28.6`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> GeoTools packages gt-app-schema, gt-complex and gt-xsd-core are affected in versions 30.0 to before 30.4, 31.0 to before 31.2, 29.0 to before 29.6, and before 28.6. An attacker who can supply XPath expressions to affected GeoTools functionality can execute arbitrary code. Upgrade to 30.4, 31.2, 29.6, or 28.6 or later. As a workaround, removing the gt-complex jar disables the affected XPath evaluation but also disables application schema datastore functionality.

Written 3 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 9.8 Critical, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.76, the 99th percentile, on 14 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:21 UTC: First seen by agentprime
- 31 Oct 2026, 14:21 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-w3pj-wh35-fq8w)

## Sources

- [GitHub Advisory Database: GHSA-w3pj-wh35-fq8w](https://github.com/advisories/GHSA-w3pj-wh35-fq8w)
- [OSV: GHSA-w3pj-wh35-fq8w](https://osv.dev/vulnerability/GHSA-w3pj-wh35-fq8w)
- <https://github.com/geotools/geotools/security/advisories/GHSA-w3pj-wh35-fq8w>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-36404>
- <https://github.com/geotools/geotools/pull/4797>
- <https://github.com/geotools/geotools/commit/f0c9961dc4d40c5acfce2169fab92805738de5ea>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2031%20Releases/31.1>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2030%20Releases/30.3/geotools-30.3-patches.zip/download>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2030%20Releases/30.2/geotools-30.2-patches.zip/download>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2029%20Releases/29.2/geotools-29.2-patches.zip/download>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2028%20Releases/28.2/geotools-28.2-patches.zip/download>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2027%20Releases/27.5/geotools-27.5-patches.zip/download>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2027%20Releases/27.4/geotools-27.4-patches.zip/download>
- <https://sourceforge.net/projects/geotools/files/GeoTools%2026%20Releases/26.7/geotools-26.7-patches.zip/download>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-w3pj-wh35-fq8w>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-w3pj-wh35-fq8w/>. Everything for agents: <https://agentprime.io/llms.txt>.
