Apache Solr Velocity Template Injection RCE (CVE-2026-44825)
by shinthink · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-44825
- Category
- web
- Affected product
- Apache Solr (VelocityResponseWriter / wt=velocity)
- Affected versions
- Solr 9.4.0 – 9.10.1, and 10.0.0 (patched in 9.10.2+ and 10.0.1+)
- Disclosed
- 2026-07-05
- Patch status
- patched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-07 |
| Author / Researcher | shinthink |
| CVE / Advisory | CVE-2026-44825 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (Critical, unauthenticated) / 8.8 (High, authenticated) per source repository |
| Status | PoC |
| Tags | apache-solr, velocity, ssti, template-injection, rce, java, default-credentials |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Apache Solr (VelocityResponseWriter / wt=velocity) |
| Versions Affected | Solr 9.4.0 – 9.10.1, and 10.0.0 (patched in 9.10.2+ and 10.0.1+) |
| Language / Platform | Python 3.8+ (scanner/exploit tool), Java (Apache Solr target) |
| Authentication Required | No (unauthenticated on exposed instances) / Yes (Basic Auth, often default creds, on secured instances) |
| Network Access Required | Yes |
Summary
Apache Solr bundles the Apache Velocity template engine as an optional response writer. Solr’s VelocityResponseWriter renders user-supplied Velocity templates passed via the wt=velocity query parameter without adequately restricting access to Java reflection APIs, allowing an attacker to craft a template that invokes java.lang.Runtime.exec() and executes arbitrary OS commands with the privileges of the Solr Java process. The solrradar tool in this PoC performs reconnaissance (version fingerprinting, auth probing), brute-forces default Solr credentials, and then delivers the Velocity Server-Side Template Injection (SSTI) payload to obtain an interactive command shell.
Vulnerability Details
Root Cause
The VelocityResponseWriter processes the v.template.custom parameter as a live Velocity template without sanitizing calls into Java reflection ($x.class.forName(...)). This allows a crafted template to obtain a reference to java.lang.Runtime, call getRuntime().exec(cmd), and read back the process’s output stream — all from a single HTTP request to the /select endpoint with wt=velocity.
Attack Vector
- Attacker identifies a reachable Solr instance and fingerprints its version via
/admin/info/system(looking forsolr-spec-versionin the 9.4.0–9.10.1 or 10.0.0 range). - Attacker probes
/admin/cores?action=STATUSand/admin/collections?action=LISTto determine whether Basic Auth is required. - If authentication is required, attacker brute-forces a small dictionary of default Solr credentials (e.g.
admin:SolrRocks). - Attacker enumerates available collections/cores.
- Attacker sends a POST/GET to
/{collection}/selectwithwt=velocityand av.template.customparameter containing a Velocity payload that callsRuntime.getRuntime().exec(cmd)and reads back stdout via$out.available()/$out.read(). - The command output is returned in the HTTP response, and the tool can escalate this into an interactive pseudo-shell for post-exploitation.
Impact
Full unauthenticated (or credential-assisted) remote code execution with the privileges of the Solr Java process, potentially leading to complete host compromise, data exfiltration from indexed collections, and lateral movement.
Environment / Lab Setup
Target: Apache Solr 9.4.1 (or any version 9.4.0-9.10.1 / 10.0.0), single-node
or SolrCloud, with VelocityResponseWriter registered in solrconfig.xml.
Attacker tooling: Python 3.8+, `pip install -r requirements.txt` (requests,
urllib3), network access to Solr port (default 8983).
Proof of Concept
PoC Script
See
solr_scanner.pyandrequirements.txtin this folder.
| |
Running the scanner against a vulnerable Solr instance identifies the version and auth posture, optionally brute-forces default credentials, and then delivers the Velocity SSTI payload to /select?wt=velocity, dropping into an interactive shell running as the solr OS user.
Detection & Indicators of Compromise
- HTTP access logs showing requests to */select with wt=velocity and
v.template / v.template.custom parameters containing "Runtime",
"forName", or "exec(" strings (often URL-encoded).
- Unexpected child processes spawned by the Solr Java process (java ->
sh/bash/cmd) shortly after such a request.
- Repeated failed Basic Auth attempts against /admin/cores or
/admin/collections (credential brute-force).
Signs of compromise:
- Solr access logs with
wt=velocityrequests containing reflection/Runtime strings. - Unexplained shell processes as children of the Solr JVM.
- Presence of unfamiliar files or outbound connections originating from the Solr host.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to Solr 9.10.2+ or 10.0.1+, which remove/patch the vulnerable Velocity reflection path. |
| Interim mitigation | Remove/comment out the VelocityResponseWriter registration in solrconfig.xml, enforce strong Basic Auth (no default credentials), and restrict network access to Solr admin/query ports to trusted hosts only. |
References
Notes
Mirrored from https://github.com/shinthink/solrradar on 2026-07-05.
| |