Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2024-36401-geoserver-rce — Reproducible study of CVE-2024-36401: unauthenticated RCE in GeoServer via JXPath eval injection. Includes technical report, working exploit/verifier, and Docker environment demonstrating the flaw on vulnerable vs. patched instances. | Kitploit
Tools/GitHubGitHub/danielegiovanardi2408/cve-2024-36401-geoserver-rce
Vulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingLearning & Education
GitHubdanielegiovanardi2408/cve-2024-36401-geoserver-rce

cve-2024-36401-geoserver-rce

Reproducible study of CVE-2024-36401: unauthenticated RCE in GeoServer via JXPath eval injection. Includes technical report, working exploit/verifier, and Docker environment demonstrating the flaw on vulnerable vs. patched instances.

View Repository
103 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2024-36401 — Unauthenticated RCE in GeoServer

CVE CVSS CISA KEV Type License

A complete, reproducible study of CVE-2024-36401, an unauthenticated remote code execution flaw in GeoServer — the most widely deployed open-source server for geospatial data. The bug is an eval injection: through the parameters of the OGC standards, GeoServer hands attacker-controlled property names to GeoTools, where Apache Commons JXPath evaluates them as XPath expressions and, by design, can call arbitrary Java methods via reflection. An unauthenticated request such as exec(java.lang.Runtime.getRuntime(),'id') therefore runs commands on the host.

This repo contains the technical report, a working exploit/verifier, and a one-command Docker environment that demonstrates the RCE on a vulnerable instance and shows the same exploit failing on the patched one.

Educational project. Built for a university course (Data Privacy and Security, LUISS DASMA). Everything runs only against local, isolated containers — see .

Responsible use

At a glance

FieldValue
CVE (GeoServer)CVE-2024-36401
Root cause (GeoTools)CVE-2024-36404
TypeUnauthenticated Remote Code Execution
CWECWE-95, Eval Injection
CVSS v3.19.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
AffectedGeoServer < 2.25.2 / GeoTools < 31.2 (and earlier branches)
CISA KEVYes (15 July 2024)
Versions studiedVulnerable 2.25.1, patched 2.25.2

Repository structure

root@kitploit:~
.
├── report/
│   ├── report.pdf            # the full technical report (read this first)
│   ├── report.md             # report source (Pandoc/XeLaTeX)
│   └── images/               # figures and screenshots
├── docker/
│   ├── vulnerable/Dockerfile # GeoServer 2.25.1 (vulnerable)
│   └── patched/Dockerfile    # GeoServer 2.25.2 (fixed)
├── docker-compose.yml        # vuln on :8080, patched on :8081
├── exploit/
│   ├── exploit.py            # exploit + vuln/patched verifier (stdlib only)
│   ├── exploit.sh            # curl-based PoC (GET + POST variants)
│   ├── payloads.md           # payload catalogue per OGC endpoint
│   └── output/               # captured proof logs and transcripts
└── run-reproduction.sh       # one command: build + exploit both + collect proofs

Quick start

Requirements: Docker Desktop running, python3, curl.

root@kitploit:~
# Build both containers, run the exploit against each, and collect the proofs
chmod +x run-reproduction.sh
./run-reproduction.sh

Or step by step:

root@kitploit:~
docker compose up -d --build       # vuln on :8080, patched on :8081

# Vulnerable (expected: VULNERABLE, ~8s delay)
python3 exploit/exploit.py -t http://localhost:8080/geoserver --label vuln -o exploit/output

# Patched (expected: PATCHED, immediate rejection)
python3 exploit/exploit.py -t http://localhost:8081/geoserver --label patched -o exploit/output

docker compose down                # when finished

How the exploit works

Two independent probes make the result unambiguous:

  • Blind (time-based): java.lang.Thread.sleep(8000) blocks the thread evaluating the XPath, so the HTTP response is delayed by ~8 s — measurable from the client, no container access needed. It is the same canary used by the official fix tests.
  • File (command execution): exec(java.lang.Runtime.getRuntime(),'touch /tmp/<marker>') creates a file inside the container, verifiable with docker exec.

On the vulnerable instance, sending the payload by hand returns a ClassCastException on ProcessImpl — the JVM ran Runtime.exec and then failed to use the resulting Process object as an attribute. That exception is the proof of execution:

WFS GetPropertyValue with exec payload returning a ClassCastException on the vulnerable instance

The fix

GeoTools commit e53e5170 (in GeoServer 2.25.2, 2.24.4, 2.23.6, 2.22.6) applies defence in depth on both halves of the bug:

  • Sink: a JXPathUtils.newSafeContext(...) helper installs an empty FunctionLibrary, so JXPath can no longer resolve exec/Thread.sleep as functions — the string stays a plain property name.
  • Scope: FeaturePropertyAccessorFactory now also checks SimpleFeatureType, so simple features no longer reach the vulnerable accessor.

On the patched instance the same payload returns No such attribute: ... and nothing runs.

Full details — affected code with file/line references, exploitation, mitigation diff, and the side-by-side reproduction — are in report/report.pdf.

Responsible use

This CVE is public, has been patched for over 18 months, sits in the CISA Known Exploited Vulnerabilities catalogue, and has public PoCs (Vulhub, Nuclei, Metasploit). The code here targets only localhost and the isolated study containers in this repository. Do not use it against systems you do not own or are not explicitly authorised to test.

License

MIT © 2026 Daniele Giovanardi

Author

Daniele Giovanardi — Data Science and Management (DASMA), LUISS Guido Carli. Coursework for Data Privacy and Security.

Download Tool