Rapid7 Vulnerability & Exploit Database

Apache Solr Backup/Restore APIs RCE

Back to Search

Apache Solr Backup/Restore APIs RCE



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.


  • l3yx
  • jheysel-r7






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
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

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