CVE-2019-17558: Apache Solr VelocityResponseWriter Plug-In Remote Code Execution Vulnerability
Apache Solr 5.0.0 to Apache Solr 8.3.1 are vulnerable to a Remote Code Execution through the VelocityResponseWriter. A Velocity template can be provided through Velocity templates in a configset velocity/ directory or as a parameter. A user defined configset could contain renderable, potentially malicious, templates. Parameter provided templates are disabled by default, but can be enabled by setting params.resource.loader.enabled by defining a response writer with that setting set to true. Defining a response writer requires configuration API access. Solr 8.4 removed the params resource loader entirely, and only enables the configset-provided template rendering when the configset is trusted (has been uploaded by an authenticated user).
Other sources
The Apache Solr VelocityResponseWriter plug-in contains an unspecified vulnerability which can allow for remote code execution.
— CISA
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.apache.solr:solr-coreto a version that resolves this vulnerability.Fixed in 8.4.0 - Upgrade
Upgrade
Apache Solrto a version that resolves this vulnerability.Fixed in 8.4 - Configuration
Ensure any Velocity template rendering via the parameter-based resource loader is disabled by keeping params.resource.loader.enabled set to false (it is enabled by setting this value to true when defining a response writer).
Apache Solr (VelocityResponseWriter / resource loader) params.resource.loader.enabled = false - Configuration
On Solr 8.4, only allow configset-provided Velocity template rendering for configsets that are marked trusted (uploaded by an authenticated user); do not render templates from untrusted user defined configsets.
Apache Solr (configset template rendering trust check) configset trusted status = trusted-required - Compensating control
Restrict who can define or upload configsets (since configset-provided Velocity templates can be renderable and potentially malicious, and trust on Solr 8.4 depends on upload by an authenticated user).
- Compensating control
Restrict configuration API access because defining a response writer requires configuration API access.
Event History
Frequently Asked Questions
What is CVE-2019-17558?
CVE-2019-17558 is a vulnerability in Apache Solr that allows remote code execution through the VelocityResponseWriter.
Who is affected by CVE-2019-17558?
Apache Solr versions 5.0.0 to 8.3.1 are affected by CVE-2019-17558.
What is the severity of CVE-2019-17558?
CVE-2019-17558 has a severity rating of 7.5 (high).
How can CVE-2019-17558 be exploited?
CVE-2019-17558 can be exploited by providing a Velocity template through a configset or as a parameter in Apache Solr.
Are there any references for CVE-2019-17558?
Yes, you can find more information about CVE-2019-17558 at the following references: [Link 1](http://packetstormsecurity.com/files/157078/Apache-Solr-8.3.0-Velocity-Template-Remote-Code-Execution.html), [Link 2](https://issues.apache.org/jira/browse/SOLR-13971), and [Link 3](https://lists.apache.org/thread.html/r0b7b9d4113e6ec1ae1d3d0898c645f758511107ea44f0f3a1210c5d5@%3Cissues.lucene.apache.org%3E).