CVE-2019-17558 Apache Solr VelocityResponseWriter Plug-In Remote Code Execution

Exploited in the wild High 7.5 Published Updated

Attackers with configuration access can execute arbitrary code via Velocity templates in Apache Solr, requiring specific response writer settings to be enabled.

Exploited in the wild
Since 3 Nov 2021
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-17558?

CVE-2019-17558 is a high-severity code injection vulnerability in Oracle Primavera Unifier, published on 30 Dec 2019. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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

Weakness: CWE-74

Which versions are affected by CVE-2019-17558?

8 open source packages ship an affected version, including org.apache.solr:solr-core. It affects 2 products.

PackageAffectedFixed in
org.apache.solr:solr-core MavenFrom 5.0.08.4.0
org.apache.solr:solr-core MavenFrom 5.0.08.4.0
org.apache.solr:solr-core MavenFrom 6.0.08.4.0
org.apache.solr:solr-core MavenFrom 6.0.08.4.0
org.apache.solr:solr-core MavenFrom 7.0.08.4.0
org.apache.solr:solr-core MavenFrom 7.0.08.4.0
2 more packages
org.apache.solr:solr-core MavenFrom 8.0.08.4.0
org.apache.solr:solr-core MavenFrom 8.0.08.4.0

Products include Apache Solr, Oracle Primavera Unifier.

How do I fix CVE-2019-17558?

Upgrade org.apache.solr:solr-core to 8.4.0 or later. US federal agencies must fix it by 3 May 2022.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2019-17558 being exploited?

Yes. Attackers have exploited CVE-2019-17558 in the wild since at least 3 Nov 2021.

Public exploit code: 1 Metasploit module, 2 Exploit-DB entries, 1 Nuclei template and 6 proofs of concept on GitHub.

All Oracle Primavera Unifier vulnerabilities

Sources

Also known as DEBIAN-CVE-2019-17558, GHSA-ww97-9w65-2crx.

Is CVE-2019-17558 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free