{"id":"CVE-2024-36404","published":"2024-07-02T13:39:35Z","modified":"2024-08-02T03:37:05Z","title":"GeoTools Remote Code Execution (RCE) vulnerability in evaluating XPath expressions","vendor":"geotools","product":"geotools","tier":"core","eol":null,"affectedVersions":[{"vendor":"geotools","product":"geotools","versions":["< 29.6",">= 30.0, < 30.4",">= 31.0, < 31.2"]}],"description":{"text":"GeoTools is an open source Java library that provides tools for geospatial data. Prior to versions 31.2, 30.4, and 29.6, Remote Code Execution (RCE) is possible if an application uses certain GeoTools functionality to evaluate XPath expressions supplied by user input. Versions 31.2, 30.4, and 29.6 contain a fix for this issue. As a workaround, GeoTools can operate with reduced functionality by removing the `gt-complex` jar from one's application. As an example of the impact, application schema `datastore` would not function without the ability to use XPath expressions to query complex content. Alternatively, one may utilize a drop-in replacement GeoTools jar from SourceForge for versions 31.1, 30.3, 30.2, 29.2, 28.2, 27.5, 27.4, 26.7, 26.4, 25.2, and 24.0. These jars are for download only and are not available from maven central, intended to quickly provide a fix to affected applications.","provenance":"source","from":"CVE.org"},"summary":{"text":"GeoTools, an open source Java library for geospatial data, is vulnerable to remote code execution in its XPath expression evaluation functionality in versions prior to 31.2, 30.4, and 29.6. An unauthenticated remote attacker can exploit this without user interaction when an application uses that GeoTools functionality to evaluate XPath expressions supplied as user input, with the fix available in the listed patched versions and a workaround of removing the gt-complex jar at the cost of reduced functionality.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:12:12Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.76065,"percentile":0.9953,"date":"2026-10-29","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"references":[{"url":"https://github.com/geotools/geotools/security/advisories/GHSA-w3pj-wh35-fq8w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/geotools/geotools/pull/4797","tags":["x_refsource_MISC"]},{"url":"https://github.com/geotools/geotools/commit/f0c9961dc4d40c5acfce2169fab92805738de5ea","tags":["x_refsource_MISC"]},{"url":"https://github.com/Warxim/CVE-2022-41852?tab=readme-ov-file#workaround-for-cve-2022-41852","tags":["x_refsource_MISC"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7587","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2024%20Releases/24.0/geotools-24.0-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2025%20Releases/25.2/geotools-25.2-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2026%20Releases/26.4","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2026%20Releases/26.7/geotools-26.7-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2027%20Releases/27.4/geotools-27.4-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2027%20Releases/27.5/geotools-27.5-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2028%20Releases/28.2/geotools-28.2-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2029%20Releases/29.2/geotools-29.2-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2030%20Releases/30.2/geotools-30.2-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2030%20Releases/30.3/geotools-30.3-patches.zip/download","tags":["x_refsource_MISC"]},{"url":"https://sourceforge.net/projects/geotools/files/GeoTools%2031%20Releases/31.1","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"org.geotools:gt-app-schema","vulnerableRanges":[">=30.0, <30.4",">=31.0, <31.2",">=29.0, <29.6","<28.6"],"patched":["30.4","31.2","29.6","28.6"],"from":["GHSA-w3pj-wh35-fq8w"],"provenance":"source"},{"ecosystem":"Maven","package":"org.geotools:gt-complex","vulnerableRanges":[">=30.0, <30.4",">=31.0, <31.2",">=29.0, <29.6","<28.6"],"patched":["30.4","31.2","29.6","28.6"],"from":["GHSA-w3pj-wh35-fq8w"],"provenance":"source"},{"ecosystem":"Maven","package":"org.geotools.xsd:gt-xsd-core","vulnerableRanges":[">=30.0, <30.4",">=31.0, <31.2",">=29.0, <29.6","<28.6"],"patched":["30.4","31.2","29.6","28.6"],"from":["GHSA-w3pj-wh35-fq8w"],"provenance":"source"}],"advisories":[{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-app-schema","vulnerableRanges":[">=30.0, <30.4"],"patched":["30.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-complex","vulnerableRanges":[">=30.0, <30.4"],"patched":["30.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools.xsd:gt-xsd-core","vulnerableRanges":[">=30.0, <30.4"],"patched":["30.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-app-schema","vulnerableRanges":[">=31.0, <31.2"],"patched":["31.2"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-complex","vulnerableRanges":[">=31.0, <31.2"],"patched":["31.2"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools.xsd:gt-xsd-core","vulnerableRanges":[">=31.0, <31.2"],"patched":["31.2"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-app-schema","vulnerableRanges":[">=29.0, <29.6"],"patched":["29.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-complex","vulnerableRanges":[">=29.0, <29.6"],"patched":["29.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools.xsd:gt-xsd-core","vulnerableRanges":[">=29.0, <29.6"],"patched":["29.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-app-schema","vulnerableRanges":["<28.6"],"patched":["28.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools:gt-complex","vulnerableRanges":["<28.6"],"patched":["28.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-w3pj-wh35-fq8w","url":"https://github.com/advisories/GHSA-w3pj-wh35-fq8w","severity":"CRITICAL","ecosystem":"Maven","package":"org.geotools.xsd:gt-xsd-core","vulnerableRanges":["<28.6"],"patched":["28.6"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2025-0233","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-0233","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"nuclei":[{"id":"CVE-2024-36404","name":"GeoServer and GeoTools - Remote Code Execution","severity":"critical","path":"http/cves/2024/CVE-2024-36404.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-36404.yaml"}],"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2024-07-02","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2024-36404","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":31.8,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.91,"detail":"percentile 0.9953"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-osgeo-geoserver-cve-2024-36401","parents":[{"from":"CVE-2024-36401","to":"CVE-2024-36404","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-w3pj-wh35-fq8w","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-6jj6-gm7p-fcvv","via":"reference","url":"https://github.com/geotools/geotools/security/advisories/GHSA-w3pj-wh35-fq8w"}]}]}}