Add GeoServer WMS GetMap XXE file read module (CVE-2025-58360) #20767
+244
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Metasploit Team,
Description
This PR adds an auxiliary module for CVE-2025-58360, an XML External Entity (XXE) vulnerability in GeoServer that allows unauthenticated attackers to read arbitrary files from the server's file system via the WMS GetMap operation.
Vulnerability Overview
GeoServer versions <= 2.25.5 and >= 2.26.0, <= 2.26.1 contain an XXE vulnerability in the WMS GetMap operation. The vulnerability occurs when processing Styled Layer Descriptor (SLD) XML data, which allows attackers to inject malicious XML entities that reference local files.
This allows unauthenticated attackers to:
The vulnerability is accessible through the
/geoserver/wmsendpoint by sending a POST request with a malicious SLD containing an XXE entity. The file content is returned in the error message when the layer name contains the XXE entity reference.Module Capabilities
Testing
Successfully tested against GeoServer 2.25.5 using Docker. The module successfully reads files such as
/etc/passwdand other system files.Thanks!