CVE DatabaseCVE-2019-17558
한국어 권고문 →
CVE-2019-175587.5/HIGHCISA KEVCWE-74CWE-74

Apache Solr Velocity Template Injection Remote Code Execution Vulnerability Analysis and Mitigation Guide (CVE-2019-17558)

⚡ Jump to Patch
Affected Vendors
apache
Affected Components
solr
Published Date
2019-12-30
CVSS v3.1
7.5
HIGH
EPSS (30d)
98.6%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Apache Solr versions 5.0.0 through 8.3.1

Impact

Remote attackers can modify Solr configurations via the Config API to enable the Velocity template loader and execute arbitrary system commands on the host

Mitigation

Upgrade to Apache Solr 8.4.0 or later, or disable the 'params.resource.loader.enabled' setting and restrict access to the Config API

Affected Products & Version Scope

Apache Solr versions 5.0.0 to 8.3.1 (Fixed in 8.4.0)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The recommended remediation is to upgrade Apache Solr to version 8.4.0 or later, where the parameter resource loader has been completely removed.

bash
# Example: Upgrading Solr on Debian/Ubuntu systems
export SOLR_VERSION='8.4.0'
wget https://archive.apache.org/dist/lucene/solr/${SOLR_VERSION}/solr-${SOLR_VERSION}.tgz
tar xzf solr-${SOLR_VERSION}.tgz solr-${SOLR_VERSION}/bin/install_solr_service.sh --strip-components=2
sudo ./install_solr_service.sh solr-${SOLR_VERSION}.tgz -i /opt -d /var/solr -u solr -s solr -p 8983

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, disable the parameter resource loader for all active cores via the Config API and restrict network access.

bash
# Disable params.resource.loader.enabled on the target core
curl -X POST -H 'Content-type:application/json' -d '{
  "update-queryresponsewriter": {
    "name": "velocity",
    "class": "solr.VelocityResponseWriter",
    "params.resource.loader.enabled": "false"
  }
}' http://localhost:8983/solr/YOUR_CORE_NAME/config

3. Log Audit & IoC Verification Commands

Scan Solr request logs for indicators of compromise, specifically looking for requests containing wt=velocity or modifications to the config endpoint.

bash
# Search for Velocity template injection attempts in Solr logs
grep -Ei 'wt=velocity' /var/solr/logs/solr.log
grep -Ei 'params.resource.loader.enabled' /var/solr/logs/solr.log
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Immediately upgrade Apache Solr to version 8.4.0 or higher, and restrict external access to the Solr administration port (default 8983) using firewalls or security groups.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2019-17558) is a Remote Code Execution (RCE) flaw in Apache Solr's VelocityResponseWriter. Solr allows using the Velocity template engine to customize search response rendering. By default, the parameter-provided template loader (params.resource.loader.enabled) is disabled. However, a design flaw allows users with access to the Solr Config API to dynamically modify this configuration to true. If the Config API is exposed without proper authentication, an attacker can enable this feature and inject malicious templates.

2. Exploitation Mechanics & Attack Scenario

The attack is executed in two distinct phases: 1) Configuration Modification: The attacker sends an HTTP POST request to the /config endpoint of a Solr core to define or update a VelocityResponseWriter with params.resource.loader.enabled set to true. 2) Code Execution: Once enabled, the attacker sends a /select query request with wt=velocity and injects malicious Velocity Template Language (VTL) code via the v.template parameter. The Velocity engine processes this input, allowing the attacker to instantiate Java classes (e.g., java.lang.Runtime) and execute arbitrary OS commands.

3. Infrastructure & Business Impact

This vulnerability is actively exploited in the wild and is listed in the CISA KEV catalog with an extremely high EPSS score. Successful exploitation grants the attacker shell access with the privileges of the Solr process. This can lead to full system compromise, lateral movement within the internal network, data exfiltration, and deployment of ransomware or cryptominers.

Official Vendor Advisories & References

NVD Original English 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).

Frequently Asked SecOps Questions (CVE-2019-17558)

FAQ

Q1. How critical is CVE-2019-17558 and is it actively exploited in the wild?

CVE-2019-17558 is rated CVSS 7.5 (HIGH) with a 30-day EPSS exploitation probability of 98.6%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2019-17558?

Primary impacted vendors include apache across solr. Scope summary: Apache Solr versions 5.0.0 to 8.3.1 (Fixed in 8.4.0)

Q3. What temporary mitigations or workarounds exist for CVE-2019-17558 before patching?

[Mitigation] Upgrade to Apache Solr 8.4.0 or later, or disable the 'params.resource.loader.enabled' setting and restrict access to the Config API Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2019-17558

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (apache)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2019-17558 Apache Solr Velocity Template Injection Remote Code Execution Vulnerability Analysis and Mitigation Guide (CVE-2019-17558) (CVSS 7.5) - Patch & Workaround | CVE Pulse