Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 524682 (CVE-2014-6439)

Summary: <app-misc/elasticsearch-{1.3.2-r2,1.4.0}: CSRF via insecure CORS default configuration (CVE-2014-6439)
Product: Gentoo Security Reporter: Agostino Sarubbo <ago>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED FIXED    
Severity: trivial CC: chainsaw, erkiferenc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1149945
See Also: https://bugs.gentoo.org/show_bug.cgi?id=525582
Whiteboard: ~4 [noglsa]
Package list:
Runtime testing required: ---
Attachments:
Description Flags
elasticsearch-1.4.0.ebuild
none
http_cors_disable.patch
none
elasticsearch-1.3.2-r2.ebuild none

Description Agostino Sarubbo gentoo-dev 2014-10-07 09:43:44 UTC
From ${URL} :

It was discovered that the default configuration for cross-origin resource sharing (CORS) exposed a 
cross-site request forgery (CSRF) vulnerability. A remote attacker could use this flaw by providing 
a sepecially crafted url to a user, allowing the attacker to send requests to Elasticsearch 
instances on the users local network leading to data loss or compromise of these instances.

Upstream Fix:

https://github.com/elasticsearch/elasticsearch/commit/bd0eb32d9c3c3f5b6e5f8630c859cd04bdcd4e06


Upstream Issue:

https://github.com/elasticsearch/elasticsearch/issues/7151


@maintainer(s): since the package or the affected version has never been marked as stable, we don't need to stabilize it. After the bump, please remove the affected versions from the tree.
Comment 1 GLSAMaker/CVETool Bot gentoo-dev 2014-10-15 05:32:01 UTC
CVE-2014-6439 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-6439):
  Cross-site scripting (XSS) vulnerability in the CORS functionality in
  Elasticsearch before 1.4.0.Beta1 allows remote attackers to inject arbitrary
  web script or HTML via unspecified vectors.
Comment 2 Ferenc Erki 2014-11-13 00:46:24 UTC
Created attachment 389206 [details]
elasticsearch-1.4.0.ebuild

Proposed ebuild for 1.4.0. It is basically just a rename of the ebuild for 1.3.2-r1, plus avoids installing *.{bat,exe} files from upstream's archive.
Comment 3 Ferenc Erki 2014-11-13 00:47:25 UTC
Created attachment 389208 [details, diff]
http_cors_disable.patch

Proposed patch for 1.3.x ebuilds.
Comment 4 Ferenc Erki 2014-11-13 00:49:11 UTC
Created attachment 389210 [details]
elasticsearch-1.3.2-r2.ebuild

Proposed revbump to 1.3.2-r2, including http_cors_disabled.patch.
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2015-01-05 11:11:39 UTC
+*elasticsearch-1.4.0 (05 Jan 2015)
+*elasticsearch-1.3.2-r2 (05 Jan 2015)
+
+  05 Jan 2015; Tony Vroon <chainsaw@gentoo.org> -elasticsearch-1.3.2.ebuild,
+  -elasticsearch-1.3.2-r1.ebuild, +elasticsearch-1.3.2-r2.ebuild,
+  +elasticsearch-1.4.0.ebuild, +files/1.3.2-http_cors_disable.patch:
+  Version bump by Ferenc Erki closes bug #525582. Mitigation and bump for
+  cross-site scripting vulnerability by Ferenci Erki for security bug 524682.

Vulnerable ebuilds removed as there is no stable.
Comment 6 Ferenc Erki 2015-01-06 03:52:36 UTC
I noticed that the patch has been renamed to have a version prefix, while it needs to be applied to all 1.3.x versions, not just for 1.3.2. I wanted to send a bump to 1.3.7, but now I'm a bit confused about the naming convention I'm expected to follow.
Comment 7 Tony Vroon (RETIRED) gentoo-dev 2015-01-06 08:02:16 UTC
If the patch still applies, it can be used with the 1.3.2 prefix for 1.3.X versions. See the Asterisk ebuilds, among other places in the tree, for example. Don't feel you have to duplicate the patch.
(Also, this is a security bug with a gigantic CC list, could you please file your 1.3.7 bump request separately?)
Comment 8 Sean Amoss (RETIRED) gentoo-dev Security 2015-01-17 21:21:45 UTC
Thanks, everyone. 

Closing noglsa for ~arch only.