MoinMoin < 1.9.6 Multiple Vulnerabilities - Nessus

Medium   Plugin ID: 64930

This page contains detailed information about the MoinMoin < 1.9.6 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 64930
Name: MoinMoin < 1.9.6 Multiple Vulnerabilities
Filename: moinmoin_1_9_6.nasl
Vulnerability Published: 2012-12-29
This Plugin Published: 2013-02-28
Last Modification Time: 2022-04-11
Plugin Version: 1.13
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: moinmoin_detect.nasl
Required KB Items [?]: Settings/ParanoidReport, www/moinmoin
Excluded KB Items: Settings/disable_cgi_scanning

Vulnerability Information


Severity: Medium
Vulnerability Published: 2012-12-29
Patch Published: 2012-12-29
CVE [?]: CVE-2012-6080, CVE-2012-6081, CVE-2012-6082
CPE [?]: cpe:/a:moinmo:moinmoin

Synopsis

A wiki application on the remote web server is affected by multiple vulnerabilities.

Description

According to its version number, the MoinMoin install hosted on the remote web server is affected by multiple vulnerabilities:

- Versions 1.9.3 up to 1.9.5 are affected by a directory traversal vulnerability because the _do_attachment_move action in 'AttachFile.py' does not properly sanitize user-supplied input. This could allow an unauthenticated, remote attacker to upload and overwrite arbitrary files on the remote host. (CVE-2012-6080)

- Versions 1.9.x up to 1.9.5 are affected by a remote code execution vulnerability because the 'twikidraw.py' action fails to properly sanitize user-supplied input. A remote, unauthenticated attacker could utilize a specially crafted request using directory traversal style characters to upload a file containing arbitrary code to the remote host. An attacker could then execute the code with the privileges of the user that runs the MoinMoin process. (CVE-2012-6081)

- Version 1.9.5 is affected by a cross-site scripting (XSS) vulnerability because the application fails to properly sanitize user-supplied input in the 'page_name' parameter when creating an rss link. An attacker could leverage this issue to inject arbitrary HTML and script code into a user's browser to be executed within the security context of the affected site. (CVE-2012-6082)

- Versions < 1.9.x are not maintained by MoinMoin developers and should be considered vulnerable.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade to version 1.9.6 or later.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the MoinMoin < 1.9.6 Multiple Vulnerabilities vulnerability:

  1. Metasploit: exploit/unix/webapp/moinmoin_twikidraw
    [MoinMoin twikidraw Action Traversal File Upload]
  2. Exploit-DB: exploits/linux/remote/26422.rb
    [EDB-26422: MoinMoin - twikidraw Action Traversal Arbitrary File Upload (Metasploit)]
  3. D2 Elliot: moinmoin_1.9.5_rce.html
    [MoinMoin 1.9.5 RCE]

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 Score Source [?]: CVE-2012-6080
CVSS V2 Vector: AV:N/AC:L/Au:N/C:N/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:6.4 (Medium)
Impact Subscore:4.9
Exploitability Subscore:10.0
CVSS Temporal Score:5.3 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.3 (Medium)

Go back to menu.

Plugin Source


This is the moinmoin_1_9_6.nasl nessus plugin source code. This script is Copyright (C) 2013-2022 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(64930);
  script_version("1.13");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2012-6080", "CVE-2012-6081", "CVE-2012-6082");
  script_bugtraq_id(
    57076,
    57082,
    57089,
    57147
  );

  script_name(english:"MoinMoin < 1.9.6 Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"A wiki application on the remote web server is affected by multiple
vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"According to its version number, the MoinMoin install hosted on the
remote web server is affected by multiple vulnerabilities:

  - Versions 1.9.3 up to 1.9.5 are affected by a directory
    traversal vulnerability because the _do_attachment_move
    action in 'AttachFile.py' does not properly sanitize
    user-supplied input.  This could allow an
    unauthenticated, remote attacker to upload and
    overwrite arbitrary files on the remote host.
    (CVE-2012-6080)

  - Versions 1.9.x up to 1.9.5 are affected by a remote
    code execution vulnerability because the 'twikidraw.py'
    action fails to properly sanitize user-supplied input.
    A remote, unauthenticated attacker could utilize a
    specially crafted request using directory traversal
    style characters to upload a file containing arbitrary
    code to the remote host.  An attacker could then execute
    the code with the privileges of the user that runs the
    MoinMoin process.  (CVE-2012-6081)

  - Version 1.9.5 is affected by a cross-site scripting
    (XSS) vulnerability because the application fails to
    properly sanitize user-supplied input in the 'page_name'
    parameter when creating an rss link.  An attacker could
    leverage this issue to inject arbitrary HTML and script
    code into a user's browser to be executed within the
    security context of the affected site.  (CVE-2012-6082)

  - Versions < 1.9.x are not maintained by MoinMoin
    developers and should be considered vulnerable.

Note that Nessus has not tested for these issues but has instead
relied only on the application's self-reported version number.");
  script_set_attribute(attribute:"see_also", value:"http://moinmo.in/SecurityFixes");
  script_set_attribute(attribute:"solution", value:
"Upgrade to version 1.9.6 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2012-6080");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"MoinMoin 1.9.5 RCE");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'MoinMoin twikidraw Action Traversal File Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/12/29");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/12/29");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/02/28");

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

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

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

  script_dependencies("moinmoin_detect.nasl");
  script_require_keys("www/moinmoin", "Settings/ParanoidReport");
  script_exclude_keys("Settings/disable_cgi_scanning");
  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");

port = get_http_port(default:80);

install = get_install_from_kb(
  appname:"moinmoin",
  port:port,
  exit_on_fail:TRUE
);

dir = install["dir"];
version = install["ver"];
install_url = build_url(qs:dir, port:port);

if (version == UNKNOWN_VER) audit(AUDIT_UNKNOWN_WEB_APP_VER, "MoinMoin", install_url);

if (report_paranoia < 2) audit(AUDIT_PARANOID);

ver = split(version, sep:".", keep:FALSE);
for (i=0; i<max_index(ver); i++)
  ver[i] = int(ver[i]);

# Versions less than 1.9.6 are vulnerable
# http://moinmo.in/SecurityFixes notes that versions < 1.9.x are no longer
# maintained and should be considered vulnerable
if (
  ver[0] < 1 ||
  (ver[0] == 1 && ver[1] < 9) ||
  (ver[0] == 1 && ver[1] == 9 && ver[2] < 6)
)
{
  set_kb_item(name:"www/"+port+"/XSS", value:TRUE);

  if (report_verbosity > 0)
  {
    report =
      '\n  URL               : ' +install_url+
      '\n  Installed version : ' +version+
      '\n  Fixed version     : 1.9.6\n';
    security_warning(port:port, extra:report);
  }
  else security_warning(port);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, "MoinMoin", install_url, version);

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

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

Go back to menu.

How to Run


Here is how to run the MoinMoin < 1.9.6 Multiple Vulnerabilities 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 MoinMoin < 1.9.6 Multiple Vulnerabilities plugin ID 64930.
  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 moinmoin_1_9_6.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - moinmoin_1_9_6.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 moinmoin_1_9_6.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CWE | Common Weakness Enumeration:
  • CWE-20 (Weakness) Improper Input Validation
  • CWE-74 (Weakness) Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  • CWE-79 (Weakness) Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-442 (Category) DEPRECATED: Web Problems
  • CWE-629 (View) Weaknesses in OWASP Top Ten (2007)
  • CWE-711 (View) Weaknesses in OWASP Top Ten (2004)
  • CWE-712 (Category) OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)
  • CWE-722 (Category) OWASP Top Ten 2004 Category A1 - Unvalidated Input
  • CWE-725 (Category) OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws
  • CWE-750 (View) Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors
  • CWE-751 (Category) 2009 Top 25 - Insecure Interaction Between Components
  • CWE-800 (View) Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors
  • CWE-801 (Category) 2010 Top 25 - Insecure Interaction Between Components
  • CWE-809 (View) Weaknesses in OWASP Top Ten (2010)
  • CWE-811 (Category) OWASP Top Ten 2010 Category A2 - Cross-Site Scripting (XSS)
  • CWE-864 (Category) 2011 Top 25 - Insecure Interaction Between Components
  • CWE-900 (View) Weaknesses in the 2011 CWE/SANS Top 25 Most Dangerous Software Errors
  • CWE-928 (View) Weaknesses in OWASP Top Ten (2013)
  • CWE-931 (Category) OWASP Top Ten 2013 Category A3 - Cross-Site Scripting (XSS)
  • CWE-990 (Category) SFP Secondary Cluster: Tainted Input to Command
See also: Similar and related Nessus plugins:
  • 63356 - Debian DSA-2593-1 : moin - several vulnerabilities
  • 63636 - Fedora 18 : moin-1.9.6-1.fc18 (2013-0600)
  • 63655 - Fedora 16 : moin-1.9.6-1.fc16 (2013-0640)
  • 63656 - Fedora 17 : moin-1.9.6-1.fc17 (2013-0685)
  • 63397 - FreeBSD : moinmoin -- Multiple vulnerabilities (a264b1b0-5726-11e2-9483-14dae938ec40)
  • 70110 - GLSA-201309-14 : MoinMoin: Multiple vulnerabilities
  • 63638 - MoinMoin twikidraw.py Traversal File Upload Arbitrary File Overwrite
  • 30055 - MoinMoin MOIN_ID Cookie userform Action Traversal Arbitrary File Overwrite
  • 145193 - FreeBSD : moinmoin -- multiple vulnerabilities (abed4ff0-7da1-4236-880d-de33e4895315)
  • 143145 - openSUSE Security Update : moinmoin-wiki (openSUSE-2020-1966)
  • 142736 - Ubuntu 16.04 LTS / 18.04 LTS : MoinMoin vulnerabilities (USN-4629-1)

Version


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

Go back to menu.