Vulnerabilities > CVE-2005-3336 - Remote vulnerability in Mantis 0.19.2/1.0.0Rc2

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
mantis
nessus

Summary

SQL injection vulnerability in Mantis 1.0.0RC2 and 0.19.2 allows remote attackers to execute arbitrary SQL commands via unknown vectors.

Vulnerable Configurations

Part Description Count
Application
Mantis
2

Nessus

  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-905.NASL
    descriptionSeveral security related problems have been discovered in Mantis, a web-based bug tracking system. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2005-3091 A cross-site scripting vulnerability allows attackers to inject arbitrary web script or HTML. - CVE-2005-3335 A file inclusion vulnerability allows remote attackers to execute arbitrary PHP code and include arbitrary local files. - CVE-2005-3336 A SQL injection vulnerability allows remote attackers to execute arbitrary SQL commands. - CVE-2005-3338 Mantis can be tricked into displaying the otherwise hidden real mail address of its users.
    last seen2020-06-01
    modified2020-06-02
    plugin id22771
    published2006-10-14
    reporterThis script is Copyright (C) 2006-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/22771
    titleDebian DSA-905-1 : mantis - several vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-905. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(22771);
      script_version("1.18");
      script_cvs_date("Date: 2019/08/02 13:32:19");
    
      script_cve_id("CVE-2005-3090", "CVE-2005-3091", "CVE-2005-3335", "CVE-2005-3336", "CVE-2005-3338", "CVE-2005-3339");
      script_xref(name:"DSA", value:"905");
    
      script_name(english:"Debian DSA-905-1 : mantis - several vulnerabilities");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several security related problems have been discovered in Mantis, a
    web-based bug tracking system. The Common Vulnerabilities and
    Exposures project identifies the following problems :
    
      - CVE-2005-3091
        A cross-site scripting vulnerability allows attackers to
        inject arbitrary web script or HTML.
    
      - CVE-2005-3335
        A file inclusion vulnerability allows remote attackers
        to execute arbitrary PHP code and include arbitrary
        local files.
    
      - CVE-2005-3336
        A SQL injection vulnerability allows remote attackers to
        execute arbitrary SQL commands.
    
      - CVE-2005-3338
        Mantis can be tricked into displaying the otherwise
        hidden real mail address of its users."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=330682"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335938"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.debian.org/security/2005/dsa-905"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the mantis package.
    
    The old stable distribution (woody) is not affected by these problems.
    
    For the stable distribution (sarge) these problems have been fixed in
    version 0.19.2-4.1."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:mantis");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:3.1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/11/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2006/10/14");
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/08/22");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2006-2019 Tenable Network Security, Inc.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"3.1", prefix:"mantis", reference:"0.19.2-4.1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200510-24.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200510-24 (Mantis: Multiple vulnerabilities) Mantis contains several vulnerabilities, including: a remote file inclusion vulnerability a SQL injection vulnerability multiple cross site scripting vulnerabilities multiple information disclosure vulnerabilities Impact : An attacker could exploit the remote file inclusion vulnerability to execute arbitrary script code, and the SQL injection vulnerability to access or modify sensitive information from the Mantis database. Furthermore the cross-site scripting issues give an attacker the ability to inject and execute malicious script code or to steal cookie-based authentication credentials, potentially compromising the victim
    last seen2020-06-01
    modified2020-06-02
    plugin id20117
    published2005-11-02
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20117
    titleGLSA-200510-24 : Mantis: Multiple vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200510-24.
    #
    # The advisory text is Copyright (C) 2001-2015 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(20117);
      script_version("1.15");
      script_cvs_date("Date: 2019/08/02 13:32:42");
    
      script_cve_id("CVE-2005-3335", "CVE-2005-3336", "CVE-2005-3337", "CVE-2005-3338", "CVE-2005-3339");
      script_xref(name:"GLSA", value:"200510-24");
    
      script_name(english:"GLSA-200510-24 : Mantis: Multiple vulnerabilities");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200510-24
    (Mantis: Multiple vulnerabilities)
    
        Mantis contains several vulnerabilities, including:
        a remote file inclusion vulnerability
        a SQL injection vulnerability
        multiple cross site scripting vulnerabilities
        multiple information disclosure vulnerabilities
      
    Impact :
    
        An attacker could exploit the remote file inclusion vulnerability to
        execute arbitrary script code, and the SQL injection vulnerability to
        access or modify sensitive information from the Mantis database.
        Furthermore the cross-site scripting issues give an attacker the
        ability to inject and execute malicious script code or to steal
        cookie-based authentication credentials, potentially compromising the
        victim's browser. An attacker could exploit other vulnerabilities to
        disclose information.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      # http://www.mantisbt.org/changelog.php
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.mantisbt.org/bugs/changelog_page.php"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200510-24"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Mantis users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=www-apps/mantisbt-0.19.3'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:mantisbt");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/10/28");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/11/02");
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/08/22");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 Tenable Network Security, Inc.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"www-apps/mantisbt", unaffected:make_list("ge 0.19.3"), vulnerable:make_list("lt 0.19.3"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "Mantis");
    }
    
  • NASL familyCGI abuses
    NASL idMANTIS_FILE_INCL_SQL_INJECT.NASL
    descriptionThe remote version of Mantis suffers from a remote file inclusion vulnerability. Provided PHP
    last seen2020-06-01
    modified2020-06-02
    plugin id20093
    published2005-10-27
    reporterThis script is Copyright (C) 2005-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20093
    titleMantis < 0.19.3 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(20093);
      script_version("1.19");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/12");
    
      script_cve_id("CVE-2005-3091", "CVE-2005-3335", "CVE-2005-3336", "CVE-2005-3337", "CVE-2005-3338", "CVE-2005-3339");
      script_bugtraq_id(15210, 15212, 15227);
    
      script_name(english:"Mantis < 0.19.3 Multiple Vulnerabilities");
      script_summary(english:"Checks for flaws in Mantis < 0.19.3");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote web server contains a PHP application that is affected by
    multiple flaws.");
      script_set_attribute(attribute:"description", value:
    "The remote version of Mantis suffers from a remote file inclusion
    vulnerability.  Provided PHP's 'register_globals' setting is enabled, An
    attacker may be able to leverage this issue to read arbitrary files on
    the local host or to execute arbitrary PHP code, possibly taken from
    third-party hosts. 
    
    In addition, the installed version reportedly may be prone to SQL
    injection, cross-site scripting, and information disclosure attacks.");
      script_set_attribute(attribute:"see_also", value:"http://secunia.com/secunia_research/2005-46/advisory/");
      script_set_attribute(attribute:"solution", value:"Upgrade to Mantis 0.19.3 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      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:"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:"2005/08/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/10/27");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:mantisbt:mantisbt");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2020 Tenable Network Security, Inc.");
      script_family(english:"CGI abuses");
    
      script_dependencie("mantis_detect.nasl");
      script_require_keys("installed_sw/MantisBT");
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("http_func.inc");
    include("http_keepalive.inc");
    include("install_func.inc");
    
    port = get_http_port(default:80, embedded:TRUE);
    if (!get_port_state(port)) audit(AUDIT_PORT_CLOSED, port);
    if (!can_host_php(port:port))
      audit(AUDIT_WRONG_WEB_SERVER, port, "one that supports PHP.");
    
    app_name = "MantisBT";
    
    install = get_single_install(app_name: app_name, port: port);
    install_url = build_url(port:port, qs:install['path']);
    dir = install['path'];
    
    req = http_get (
      item: dir + "/bug_sponsorship_list_view_inc.php?t_core_path=../../../../../../../../../../etc/passwd%00",
      port:port
    );
    res = http_keepalive_send_recv(port:port, data:req, bodyonly:TRUE);
    if(res == NULL) audit(AUDIT_RESP_NOT, port, "a keepalive request");
    
    if (
      egrep(pattern:"root:.*:0:[01]:", string:res) ||
      egrep(pattern:"Warning.+main\(/etc/passwd.+failed to open stream", string:res) ||
      egrep(pattern:"Failed opening .*'/etc/passwd", string:res)
    )
    {
      set_kb_item(name: 'www/'+port+'/XSS', value: TRUE);
      set_kb_item(name: 'www/'+port+'/SQLInjection', value: TRUE);
      security_warning(port);
      exit(0);
    }
    else audit(AUDIT_WEB_APP_NOT_AFFECTED, app_name, install_url);