Bug 1647344 (CVE-2018-17246) - CVE-2018-17246 kibana: Arbitrary file inclusion vulnerability in the Console plugin
Summary: CVE-2018-17246 kibana: Arbitrary file inclusion vulnerability in the Console ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-17246
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1648158
Blocks: 1647349
TreeView+ depends on / blocked
 
Reported: 2018-11-07 09:13 UTC by Andrej Nemec
Modified: 2021-10-25 22:21 UTC (History)
27 users (show)

Fixed In Version: kibana 6.4.3, kibana 5.6.13
Doc Type: If docs needed, set a value
Doc Text:
Kibana, before 6.4.3 and 5.6.13, contain an arbitrary file inclusion flaw in the Console plugin. An attacker with access to the Kibana Console API could send a request that will attempt to execute JavaScript code. This could possibly lead to an attacker executing arbitrary commands with permissions of the Kibana process on the host system.
Clone Of:
Environment:
Last Closed: 2021-10-25 22:21:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrej Nemec 2018-11-07 09:13:16 UTC
Kibana versions before 6.4.3 and 5.6.13 contain an arbitrary file inclusion flaw in the Console plugin. An attacker with access to the Kibana Console API could send a request that will attempt to execute javascript code. This could possibly lead to an attacker executing arbitrary commands with permissions of the Kibana process on the host system.

References:

https://www.elastic.co/community/security

Introduced in commit:

https://github.com/elastic/kibana/commit/0d3461c2c995e7ce5bb3e04ba5cecbc05a5386ab#diff-263cb6070b4e54ae3b4c343d14d0813bR25

Upstream issue:

https://github.com/elastic/kibana/pull/24399

Upstream patch:

https://github.com/elastic/kibana/commit/51aff7d3c49724fcbaba4353dff0cd7c3be799b0

Comment 1 Joshua Padman 2018-11-08 03:45:24 UTC
The console api_server was not introduced until version 5, prior versions do not contain the vulnerable functionality.

Diff from 5.6.12 -> 5.6.13
---------------------------
--- a/src/core_plugins/console/api_server/server.js
+++ b/src/core_plugins/console/api_server/server.js
@@ -1,12 +1,14 @@
 let _ = require("lodash");
-
+const KNOWN_APIS = ['es_5_0'];
 module.exports.resolveApi = function (sense_version, apis, reply) {
   let result = {};
   _.each(apis, function (name) {
     {
-      // for now we ignore sense_version. might add it in the api name later
-      let api = require('./' + name);
-      result[name] = api.asJson();
+      if (KNOWN_APIS.includes(name)) {
+        // for now we ignore sense_version. might add it in the api name later
+        let api = require('./' + name);
+        result[name] = api.asJson();
+      }
     }
   });

Comment 2 Paul Harvey 2018-11-08 23:16:09 UTC
openshift-enterprise-3.11: ships kibana-5.6.10, which is affected

Comment 4 Paul Harvey 2018-11-09 00:05:31 UTC
openshift-enterprise-3.x prior to 3.11: the versions of kibana shipped in these prior releases of OCP do not contain the console plugin or the commit [1] which introduced the vulnerable code

[1] https://github.com/elastic/kibana/commit/0d3461c2c995e7ce5bb3e04ba5cecbc05a5386ab#diff-263cb6070b4e54ae3b4c343d14d0813bR25

Comment 5 Paul Harvey 2018-11-09 03:05:32 UTC
External References:

https://www.elastic.co/community/security


Note You need to log in before you can comment on or make changes to this bug.