CVE-2019-12401: Solr core Apache Solr Vulnerable To XML Vulnerability

HIGH
Advisory Identifier: GHSA-jq2w-w7v2-69q5
CVSS 7.5
CWE-776
Published
Advisory Summary

CVE-2019-12401 is a HIGH (CVSS 7.5) apache solr vulnerable to xml vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Solr core libraries in the Maven ecosystem. The issue involves apache solr vulnerable to xml bomb. Remediation is available by upgrading affected packages to version 5.0.0.

CVE-2019-12401 at a Glance

CVE Identifier CVE-2019-12401
GHSA Identifier GHSA-jq2w-w7v2-69q5
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Solr core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2019-12401

To remediate this vulnerability, upgrade all affected Solr core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.solr:solr-core fixed: 5.0.0
<dependency>
    <groupId>org.apache.solr</groupId>
    <artifactId>solr-core</artifactId>
    <version>5.0.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.solr

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2019-12401, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.solr

Analyze the terminal output to locate any version of Solr core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.solr command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Solr core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Solr versions prior to 5.0.0 are vulnerable to an XML resource consumption attack (a.k.a. Lol Bomb) via it?s update handler.?By leveraging XML DOCTYPE and ENTITY type elements, the attacker can create a pattern that will expand when the server parses the XML causing OOMs.

CVE-2019-12401 Affected Solr core Versions

1 component(s)
Fixed Versions:
5.0.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.solr:solr-core
Maven
< 5.0.0
5.0.0

References

NVD — CVE-2019-12401 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-12401
Solr core Source Repository REPOSITORY
https://github.com/DrunkenShells/Disclosures/tree/master/CVE-2019-12401-XML%20Bomb-Apache%20Solr
issues.apache.org/jira/browse/solr-13... WEB
https://issues.apache.org/jira/browse/SOLR-13750
lists.apache.org/thread.html/048ae6e... WEB
https://lists.apache.org/thread.html/048ae6e4f84a88e8856f766320b48ad91f9fca2c6f621aa2c40088fe@%3Cdev.lucene.apache.org%3E
lists.apache.org/thread.html/0ec231c... WEB
https://lists.apache.org/thread.html/0ec231c5ed8d242890e21806d25fdd47f80cc47cac278d2fc1c9c579@%3Cdev.lucene.apache.org%3E
lists.apache.org/thread.html/1c92300... WEB
https://lists.apache.org/thread.html/1c92300643f48f13bc59b15e3f886ba62bae1798c7d4c2e5c1ece09b@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/521d10a... WEB
https://lists.apache.org/thread.html/521d10a19bfb590f86dff41820ccfb11e92281f233a12c882650931e@%3Cdev.lucene.apache.org%3E
lists.apache.org/thread.html/60a9246... WEB
https://lists.apache.org/thread.html/60a924662ead9aeea74e8ea128d9ca935f8de925aa71b15ab2787d6a@%3Csolr-user.lucene.apache.org%3E
lists.apache.org/thread.html/7ab5e95... WEB
https://lists.apache.org/thread.html/7ab5e95a1a0b4f35ffe53f1eb0cb74b4348b49d41b72ac155b843fa2@%3Cgeneral.lucene.apache.org%3E
lists.apache.org/thread.html/db8eaca... WEB
https://lists.apache.org/thread.html/db8eaca456d03c00a66cbe37548978318d424b9997e3fd7f5c65dffe@%3Cdev.lucene.apache.org%3E
Solr core Security Information SECURITY
https://security.netapp.com/advisory/ntap-20190926-0002
mail-archives.us.apache.org/mod_mbox/www-announ... WEB
http://mail-archives.us.apache.org/mod_mbox/www-announce/201909.mbox/%3CCAECwjAXU4%3DkAo5DeUJw7Kvk67sgCmajAN7LGZQNjbjZ8gv%3DBdw%40mail.gmail.com%3E
Solr core Security Information SECURITY
http://www.openwall.com/lists/oss-security/2019/09/10/1

Frequently Asked Questions

What is CVE-2019-12401?
CVE-2019-12401 is a security vulnerability in Solr core involving Apache Solr vulnerable to XML Bomb under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Solr core versions are affected?
Affected versions include releases prior to 5.0.0 across affected packages: org.apache.solr:solr-core.
What version fixes CVE-2019-12401?
Upgrading to 5.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is solr-core affected?
Yes, org.apache.solr:solr-core is affected in releases prior to 5.0.0. Upgrade your dependency to 5.0.0 or later.
What is the CVSS score of CVE-2019-12401?
CVE-2019-12401 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2019-12401?
CVE-2019-12401 is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') (The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.).
How can I check Maven dependencies for CVE-2019-12401?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.solr'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jq2w-w7v2-69q5",
  "modified" : "2023-03-06T20:47:32Z",
  "published" : "2022-05-24T22:00:29Z",
  "aliases" : [ "CVE-2019-12401" ],
  "summary" : "Apache Solr  vulnerable to XML Bomb",
  "details" : "Solr versions prior to 5.0.0 are vulnerable to an XML resource consumption attack (a.k.a. Lol Bomb) via it?s update handler.?By leveraging XML DOCTYPE and ENTITY type elements, the attacker can create a pattern that will expand when the server parses the XML causing OOMs.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.solr:solr-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-12401"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DrunkenShells/Disclosures/tree/master/CVE-2019-12401-XML%20Bomb-Apache%20Solr"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/SOLR-13750"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/048ae6e4f84a88e8856f766320b48ad91f9fca2c6f621aa2c40088fe@%3Cdev.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/0ec231c5ed8d242890e21806d25fdd47f80cc47cac278d2fc1c9c579@%3Cdev.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/1c92300643f48f13bc59b15e3f886ba62bae1798c7d4c2e5c1ece09b@%3Cannounce.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/521d10a19bfb590f86dff41820ccfb11e92281f233a12c882650931e@%3Cdev.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/60a924662ead9aeea74e8ea128d9ca935f8de925aa71b15ab2787d6a@%3Csolr-user.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/7ab5e95a1a0b4f35ffe53f1eb0cb74b4348b49d41b72ac155b843fa2@%3Cgeneral.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/db8eaca456d03c00a66cbe37548978318d424b9997e3fd7f5c65dffe@%3Cdev.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20190926-0002"
  }, {
    "type" : "WEB",
    "url" : "http://mail-archives.us.apache.org/mod_mbox/www-announce/201909.mbox/%3CCAECwjAXU4%3DkAo5DeUJw7Kvk67sgCmajAN7LGZQNjbjZ8gv%3DBdw%40mail.gmail.com%3E"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2019/09/10/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-776" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-08T13:23:13Z",
    "nvd_published_at" : "2019-09-10T15:15:00Z"
  }
}