cve.bz

CVE-2024-36401 OSGeo GeoServer GeoTools Eval Injection Vulnerability

9.8 criticalKEVExploitEPSS 99.8%Fix available

Critical (9.8) in OSGeo GeoServer. In CISA KEV since 2024-07-15. EPSS 99.8% estimated probability of exploitation activity in the next 30 days. Fixed in org.geoserver.web:gs-web-app 2.22.6, 2.23.6, 2.24.4.

On this page
GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.22.6, 2.23.6, 2.24.4, and 2.25.2, multiple OGC request parameters allow Remote Code Execution (RCE) by unauthenticated users through specially crafted input against a default GeoServer installation due to unsafely evaluating property names as XPath expressions. The GeoTools library API that GeoServer calls evaluates property/attribute names for feature types in a way that unsafely passes them to the commons-jxpath library which can execute arbitrary code when evaluating XPath expressions. This XPath evaluation is intended to be used only by complex feature types (i.e., Application Schema data stores) but is incorrectly being applied to simple feature types as well which makes this vulnerability apply to **ALL** GeoServer instances. No public PoC is provided but this vulnerability has been confirmed to be exploitable through WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic and WPS Execute requests. This vulnerability can lead to executing arbitrary code. Versions 2.22.6, 2.23.6, 2.24.4, and 2.25.2 contain a patch for the issue. A workaround exists by removing the `gt-complex-x.y.jar` file from the GeoServer where `x.y` is the GeoTools version (e.g., `gt-complex-31.1.jar` if running GeoServer 2.25.1). This will remove the vulnerable code from GeoServer but may break some GeoServer functionality or prevent GeoServer from deploying if the gt-complex module is needed.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
99.8% (unchanged from 99.8% a week ago; 99.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA KEV
listed 2024-07-15, due 2024-08-05
CISA's assessment (SSVC)
Exploitation: active · Automatable: yes · Technical impact: total, assessed 2024-07-13. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code (Eval Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-36401 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-36401?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-36401?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-36401 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
geoserver:geoserverbefore 2.22.6
geoserver:geoserverfrom 2.23.0 before 2.23.6
geoserver:geoserverfrom 2.24.0 before 2.24.4
geoserver:geoserverfrom 2.25.0 before 2.25.2
geotools:geotoolsbefore 29.6
geotools:geotoolsfrom 30.1 before 30.4
geotools:geotoolsfrom 31.1 before 31.2
geotools:geotools30.0
geotools:geotools30.0:rc
geotools:geotools31.0
geotools:geotools31.0:rc

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver.web:gs-web-app>=2.24.0 <2.24.42.24.4
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wfs>=2.24.0 <2.24.42.24.4
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wms>=2.24.0 <2.24.42.24.4
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver.web:gs-web-app>=2.25.0 <2.25.22.25.2
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wfs>=2.25.0 <2.25.22.25.2
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wms>=2.25.0 <2.25.22.25.2
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver.web:gs-web-app>=2.23.0 <2.23.62.23.6
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wfs>=2.23.0 <2.23.62.23.6
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wms>=2.23.0 <2.23.62.23.6
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver.web:gs-web-app<2.22.62.22.6
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wfs<2.22.62.22.6
GHSA-6jj6-gm7p-fcvvMavenorg.geoserver:gs-wms<2.22.62.22.6

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

1 more

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

  • Nuclei template GeoServer RCE in Evaluating Property Name Expressions
  • Emerging Threats Open ET WEB_SPECIFIC_APPS Geoserver Unsafe jxpath Evaluation RCE Attempt M1 (CVE-2024-36401) sid 2055805
  • Emerging Threats Open ET WEB_SPECIFIC_APPS Geoserver Unsafe jxpath Evaluation RCE Attempt M2 (CVE-2024-36401) sid 2055808
  • Emerging Threats Open ET WEB_SPECIFIC_APPS Geoserver Unsafe jxpath Evaluation RCE Attempt M3 (CVE-2024-36401) sid 2055809
  • Emerging Threats Open ET WEB_SPECIFIC_APPS Geoserver Unsafe jxpath Evaluation RCE Attempt M4 (CVE-2024-36401) sid 2055810
  • Emerging Threats Open ET WEB_SPECIFIC_APPS Geoserver Unsafe jxpath Evaluation RCE Attempt M5 (CVE-2024-36401) sid 2055811

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON