CVE-2025-30220

9.9 CRITICAL

📋 TL;DR

This XXE vulnerability in GeoServer's GeoTools Schema class allows attackers to read arbitrary files from the server or perform server-side request forgery when processing malicious XML documents. It affects systems using gt-xsd-core for XML parsing with external schema references, including GeoServer, GeoTools, and GeoNetwork deployments. The vulnerability stems from improper handling of external entity resolution in the Eclipse XSD library.

💻 Affected Systems

Products:
  • GeoServer
  • GeoTools
  • GeoNetwork
Versions: GeoServer <2.27.1, <2.26.3, <2.25.7; GeoTools <33.1, <32.3, <31.7, <28.6.1; GeoNetwork <4.4.8, <4.2.13
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects systems using gt-xsd-core for XML parsing with external schema references, particularly gt-wfs-ng DataStore with misconfigured ENTITY_RESOLVER parameter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise through file disclosure of sensitive data (passwords, keys, configuration files) and potential remote code execution via SSRF attacks.

🟠

Likely Case

Unauthorized file system access leading to data exfiltration of configuration files, credentials, or sensitive geospatial data.

🟢

If Mitigated

Limited impact with proper network segmentation and XML processing hardening, though some information disclosure may still occur.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

XXE vulnerabilities are well-understood attack vectors with readily available exploitation techniques. The specific trigger requires XML documents with external schema references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: GeoServer 2.27.1, 2.26.3, 2.25.7; GeoTools 33.1, 32.3, 31.7, 28.6.1; GeoNetwork 4.4.8, 4.2.13

Vendor Advisory: https://github.com/geonetwork/core-geonetwork/security/advisories/GHSA-2p76-gc46-5fvc

Restart Required: Yes

Instructions:

1. Identify your GeoServer/GeoTools/GeoNetwork version. 2. Upgrade to the patched version for your release line. 3. Restart the service. 4. Verify the fix by checking version and testing XML processing.

🔧 Temporary Workarounds

Disable external entity processing

all

Configure XML parsers to disable external entity resolution

Set system property: -Djavax.xml.accessExternalDTD=all
Configure parser features: FEATURE_SECURE_PROCESSING=true

Network isolation

all

Restrict outbound network access from GeoServer instances

Configure firewall rules to block outbound HTTP/HTTPS from GeoServer
Use network policies to restrict egress traffic

🧯 If You Can't Patch

  • Implement strict input validation and sanitization for all XML inputs
  • Deploy web application firewall with XXE protection rules

🔍 How to Verify

Check if Vulnerable:

Check version numbers against affected ranges and verify if XML processing with external schemas is enabled.

Check Version:

For GeoServer: Check web interface or GEOSERVER_DATA_DIR/version.txt. For GeoTools: Check Maven dependencies or classpath.

Verify Fix Applied:

Confirm version is updated to patched release and test XML processing with external entities disabled.

📡 Detection & Monitoring

Log Indicators:

  • Unusual XML parsing errors
  • Unexpected outbound HTTP requests from GeoServer
  • File access patterns to sensitive system files

Network Indicators:

  • HTTP requests to internal resources from GeoServer
  • Unusual outbound traffic patterns

SIEM Query:

source="geoserver" AND (event_type="xml_parse" OR http_request="*file:*" OR http_request="*http:*")

🔗 References

📤 Share & Export