CVE-2019-17558 is a remote code execution vulnerability in Apache Solr 5.0.0 to 8.3.1. It abuses the Velocity response writer, the component that renders search results through templates. It was published on December 30, 2019. Velocity is disabled across the entire Opensolr ecosystem.
01 · At a glance
02 · What it is
The Velocity response writer turns a search response into HTML with a Velocity template. A template is code: it can call Java classes. Solr can take the template from the velocity/ folder of a configset or, when params.resource.loader.enabled is true, straight from a request parameter.
Whoever can supply a template, by uploading a configset or by switching that setting on through the Config API and sending the template in the request, can run commands on the Solr server.
03 · Who is affected
- Solr 5.0.0 to 8.3.1 with the Velocity writer available, which was the case in the default example configurations.
- Servers whose Config API or configset upload can be reached by someone you do not fully trust.
- Solr instances reachable from the internet without authentication are the usual target of automated scans for this flaw.
04 · How to fix it
Upgrade to Solr 8.4 or later. Solr 8.4 removed the loading of templates from request parameters and renders configset templates only for trusted configsets. From Solr 9.0 the Velocity writer is no longer part of Solr.
05 · How to mitigate until you can upgrade
- Remove the Velocity response writer from every
solrconfig.xmland remove thevelocity/template folders from your configsets. - Remove the Velocity libraries from the Solr classpath, so the writer cannot be defined again.
- Block the Config API for everyone who does not administer the server, and refuse
wt=velocityandv.templateparameters at the reverse proxy. - Never expose Solr directly to the internet. Put authentication and an allow list in front of it.
<!-- delete this from solrconfig.xml --> <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"> <str name="template.base.dir">${velocity.template.base.dir:}</str> </queryResponseWriter>
# start Solr with configuration editing switched off SOLR_OPTS="$SOLR_OPTS -Ddisable.configEdit=true"
06 · How to check a server
grep -rn 'VelocityResponseWriter' /var/solr/data/*/conf/solrconfig.xml find / -iname '*velocity*.jar' 2>/dev/null curl -s 'http://localhost:8983/solr/YOUR_CORE/select?q=*:*&wt=velocity&v.template=browse' | head -5
A server without the writer answers the last request with an error instead of a rendered page.
07 · Opensolr and this vulnerability
Status on November 20, 2026. The Velocity response writer is disabled across the entire Opensolr ecosystem. No Opensolr Index can render a Velocity template, whatever its Solr version, so CVE-2019-17558 cannot be used against the platform. Nothing is required from you.
- Opensolr watches newly published vulnerabilities for every component of the platform, around the clock.
- Each advisory is assessed against the platform as soon as it is published.
- The fix is applied, or the vulnerable condition is closed, and the result is verified before the case is closed.
More on how Opensolr protects your data: Opensolr Trust Center and all security pages. Questions about a vulnerability that is not listed: contact Opensolr.
Official sources: Apache Solr security page · NVD entry.