Rapid7 Vulnerability & Exploit Database

Geoserver unauthenticated Remote Code Execution

Back to Search

Geoserver unauthenticated Remote Code Execution

Disclosed
07/01/2024
Created
07/12/2024

Description

GeoServer is an open-source software server written in Java that provides the ability to view, edit, and share geospatial data. It is designed to be a flexible, efficient solution for distributing geospatial data from a variety of sources such as Geographic Information System (GIS) databases, web-based data, and personal datasets. In the GeoServer versions < 2.23.6, >= 2.24.0, < 2.24.4 and >= 2.25.0, < 2.25.1, multiple OGC request parameters allow Remote Code Execution (RCE) by unauthenticated users through specially crafted input against a default GeoServer installation due to unsafely evaluating property names as XPath expressions. An attacker can abuse this by sending a POST request with a malicious xpath expression to execute arbitrary commands as root on the system.

Author(s)

  • h00die-gr3y <h00die.gr3y@gmail.com>
  • jheysel-r7
  • Steve Ikeoka
  • Valentin Lobstein a.k.a chocapikk

Platform

Linux,Unix,Windows

Architectures

cmd

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/geoserver_unauth_rce_cve_2024_36401
msf exploit(geoserver_unauth_rce_cve_2024_36401) > show targets
    ...targets...
msf exploit(geoserver_unauth_rce_cve_2024_36401) > set TARGET < target-id >
msf exploit(geoserver_unauth_rce_cve_2024_36401) > show options
    ...show and set options...
msf exploit(geoserver_unauth_rce_cve_2024_36401) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;