cbcvebase.
CVE-2017-12629
published 2017-10-14

CVE-2017-12629: Remote code execution occurs in Apache Solr before 7.1 with Apache Lucene before 7.1 by exploiting XXE in conjunction with use of a Config API add-listener…

PriorityP183critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
ITWEXPLOIT
Exploited in the wild
EPSS
91.90%
99.8th percentile
Remote code execution occurs in Apache Solr before 7.1 with Apache Lucene before 7.1 by exploiting XXE in conjunction with use of a Config API add-listener command to reach the RunExecutableListener class. Elasticsearch, although it uses Lucene, is NOT vulnerable to this. Note that the XML external entity expansion vulnerability occurs in the XML Query Parser which is available, by default, for any query request with parameters deftype=xmlparser and can be exploited to upload malicious data to the /upload request handler or as Blind XXE using ftp wrapper in order to read arbitrary local files from the Solr server. Note also that the second vulnerability relates to remote code execution using the RunExecutableListener available on all affected versions of Solr.

Affected

10 ranges
VendorProductVersion rangeFixed in
apachesolr5.5.0 – 5.5.4
apachesolr6.0.0 – 6.6.1
apachesolr7.0.0 – 7.0.1
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debiandebian_linux
debianlucene-solr< lucene-solr 3.6.2+dfsg-11 (bookworm)lucene-solr 3.6.2+dfsg-11 (bookworm)
redhatjboss_enterprise_application_platform
redhatjboss_enterprise_application_platform

Detection & IOCsextracted from sources · hover to see the quote

url/solr/gettingstarted/select?q={!xmlparser v='<DOCTYPE a SYSTEM "http://...">'}
url/solr/newcollection/config
url/solr/newcollection/update
url/solr/admin/collections?action=CREATE&name=newcollection&numShards=2
commanddeftype=xmlparser
othersolr.RunExecutableListener
otheradd-listener
snort
alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2017-12629 RCE Exploit Attempt (HTTP GET 1)"; flow:established,to_server; flowbits:isset,ET.CVE-2017-12629; http.method; content:"GET"; http.uri; content:"newcollection/config"; content:"|22|add-listener|22 3a|"; distance:0; content:"|22|event|22 3a 22|postCommit|22|"; distance:0; content:"|22|class|22|"; distance:0; content:"RunExecutableListener|22 2c 22|exe|22|"; distance:0; fast_pattern; content:"|22|dir|22|"; content:"|22|args|22|"; reference:url,www.exploit-db.com/exploits/43009/; classtype:web-application-attack; sid:2024886; rev:4; metadata:affected_product Apache_Solr, attack_target Web_Server, created_at 2017_10_20, cve CVE_2017_12629, deployment Datacenter, confidence Medium, signature_severity Major, updated_at 2024_03_07;)
  • Detect XXE exploitation attempts by monitoring HTTP requests to Solr /select endpoints containing 'deftype=xmlparser' query parameter combined with DOCTYPE or ENTITY declarations in the 'q' parameter.
  • Monitor for chained exploit: XXE request to /select endpoint followed by POST to /config with RunExecutableListener, then POST to /update to trigger postCommit event execution.
  • Alert on Solr requests using the ftp:// wrapper in XXE payloads, which is used for Blind XXE to exfiltrate local files.
  • Monitor for POST requests to /solr/<collection>/update with JSON body after a RunExecutableListener has been registered, as this triggers the postCommit event and executes the configured command.
  • Use the Nuclei template detection logic: probe /solr/admin/cores?wt=json to enumerate collection names, then send XXE payload to /solr/<core>/select with deftype=xmlparser and an out-of-band callback URL.
  • ·Elasticsearch is explicitly NOT vulnerable to this CVE despite using Lucene.
  • ·The RCE vector (RunExecutableListener via Config API) can be blocked by starting Solr with '-Ddisable.configEdit=true', which disallows Config API changes but does not fix the underlying XXE.
  • ·The XML Query Parser (deftype=xmlparser) is available by default on all query requests, meaning no authentication is required to trigger the XXE vector.
  • ·Red Hat JBoss Enterprise Application Platform 7 ships the vulnerable lucene-queryparser jar as a dependency; applications reusing it may be vulnerable to the XXE aspect only (not the RCE via Config API).

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_redhat9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.