CVE-2021-27905: Apache Solr SSRF Vulnerability

solr Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Critical
Not published

CVE-2021-27905: SSRF vulnerability with the Replication handler. Affects solr versions < 8.8.2. Fixed in 8.8.2. How to fix ↓

Also tracked for

The same CVE-2021-27905 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache Solr is an open-source search platform built on Apache Lucene. It provides full-text search, faceted search, and indexing capabilities. The ReplicationHandler in Apache Solr allows replication of index data from one Solr core to another. The 'masterUrl' parameter is used to designate another ReplicationHandler on a different Solr core for replication. However, prior to version 8.8.2, Solr did not properly validate this parameter, leading to a Server-Side Request Forgery (SSRF) vulnerability.

Vulnerability Detail

The SSRF vulnerability in Apache Solr allows an attacker to make arbitrary HTTP requests from the affected server, potentially accessing internal resources or performing actions on behalf of the server. This can lead to unauthorized data exposure, remote code execution, or other malicious activities. The vulnerability affects all versions of Solr prior to 8.8.2.

How To Fix

Minimum fixed version

8.8.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to manually validate the 'masterUrl' parameter against a similar configuration used for the 'shards' parameter. This can be done by implementing custom validation logic in the application code that handles the ReplicationHandler. Here is an example in Java:

String masterUrl = request.getParameter("masterUrl");
String shards = request.getParameter("shards");

if (masterUrl != null && shards != null && masterUrl.startsWith("http://") && shards.startsWith("http://")) {
    // Proceed with replication
} else {
    // Handle invalid input
}

Conclusion

The SSRF vulnerability in Apache Solr can be mitigated by upgrading to version 8.8.2 or later. In the meantime, a temporary workaround is available by implementing custom validation for the 'masterUrl' parameter. It is important to take immediate action to protect the affected Solr installations from potential exploitation. For further assistance or information, please reach out to DevNack.com.

See every vulnerability recorded for solr →

Share this vulnerability

FAQ

The vulnerability allows an attacker to make arbitrary HTTP requests from the affected server, potentially accessing internal resources or performing actions on behalf of the server. This can lead to unauthorized data exposure, remote code execution, or other malicious activities.

All versions of Apache Solr prior to 8.8.2 are affected by this vulnerability.

Yes, a temporary workaround is to manually validate the 'masterUrl' parameter against a similar configuration used for the 'shards' parameter. Custom validation logic can be implemented in the application code that handles the ReplicationHandler.

To upgrade to the fixed version (8.8.2 or later), refer to the upgrade instructions provided in the Solr documentation.

For further support or to report any additional issues, please contact info@devnack.com.

Related vulnerabilities

Recent vulnerabilities recorded for solr.

How To Fix

Minimum fixed version

8.8.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback