Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache solr: CVE-2017-12629 & CVE-2017-3163 #33876

Closed
andir opened this issue Jan 15, 2018 · 14 comments
Closed

apache solr: CVE-2017-12629 & CVE-2017-3163 #33876

andir opened this issue Jan 15, 2018 · 14 comments
Labels
1.severity: security Issues which raise a security issue, or PRs that fix one 9.needs: package (update) This needs a package to be updated

Comments

@andir
Copy link
Member

andir commented Jan 15, 2018

Issue description

There are at least two potential long-term security issues with the solr version in 17.09 (and potentially unstable):

  • CVE-2017-3163:
    When using the Index Replication feature, Apache Solr nodes can pull index files from a master/leader node using an HTTP API which accepts a file name. However, Solr before 5.5.4 and 6.x before 6.4.1 did not validate the file name, hence it was possible to craft a special request involving path traversal, leaving any file readable to the Solr server process exposed. Solr servers protected and restricted by firewall rules and/or authentication would not be at risk since only trusted clients and users would gain direct HTTP access.

  • 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 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.

CC maintainers of solr: @rickynils @domenkozar

From what I can see with a simple search through nixpkgs the following packages are also potentially affected by this (since they ship their own copy of solr):

@andir andir added 1.severity: security Issues which raise a security issue, or PRs that fix one 9.needs: package (update) This needs a package to be updated labels Jan 15, 2018
@andir
Copy link
Member Author

andir commented Jun 1, 2018

another attempt at this.. If no maintainer shows interest in at least upgrading those packages we should remove them.

@cstrahan @mdaiter @rickynils @domenkozar

andir added a commit to andir/nixpkgs that referenced this issue Jun 1, 2018
For details see the issue[0] that had been opened in January.

[0] NixOS#33876
@mdaiter
Copy link
Contributor

mdaiter commented Jun 2, 2018

@andir thanks for pinging. I'll upgrade riak to 2.2.3. Sadly, we've got to ship with our own version: Riak requires a specific basho-linked version of solr.

@mdaiter
Copy link
Contributor

mdaiter commented Jun 2, 2018

@andir sadly, don't have access to a Linux machine atm but here's a preliminary patch: mdaiter@a61893f

@andir
Copy link
Member Author

andir commented Jun 3, 2018

@mdaiter Thank you for working on this!

Do you have references to the release notes of solr/riak in respect to those issues I linked initially?
I fail to make any sense of the changelogs in regards to the mentioned issues. That might just be me being confused by all the riak versions on their website. :/

@mdaiter
Copy link
Contributor

mdaiter commented Jun 9, 2018

@andir , sadly I have none :(

@aanderse
Copy link
Member

@mdaiter @andir If either of you are familiar with solr I would appreciate some feedback and maybe testing regarding PR #49283.

Thanks

@c0bw3b c0bw3b changed the title apacke solr: CVE-2017-12629 & CVE-2017-3163 apache solr: CVE-2017-12629 & CVE-2017-3163 Oct 27, 2018
@andir
Copy link
Member Author

andir commented Oct 27, 2018

@aanderse I am not familiar with the software. I will have a look anyway :)

@andir
Copy link
Member Author

andir commented Nov 4, 2018

Thanks to @aanderse there solr issue is resolved as of now (on master).

So this still leaves the question of riak distributing their own (broken?) copy. Anyone familiar with it?

@c0bw3b
Copy link
Contributor

c0bw3b commented Dec 10, 2018

Im' not familiar with this software but after some research I see that Riak 2.2.0+ search module (named Yokozuna) ships Solr 4.10.4
See:

solrName = "solr-4.10.4-yz-2.tgz";
and https://github.com/basho/yokozuna/blob/develop-2.2/tools/grab-solr.sh#L21



Closing then?

@andir
Copy link
Member Author

andir commented Dec 10, 2018 via email

@c0bw3b
Copy link
Contributor

c0bw3b commented Dec 10, 2018

I don't know if it let Solr API exposed or not though. If Riak search is exposed only to authenticated users on Riak admin backend then the exploit would be possible only for already-privileged users.

@cstrahan @mdaiter any idea here? (as riak maintainers)

@aanderse
Copy link
Member

aanderse commented Feb 9, 2019

@andir no reply so let's mark riak as insecure and close this?

@aanderse
Copy link
Member

Also related... #56294

@mdaiter
Copy link
Contributor

mdaiter commented Mar 31, 2019

@c0bw3b and @aanderse sorry for being a bit AWOL!

I think Riak and Riak-CS have stopped being maintained by Basho (hasn't been a single release since 2017 for riak-core) -- and I'd mark both as insecure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.severity: security Issues which raise a security issue, or PRs that fix one 9.needs: package (update) This needs a package to be updated
Projects
None yet
Development

No branches or pull requests

4 participants