Rapid7

module

Apache Solr Backup/Restore APIs RCE

Disclosed
Feb 24, 2024
Created
Apr 23, 2024

Description

Apache Solr from 6.0.0 through 8.11.2, from 9.0.0 before 9.4.1 is affected by an Unrestricted Upload of File
with Dangerous Type vulnerability which can result in remote code execution in the context of the user running
Apache Solr. When Apache Solr creates a Collection, it will use a specific directory as the classpath and load
some classes from it. The backup function of the Collection can export malicious class files uploaded by
attackers to the directory, allowing Solr to load custom classes and create arbitrary Java code. Execution
can further bypass the Java sandbox configured by Solr, ultimately causing arbitrary command execution.

Authors

l3yx
jheysel-r7

Platform

Linux,Unix

Architectures

cmd

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/linux/http/apache_solr_backup_restore
msf exploit(apache_solr_backup_restore) > show targets
...targets...
msf exploit(apache_solr_backup_restore) > set TARGET < target-id >
msf exploit(apache_solr_backup_restore) > show options
...show and set options...
msf exploit(apache_solr_backup_restore) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.