Apache Solr DataImportHandler Code Injection
CVE-2019-0193 is a high-severity improper control of generation of code vulnerability in Apache Solr from Apache, with a CVSS 3.1 base score of 7.2 out of 10. It can be exploited remotely over the network by an attacker with administrator privileges, without any action from a user. Affected Apache Solr versions: Apache Solr all prior to 8.2.0. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on December 10, 2021, which means attacks have been observed in the wild.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Solr to 7.7.3 or 8.1.2, whichever matches your release line, or a later version.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on issues.apache.org for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Apache | Apache Solr | Apache Solr all prior to 8.2.0 | Not stated |
| Apache | Solr | before 7.7.3; 8.1.0 up to, but not including, 8.1.2 | 7.7.3, 8.1.2 |
| Debian | Debian Linux | 8.0; 9.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- HighAdministrator-level access is required first.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.2 | High | NVD |
| CVSS 3.1 | 7.2 | High | CISA (ADP) |
| CVSS 2.0 | 9.0 | High | NVD |
Official description
In Apache Solr, the DataImportHandler, an optional but popular module to pull in data from databases and other sources, has a feature in which the whole DIH configuration can come from a request's "dataConfig" parameter. The debug mode of the DIH admin screen uses this to allow convenient debugging / development of a DIH config. Since a DIH config can contain scripts, this parameter is a security risk. Starting with version 8.2.0 of Solr, use of this parameter requires setting the Java System property "enable.dih.dataConfigParam" to true.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Control of Generation of Code
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
How developers prevent this class of flaw
- Refactor your program so that you do not have to dynamically generate code.
- Run your code in a jail or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
- Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
More Improper Control of Generation of Code vulnerabilities (CWE-94)
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- issues.apache.org/jira/browse/SOLR-13669Mitigation
Patches and release notes
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2019/10/msg00013.htmlMailing List, Third Party Advisory
- lists.debian.org/debian-lts-announce/2020/08/msg00025.htmlMailing List, Third Party Advisory
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-0193US Government Resource
Other references
- lists.apache.org/thread.html/1addbb49a1fc0947fb32ca663d76d93cfaade35a4848a76d4b4ded9c%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/42cc4d334ba33905b872a0aa00d6a481391951c8b1450f01b077ce74%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/55880d48e38ba9e8c41a3b9e41051dbfdef63b86b0cfeb32967edf03%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/6f2d61bd8732224c5fd3bdd84798f8e01e4542d3ee2f527a52a81b83%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/7143983363f0ba463475be4a8b775077070a08dbf075449b7beb51ee%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/9b0e7a7e3e18d0724f511403b364fc082ff56e3134d84cfece1c82fc%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/a6e3c09dba52b86d3a1273f82425973e1b0623c415d0e4f121d89eab%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/e85f735fad06a0fb46e74b7e6e9ce7ded20b59637cd9f993310f814d%40%3Cissues.lucene.apac…Mailing List
- lists.apache.org/thread.html/r140128dc6bb4f4e0b6a39e962c7ca25a8cbc8e48ed766176c931fccc%40%3Cusers.solr.apache…Mailing List
- lists.apache.org/thread.html/r19d23e8640236a3058b4d6c23e5cd663fde182255f5a9d63e0606a66%40%3Cdev.lucene.apache…Issue Tracking, Mailing List
- lists.apache.org/thread.html/r1d4a247329a8478073163567bbc8c8cb6b49c6bfc2bf58153a857af1%40%3Ccommits.druid.apa…Mailing List
- lists.apache.org/thread.html/r339865b276614661770c909be1dd7e862232e3ef0af98bfd85686b51%40%3Cdev.lucene.apache…Issue Tracking, Mailing List
- lists.apache.org/thread.html/r33aed7ad4ee9833c4190a44e2b106efd2deb19504b85e012175540f6%40%3Cissues.lucene.apa…Mailing List
- lists.apache.org/thread.html/r3da74965aba2b5f5744b7289ad447306eeb2940c872801819faa9314%40%3Cusers.solr.apache…Mailing List
- lists.apache.org/thread.html/r95df34bb158375948da82b4dfe9a1b5d528572d586584162f8f5aeef%40%3Cusers.solr.apache…Issue Tracking, Mailing List
Other vulnerabilities in Apache Solr
- 9.8 Critical severity
- 7.1 High severity
- 8.2 High severity
- 8.1 High severity
- 9.8 Critical severity
- 8.8 High severity
Recent Improper Control of Generation of Code vulnerabilities
- 10.0 Critical severity
Kibana Arbitrary Code Execution Exploited
- 8.8 High severity
ThinkPHP Remote Code Execution Exploited
- 9.8 Critical severity
- 9.8 Critical severity
Drupal Core Remote Code Execution Exploited
- 9.8 Critical severity
- 7.8 High severity
Spotted an error? Tell us.