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

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

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 3 Nov 2021 (CISA KEV)
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Dec 2019
- **Updated:** 21 Oct 2025
- **Also known as:** DEBIAN-CVE-2019-17558, GHSA-ww97-9w65-2crx

## 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 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.solr:solr-core` | Maven | From 5.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 5.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 6.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 6.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 7.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 7.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 8.0.0 | 8.4.0 |
| `org.apache.solr:solr-core` | Maven | From 8.0.0 | 8.4.0 |

Products: 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.

## 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:

- Exphub[漏洞利用脚本库] 包括Webloigc、Struts2、Tomcat、Nexus、Solr、Jboss、Drupal的漏洞利用脚本，最新添加CVE-2020-14882、CVE-2020-11444、CVE-2020-10204、CVE-2020-10199、CVE-2020-1938、CVE-2020-2551、CVE-2020-2555、CVE-2020-2883、CVE-2019-17558、CVE-2019-6340 (github_poc): https://github.com/zhzyker/exphub
- Solr_CVE-2019-17558 (github_poc): https://github.com/Ma1Dong/Solr_CVE-2019-17558
- CVE-2019-17558 Solr模板注入漏洞图形化一键检测工具。CVE-2019-17558 Solr Velocity Template Vul POC Tool. (github_poc): https://github.com/thelostworldFree/CVE-2019-17558_Solr_Vul_Tool
- https://github.com/rogerzeferino/cve-2019-17558-apache-solr-rce (github_poc): https://github.com/rogerzeferino/cve-2019-17558-apache-solr-rce
- Apache Solr Remote Code Execution via Velocity Template (metasploit)
- Apache Solr 8.2.0 - Remote Code Execution (exploitdb)

## Other vulnerabilities in Oracle Primavera Unifier

- [CVE-2019-0193](https://insights.sbomify.com/CVE-2019-0193/): Apache Solr DataImportHandler Code Injection (high 7.2, exploited in the wild)
- [CVE-2024-45216](https://insights.sbomify.com/CVE-2024-45216/): Apache Solr: Authentication bypass possible using a fake URL Path ending (critical 9.8)
- [CVE-2021-44548](https://insights.sbomify.com/CVE-2021-44548/): Apache Solr information disclosure vulnerability through DataImportHandler (critical 9.8)
- [CVE-2021-27905](https://insights.sbomify.com/CVE-2021-27905/): SSRF vulnerability with the Replication handler (critical 9.8)
- [CVE-2020-13957](https://insights.sbomify.com/CVE-2020-13957/): Incorrect Authorization in Apache Solr (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-17558 and fix it if it is affected.

What it is: 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.
Exploitation: Yes. Attackers have exploited CVE-2019-17558 in the wild since at least 3 Nov 2021.

Affected packages and fixed versions:
- org.apache.solr:solr-core (Maven): affected from 5.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 5.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 6.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 6.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 7.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 7.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 8.0.0; fixed in 8.4.0
- org.apache.solr:solr-core (Maven): affected from 8.0.0; fixed in 8.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-17558/ (Markdown: https://insights.sbomify.com/CVE-2019-17558/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-17558
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-17558
- OSV: https://osv.dev/vulnerability/CVE-2019-17558

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-17558/
Summaries are generated and may contain mistakes; the official description above is the record.
