Skip to content
RCE Write-up Advanced

Apache Solr 8.3.1 RCE from exposed administration interface

An exposed Apache Solr 8.3.1 administration interface on Windows allowed unauthenticated users to create a core in the temporary directory and upload an XSLT file that was then executed, leading to remote code execution. The attacker could run arbitrary commands on the server.

Nicolas Brunner Follow

Published on blog.scrt.ch

Back in 2020, during an external pentest, I stumbled upon a visible Solr administration panel. With nothing else of interest, I focused on this specific application to test what was hidden underneath.

Nicolas Brunner, on blog.scrt.ch

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the admin interface lacked authentication and allowed core creation with arbitrary paths plus file uploads to a predictable temporary location, so an uploaded XSLT file could be executed as part of a query.

What the attacker needed

Exposed Solr admin interface; No authentication on the interface; Windows server; Solr version 8.3.1 or earlier

The fix

The issue was fixed in later versions by not storing .tmp files as plain files, preventing core creation in /tmp, and blocking or whitelisting path traversals.

How it was found

  1. Access the exposed Solr admin interface and note the version and paths.
  2. Create a new core using the default configsets directory as the instanceDir.
  3. Upload a file larger than 20 KB to the core so it is saved as a .tmp file in the server tmp directory.
  4. Upload minimal solrconfig.xml and schema.xml files to the tmp directory.
  5. Create a new core in the tmp directory using those uploaded config files.
  6. Upload an XSLT file and trigger it via a query with wt=xslt and tr pointing to the short filename.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Apache Solr is a search server with a web admin page. If that page is reachable without a password, an attacker can use its features to upload files and make the server run them, which lets them run their own commands on the machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Nicolas Brunner

View all

1 more disclosed report, best first.

More from Apache Solr

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.