Vulnerabilities > CVE-2008-5432 - Cross-Site Scripting vulnerability in Moodle

047910
CVSS 4.3 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
moodle
CWE-79
nessus

Summary

Cross-site scripting (XSS) vulnerability in Moodle before 1.6.8, 1.7 before 1.7.6, 1.8 before 1.8.7, and 1.9 before 1.9.3 allows remote attackers to inject arbitrary web script or HTML via a Wiki page name (aka page title).

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Embedding Scripts in Non-Script Elements
    This attack is a form of Cross-Site Scripting (XSS) where malicious scripts are embedded in elements that are not expected to host scripts such as image tags (<img>), comments in XML documents (< !-CDATA->), etc. These tags may not be subject to the same input validation, output validation, and other content filtering and checking routines, so this can create an opportunity for an attacker to tunnel through the application's elements and launch a XSS attack through other elements. As with all remote attacks, it is important to differentiate the ability to launch an attack (such as probing an internal network for unpatched servers) and the ability of the remote attacker to collect and interpret the output of said attack.
  • Embedding Scripts within Scripts
    An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute scripts. The attacker leverages this capability to execute scripts to execute his/her own script by embedding it within other scripts that the target software is likely to execute. The attacker must have the ability to inject script into script that is likely to be executed. If this is done, then the attacker can potentially launch a variety of probes and attacks against the web server's local environment, in many cases the so-called DMZ, back end resources the web server can communicate with, and other hosts. With the proliferation of intermediaries, such as Web App Firewalls, network devices, and even printers having JVMs and Web servers, there are many locales where an attacker can inject malicious scripts. Since this attack pattern defines scripts within scripts, there are likely privileges to execute said attack on the host. Of course, these attacks are not solely limited to the server side, client side scripts like Ajax and client side JavaScript can contain malicious scripts as well. In general all that is required is for there to be sufficient privileges to execute a script, but not protected against writing.
  • Cross-Site Scripting in Error Pages
    An attacker distributes a link (or possibly some other query structure) with a request to a third party web server that is malformed and also contains a block of exploit code in order to have the exploit become live code in the resulting error page. When the third party web server receives the crafted request and notes the error it then creates an error message that echoes the malformed message, including the exploit. Doing this converts the exploit portion of the message into to valid language elements that are executed by the viewing browser. When a victim executes the query provided by the attacker the infected error message error message is returned including the exploit code which then runs in the victim's browser. XSS can result in execution of code as well as data leakage (e.g. session cookies can be sent to the attacker). This type of attack is especially dangerous since the exploit appears to come from the third party web server, who the victim may trust and hence be more vulnerable to deception.
  • Cross-Site Scripting Using Alternate Syntax
    The attacker uses alternate forms of keywords or commands that result in the same action as the primary form but which may not be caught by filters. For example, many keywords are processed in a case insensitive manner. If the site's web filtering algorithm does not convert all tags into a consistent case before the comparison with forbidden keywords it is possible to bypass filters (e.g., incomplete black lists) by using an alternate case structure. For example, the "script" tag using the alternate forms of "Script" or "ScRiPt" may bypass filters where "script" is the only form tested. Other variants using different syntax representations are also possible as well as using pollution meta-characters or entities that are eventually ignored by the rendering engine. The attack can result in the execution of otherwise prohibited functionality.

Nessus

  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-791-1.NASL
    descriptionThor Larholm discovered that PHPMailer, as used by Moodle, did not correctly escape email addresses. A local attacker with direct access to the Moodle database could exploit this to execute arbitrary commands as the web server user. (CVE-2007-3215) Nigel McNie discovered that fetching https URLs did not correctly escape shell meta-characters. An authenticated remote attacker could execute arbitrary commands as the web server user, if curl was installed and configured. (CVE-2008-4796, MSA-09-0003) It was discovered that Smarty (also included in Moodle), did not correctly filter certain inputs. An authenticated remote attacker could exploit this to execute arbitrary PHP commands as the web server user. (CVE-2008-4810, CVE-2008-4811, CVE-2009-1669) It was discovered that the unused SpellChecker extension in Moodle did not correctly handle temporary files. If the tool had been locally modified, it could be made to overwrite arbitrary local files via symlinks. (CVE-2008-5153) Mike Churchward discovered that Moodle did not correctly filter Wiki page titles in certain areas. An authenticated remote attacker could exploit this to cause cross-site scripting (XSS), which could be used to modify or steal confidential data of other users within the same web domain. (CVE-2008-5432, MSA-08-0022) It was discovered that the HTML sanitizer,
    last seen2020-06-01
    modified2020-06-02
    plugin id39516
    published2009-06-25
    reporterUbuntu Security Notice (C) 2009-2019 Canonical, Inc. / NASL script (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/39516
    titleUbuntu 8.04 LTS / 8.10 : moodle vulnerabilities (USN-791-1)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-791-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(39516);
      script_version("1.23");
      script_cvs_date("Date: 2019/08/02 13:33:02");
    
      script_cve_id("CVE-2007-3215", "CVE-2008-4796", "CVE-2008-4810", "CVE-2008-4811", "CVE-2008-5153", "CVE-2008-5432", "CVE-2008-5619", "CVE-2008-6124", "CVE-2009-0499", "CVE-2009-0500", "CVE-2009-0501", "CVE-2009-0502", "CVE-2009-1171", "CVE-2009-1669");
      script_bugtraq_id(31862, 31887, 32402, 32799, 33610, 33612, 34278, 34918);
      script_xref(name:"USN", value:"791-1");
    
      script_name(english:"Ubuntu 8.04 LTS / 8.10 : moodle vulnerabilities (USN-791-1)");
      script_summary(english:"Checks dpkg output for updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Ubuntu host is missing a security-related patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Thor Larholm discovered that PHPMailer, as used by Moodle, did not
    correctly escape email addresses. A local attacker with direct access
    to the Moodle database could exploit this to execute arbitrary
    commands as the web server user. (CVE-2007-3215)
    
    Nigel McNie discovered that fetching https URLs did not correctly
    escape shell meta-characters. An authenticated remote attacker could
    execute arbitrary commands as the web server user, if curl was
    installed and configured. (CVE-2008-4796, MSA-09-0003)
    
    It was discovered that Smarty (also included in Moodle), did not
    correctly filter certain inputs. An authenticated remote attacker
    could exploit this to execute arbitrary PHP commands as the web server
    user. (CVE-2008-4810, CVE-2008-4811, CVE-2009-1669)
    
    It was discovered that the unused SpellChecker extension in Moodle did
    not correctly handle temporary files. If the tool had been locally
    modified, it could be made to overwrite arbitrary local files via
    symlinks. (CVE-2008-5153)
    
    Mike Churchward discovered that Moodle did not correctly filter Wiki
    page titles in certain areas. An authenticated remote attacker could
    exploit this to cause cross-site scripting (XSS), which could be used
    to modify or steal confidential data of other users within the same
    web domain. (CVE-2008-5432, MSA-08-0022)
    
    It was discovered that the HTML sanitizer, 'Login as' feature, and
    logging in Moodle did not correctly handle certain inputs. An
    authenticated remote attacker could exploit this to generate XSS,
    which could be used to modify or steal confidential data of other
    users within the same web domain. (CVE-2008-5619, CVE-2009-0500,
    CVE-2009-0502, MSA-08-0026, MSA-09-0004, MSA-09-0007)
    
    It was discovered that the HotPot module in Moodle did not correctly
    filter SQL inputs. An authenticated remote attacker could execute
    arbitrary SQL commands as the moodle database user, leading to a loss
    of privacy or denial of service. (CVE-2008-6124, MSA-08-0010)
    
    Kevin Madura discovered that the forum actions and messaging settings
    in Moodle were not protected from cross-site request forgery (CSRF).
    If an authenticated user were tricked into visiting a malicious
    website while logged into Moodle, a remote attacker could change the
    user's configurations or forum content. (CVE-2009-0499, MSA-09-0008,
    MSA-08-0023)
    
    Daniel Cabezas discovered that Moodle would leak usernames from the
    Calendar Export tool. A remote attacker could gather a list of users,
    leading to a loss of privacy. (CVE-2009-0501, MSA-09-0006)
    
    Christian Eibl discovered that the TeX filter in Moodle allowed any
    function to be used. An authenticated remote attacker could post a
    specially crafted TeX formula to execute arbitrary TeX functions,
    potentially reading any file accessible to the web server user,
    leading to a loss of privacy. (CVE-2009-1171, MSA-09-0009)
    
    Johannes Kuhn discovered that Moodle did not correctly validate user
    permissions when attempting to switch user accounts. An authenticated
    remote attacker could switch to any other Moodle user, leading to a
    loss of privacy. (MSA-08-0003)
    
    Hanno Boeck discovered that unconfigured Moodle instances contained
    XSS vulnerabilities. An unauthenticated remote attacker could exploit
    this to modify or steal confidential data of other users within the
    same web domain. (MSA-08-0004)
    
    Debbie McDonald, Mauno Korpelainen, Howard Miller, and Juan Segarra
    Montesinos discovered that when users were deleted from Moodle, their
    profiles and avatars were still visible. An authenticated remote
    attacker could exploit this to store information in profiles even
    after they were removed, leading to spam traffic. (MSA-08-0015,
    MSA-09-0001, MSA-09-0002)
    
    Lars Vogdt discovered that Moodle did not correctly filter certain
    inputs. An authenticated remote attacker could exploit this to
    generate XSS from which they could modify or steal confidential data
    of other users within the same web domain. (MSA-08-0021)
    
    It was discovered that Moodle did not correctly filter inputs for
    group creation, mnet, essay question, HOST param, wiki param, and
    others. An authenticated remote attacker could exploit this to
    generate XSS from which they could modify or steal confidential data
    of other users within the same web domain. (MDL-9288, MDL-11759,
    MDL-12079, MDL-12793, MDL-14806)
    
    It was discovered that Moodle did not correctly filter SQL inputs when
    performing a restore. An attacker authenticated as a Moodle
    administrator could execute arbitrary SQL commands as the moodle
    database user, leading to a loss of privacy or denial of service.
    (MDL-11857).
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://usn.ubuntu.com/791-1/"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected moodle package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"d2_elliot_name", value:"Roundcube 0.2beta RCE");
      script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'CANVAS');
      script_cwe_id(20, 59, 79, 89, 94, 264, 352);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:moodle");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:8.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:8.10");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/06/14");
      script_set_attribute(attribute:"patch_publication_date", value:"2009/06/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/06/25");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2009-2019 Canonical, Inc. / NASL script (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! ereg(pattern:"^(8\.04|8\.10)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 8.04 / 8.10", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"8.04", pkgname:"moodle", pkgver:"1.8.2-1ubuntu4.2")) flag++;
    if (ubuntu_check(osver:"8.10", pkgname:"moodle", pkgver:"1.8.2-1.2ubuntu2.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "moodle");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_MOODLE-5938.NASL
    descriptionInsufficient quoting of wiki page titles allowed attackers to conduct cross site scripting (XSS) attacks (CVE-2008-5432 ).
    last seen2020-06-01
    modified2020-06-02
    plugin id35448
    published2009-01-22
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/35448
    titleopenSUSE 10 Security Update : moodle (moodle-5938)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update moodle-5938.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(35448);
      script_version ("1.8");
      script_cvs_date("Date: 2019/10/25 13:36:36");
    
      script_cve_id("CVE-2008-5432");
    
      script_name(english:"openSUSE 10 Security Update : moodle (moodle-5938)");
      script_summary(english:"Check for the moodle-5938 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Insufficient quoting of wiki page titles allowed attackers to conduct
    cross site scripting (XSS) attacks (CVE-2008-5432 )."
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected moodle packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_cwe_id(79);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-af");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ar");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-be");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-bg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-bs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ca");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-cs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-da");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-de");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-de_du");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-el");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-es");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-et");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-eu");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-fa");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-fi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-fr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ga");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-gl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-he");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-hi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-hr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-hu");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-id");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-is");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-it");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ja");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ka");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-km");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-kn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ko");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-lt");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-lv");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-mi_tn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ms");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-nl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-nn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-no");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-pl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-pt");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ro");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ru");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sk");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-so");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sq");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sv");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-th");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-tl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-tr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-uk");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-vi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-zh_cn");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:10.3");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/01/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/01/22");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2009-2019 Tenable Network Security, Inc.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE10\.3)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "10.3", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-af-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ar-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-be-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-bg-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-bs-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ca-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-cs-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-da-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-de-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-de_du-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-el-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-es-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-et-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-eu-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-fa-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-fi-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-fr-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ga-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-gl-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-he-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-hi-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-hr-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-hu-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-id-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-is-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-it-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ja-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ka-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-km-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-kn-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ko-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-lt-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-lv-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-mi_tn-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ms-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-nl-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-nn-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-no-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-pl-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-pt-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ro-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-ru-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-sk-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-sl-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-so-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-sq-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-sr-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-sv-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-th-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-tl-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-tr-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-uk-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-vi-1.8.2-17.10") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"moodle-zh_cn-1.8.2-17.10") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "moodle / moodle-af / moodle-ar / moodle-be / moodle-bg / moodle-bs / etc");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_0_MOODLE-090119.NASL
    descriptionInsufficient quoting of wiki page titles allowed attackers to conduct cross site scripting (XSS) attacks (CVE-2008-5432 ).
    last seen2020-06-01
    modified2020-06-02
    plugin id40068
    published2009-07-21
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/40068
    titleopenSUSE Security Update : moodle (moodle-445)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update moodle-445.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(40068);
      script_version("1.10");
      script_cvs_date("Date: 2019/10/25 13:36:34");
    
      script_cve_id("CVE-2008-5432");
    
      script_name(english:"openSUSE Security Update : moodle (moodle-445)");
      script_summary(english:"Check for the moodle-445 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Insufficient quoting of wiki page titles allowed attackers to conduct
    cross site scripting (XSS) attacks (CVE-2008-5432 )."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=457599"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected moodle packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_cwe_id(79);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-af");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ar");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-be");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-bg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-bs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ca");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-cs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-da");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-de");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-de_du");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-el");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-es");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-et");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-eu");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-fa");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-fi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-fr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ga");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-gl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-he");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-hi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-hr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-hu");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-id");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-is");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-it");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ja");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ka");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-km");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-kn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ko");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-lt");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-lv");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-mi_tn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ms");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-nl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-nn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-no");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-pl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-pt");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ro");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-ru");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sk");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-so");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sq");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-sv");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-th");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-tl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-tr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-uk");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-vi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:moodle-zh_cn");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:11.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/01/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/07/21");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2009-2019 Tenable Network Security, Inc.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE11\.0)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "11.0", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-af-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ar-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-be-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-bg-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-bs-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ca-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-cs-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-da-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-de-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-de_du-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-el-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-es-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-et-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-eu-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-fa-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-fi-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-fr-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ga-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-gl-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-he-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-hi-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-hr-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-hu-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-id-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-is-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-it-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ja-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ka-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-km-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-kn-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ko-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-lt-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-lv-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-mi_tn-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ms-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-nl-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-nn-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-no-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-pl-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-pt-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ro-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-ru-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-sk-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-sl-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-so-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-sq-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-sr-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-sv-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-th-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-tl-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-tr-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-uk-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-vi-1.9.0-24.4") ) flag++;
    if ( rpm_check(release:"SUSE11.0", reference:"moodle-zh_cn-1.9.0-24.4") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "moodle / moodle-af / moodle-ar / moodle-be / moodle-bg / moodle-bs / etc");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1691.NASL
    descriptionSeveral remote vulnerabilities have been discovered in Moodle, an online course management system. The following issues are addressed in this update, ranging from cross site scripting to remote code execution. Various cross site scripting issues in the Moodle codebase (CVE-2008-3326, CVE-2008-3325, CVE-2007-3555, CVE-2008-5432, MSA-08-0021, MDL-8849, MDL-12793, MDL-11414, MDL-14806, MDL-10276). Various cross site request forgery issues in the Moodle codebase (CVE-2008-3325, MSA-08-0023). Privilege escalation bugs in the Moodle codebase (MSA-08-0001, MDL-7755). SQL injection issue in the hotpot module (MSA-08-0010). An embedded copy of Smarty had several vulnerabilities (CVE-2008-4811, CVE-2008-4810 ). An embedded copy of Snoopy was vulnerable to cross site scripting (CVE-2008-4796 ). An embedded copy of Kses was vulnerable to cross site scripting (CVE-2008-1502 ).
    last seen2020-06-01
    modified2020-06-02
    plugin id35254
    published2008-12-22
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/35254
    titleDebian DSA-1691-1 : moodle - 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-1691. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(35254);
      script_version("1.21");
      script_cvs_date("Date: 2019/08/02 13:32:21");
    
      script_cve_id("CVE-2007-3555", "CVE-2008-1502", "CVE-2008-3325", "CVE-2008-3326", "CVE-2008-4796", "CVE-2008-4810", "CVE-2008-4811", "CVE-2008-5432", "CVE-2008-6124", "CVE-2008-6125");
      script_bugtraq_id(28599, 31862, 31887);
      script_xref(name:"DSA", value:"1691");
    
      script_name(english:"Debian DSA-1691-1 : moodle - 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 remote vulnerabilities have been discovered in Moodle, an
    online course management system. The following issues are addressed in
    this update, ranging from cross site scripting to remote code
    execution.
    
    Various cross site scripting issues in the Moodle codebase
    (CVE-2008-3326, CVE-2008-3325, CVE-2007-3555, CVE-2008-5432,
    MSA-08-0021, MDL-8849, MDL-12793, MDL-11414, MDL-14806, MDL-10276).
    
    Various cross site request forgery issues in the Moodle codebase
    (CVE-2008-3325, MSA-08-0023).
    
    Privilege escalation bugs in the Moodle codebase (MSA-08-0001,
    MDL-7755).
    
    SQL injection issue in the hotpot module (MSA-08-0010).
    
    An embedded copy of Smarty had several vulnerabilities (CVE-2008-4811,
    CVE-2008-4810 ). An embedded copy of Snoopy was vulnerable to cross
    site scripting (CVE-2008-4796 ). An embedded copy of Kses was
    vulnerable to cross site scripting (CVE-2008-1502 )."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432264"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471158"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489533"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492492"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504235"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504345"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508593"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-3326"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-3325"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-3555"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-5432"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-3325"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-4811"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-4810"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-4796"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-1502"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2008/dsa-1691"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the moodle (1.6.3-2+etch1) package.
    
    For the stable distribution (etch), these problems have been fixed in
    version 1.6.3-2+etch1."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      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:"Moodle <= 1.8.4 RCE");
      script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack');
      script_cwe_id(79, 89, 94, 264, 352);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:moodle");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:4.0");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/07/04");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/12/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/12/22");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      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:"4.0", prefix:"moodle", reference:"1.6.3-2+etch1")) 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");