Lucene search
K

PunBB search.php old_searches Parameter SQL Injection

🗓️ 17 Oct 2005 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 44 Views

The remote web server contains a PHP script that is affected by a SQL injection fla

Related
Refs
Code
ReporterTitlePublishedViews
Family
Tenable Nessus
PunBB < 1.2.9 search.php old_searches Parameter SQL Injection
17 Oct 200500:00
nessus
CVE
CVE-2005-3518
6 Nov 200511:00
cve
Cvelist
CVE-2005-3518
6 Nov 200511:00
cvelist
EUVD
EUVD-2005-3517
7 Oct 202500:30
euvd
NVD
CVE-2005-3518
6 Nov 200511:02
nvd
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(20013);
  script_version("1.18");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2005-3518");
  script_bugtraq_id(15114);

  script_name(english:"PunBB search.php old_searches Parameter SQL Injection");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP script that is affected by a SQL
injection flaw.");
  script_set_attribute(attribute:"description", value:
"The version of PunBB installed on the remote host fails to sanitize
user-supplied input to the 'old_searches' parameter of the
'search.php' script before using it in database queries.  Provided
PHP's 'register_globals' setting is enabled, an attacker may be able
to exploit this issue to delete arbitrary data or launch attacks
against the underlying database.");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/413481");
  script_set_attribute(attribute:"solution", value:
"Upgrade to PunBB 1.2.9 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2005/10/14");
  script_set_attribute(attribute:"plugin_publication_date", value:"2005/10/17");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:punbb:punbb");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2005-2022 Tenable Network Security, Inc.");

  script_dependencies("punBB_detect.nasl");
  script_require_keys("www/punBB");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}

include("global_settings.inc");
include("misc_func.inc");
include("http.inc");


port = get_http_port(default:80);
if (!can_host_php(port:port)) exit(0);


# Test an install.
install = get_kb_item(string("www/", port, "/punBB"));
if (isnull(install)) exit(0);
matches = eregmatch(string:install, pattern:"^(.+) under (/.*)$");
if (!isnull(matches)) {
  dir = matches[2];

  # Try to exploit the flaw.
  #
  # nb: the exploit only works if the search returns results.
  r = http_send_recv3(method:"GET", port: port, 
    item:string(
      dir, "/search.php?",
      "action=search&",
      "keywords=&",
      # nb: ensure we get a result.
      "author=*&",
      "forum=-1&",
      "search_in=all&",
      "sort_by=0&",
      "sort_dir=DESC&",
      "show_as=topics&",
      "search=Submit&",
      # nb: this will just give us a syntax error. 
      "old_searches[]='", SCRIPT_NAME));
  if (isnull(r)) exit(0);
  res = r[2];

  # There's a problem if there's an error claiming punBB can't delete the search results.
  if ("Unable to delete search results" >< res) {
    security_warning(port);
    set_kb_item(name: 'www/'+port+'/SQLInjection', value: TRUE);
    exit(0);
  }
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

11 Apr 2022 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.5
EPSS0.01501
44