Vulnerabilities > CVE-2008-4097 - Permissions, Privileges, and Access Controls vulnerability in Oracle Mysql 5.0.51A

047910
CVSS 4.6 - MEDIUM
Attack vector
NETWORK
Attack complexity
HIGH
Privileges required
SINGLE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
high complexity
oracle
CWE-264
nessus

Summary

MySQL 5.0.51a allows local users to bypass certain privilege checks by calling CREATE TABLE on a MyISAM table with modified (1) DATA DIRECTORY or (2) INDEX DIRECTORY arguments that are associated with symlinks within pathnames for subdirectories of the MySQL home data directory, which are followed when tables are created in the future. NOTE: this vulnerability exists because of an incomplete fix for CVE-2008-2079. Per http://www.securityfocus.com/bid/29106 this vulnerability is remotely exploitable.

Vulnerable Configurations

Part Description Count
Application
Oracle
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.

Nessus

  • NASL familySuSE Local Security Checks
    NASL idSUSE9_12256.NASL
    descriptionDue a flaw users could access tables of other users. (CVE-2008-4097, CVE-2008-4098)
    last seen2020-06-01
    modified2020-06-02
    plugin id41243
    published2009-09-24
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/41243
    titleSuSE9 Security Update : MySQL (YOU Patch Number 12256)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The text description of this plugin is (C) Novell, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(41243);
      script_version("1.10");
      script_cvs_date("Date: 2019/10/25 13:36:31");
    
      script_cve_id("CVE-2008-4097", "CVE-2008-4098");
    
      script_name(english:"SuSE9 Security Update : MySQL (YOU Patch Number 12256)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote SuSE 9 host is missing a security-related patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Due a flaw users could access tables of other users. (CVE-2008-4097,
    CVE-2008-4098)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2008-4097.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2008-4098.html"
      );
      script_set_attribute(attribute:"solution", value:"Apply YOU patch number 12256.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:S/C:P/I:P/A:P");
      script_cwe_id(59, 264);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:suse:suse_linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/09/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/09/24");
      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/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled.");
    if (!get_kb_item("Host/SuSE/release")) exit(0, "The host is not running SuSE.");
    if (!get_kb_item("Host/SuSE/rpm-list")) exit(1, "Could not obtain the list of installed packages.");
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) exit(1, "Failed to determine the architecture type.");
    if (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") exit(1, "Local checks for SuSE 9 on the '"+cpu+"' architecture have not been implemented.");
    
    
    flag = 0;
    if (rpm_check(release:"SUSE9", reference:"mysql-4.0.18-32.37")) flag++;
    if (rpm_check(release:"SUSE9", reference:"mysql-Max-4.0.18-32.37")) flag++;
    if (rpm_check(release:"SUSE9", reference:"mysql-client-4.0.18-32.37")) flag++;
    if (rpm_check(release:"SUSE9", reference:"mysql-devel-4.0.18-32.37")) flag++;
    if (rpm_check(release:"SUSE9", reference:"mysql-shared-4.0.18-32.37")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else exit(0, "The host is not affected.");
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2009-1289.NASL
    descriptionUpdated mysql packages that fix various security issues and several bugs are now available for Red Hat Enterprise Linux 5. This update has been rated as having moderate security impact by the Red Hat Security Response Team. MySQL is a multi-user, multi-threaded SQL database server. It consists of the MySQL server daemon (mysqld) and many client programs and libraries. MySQL did not correctly check directories used as arguments for the DATA DIRECTORY and INDEX DIRECTORY directives. Using this flaw, an authenticated attacker could elevate their access privileges to tables created by other database users. Note: This attack does not work on existing tables. An attacker can only elevate their access to another user
    last seen2020-06-01
    modified2020-06-02
    plugin id63890
    published2013-01-24
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/63890
    titleRHEL 5 : mysql (RHSA-2009:1289)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2009:1289. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(63890);
      script_version("1.15");
      script_cvs_date("Date: 2019/10/25 13:36:14");
    
      script_cve_id("CVE-2008-2079", "CVE-2008-3963", "CVE-2008-4097", "CVE-2008-4098", "CVE-2008-4456", "CVE-2009-2446");
      script_bugtraq_id(29106, 31081, 31486, 35609);
      script_xref(name:"RHSA", value:"2009:1289");
    
      script_name(english:"RHEL 5 : mysql (RHSA-2009:1289)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated mysql packages that fix various security issues and several
    bugs are now available for Red Hat Enterprise Linux 5.
    
    This update has been rated as having moderate security impact by the
    Red Hat Security Response Team.
    
    MySQL is a multi-user, multi-threaded SQL database server. It consists
    of the MySQL server daemon (mysqld) and many client programs and
    libraries.
    
    MySQL did not correctly check directories used as arguments for the
    DATA DIRECTORY and INDEX DIRECTORY directives. Using this flaw, an
    authenticated attacker could elevate their access privileges to tables
    created by other database users. Note: This attack does not work on
    existing tables. An attacker can only elevate their access to another
    user's tables as the tables are created. As well, the names of these
    created tables need to be predicted correctly for this attack to
    succeed. (CVE-2008-2079)
    
    A flaw was found in the way MySQL handles an empty bit-string literal.
    A remote, authenticated attacker could crash the MySQL server daemon
    (mysqld) if they used an empty bit-string literal in a SQL statement.
    This issue only caused a temporary denial of service, as the MySQL
    daemon was automatically restarted after the crash. (CVE-2008-3963)
    
    An insufficient HTML entities quoting flaw was found in the mysql
    command line client's HTML output mode. If an attacker was able to
    inject arbitrary HTML tags into data stored in a MySQL database, which
    was later retrieved using the mysql command line client and its HTML
    output mode, they could perform a cross-site scripting (XSS) attack
    against victims viewing the HTML output in a web browser.
    (CVE-2008-4456)
    
    Multiple format string flaws were found in the way the MySQL server
    logs user commands when creating and deleting databases. A remote,
    authenticated attacker with permissions to CREATE and DROP databases
    could use these flaws to formulate a specifically-crafted SQL command
    that would cause a temporary denial of service (open connections to
    mysqld are terminated). (CVE-2009-2446)
    
    Note: To exploit the CVE-2009-2446 flaws, the general query log (the
    mysqld '--log' command line option or the 'log' option in
    '/etc/my.cnf') must be enabled. This logging is not enabled by
    default.
    
    This update also fixes multiple bugs. Details regarding these bugs can
    be found in the Red Hat Enterprise Linux 5.4 Technical Notes. You can
    find a link to the Technical Notes in the References section of this
    errata.
    
    Note: These updated packages upgrade MySQL to version 5.0.77 to
    incorporate numerous upstream bug fixes. Details of these changes are
    found in the following MySQL Release Notes:
    http://dev.mysql.com/doc/refman/5.0/en/news-5-0-77.html
    
    All MySQL users are advised to upgrade to these updated packages,
    which resolve these issues. After installing this update, the MySQL
    server daemon (mysqld) will be restarted automatically."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2008-2079"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2008-3963"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2008-4456"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2009-2446"
      );
      # http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/documentation/en-us/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2009:1289"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:S/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_cwe_id(59, 79, 134, 264);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:mysql-bench");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:mysql-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:mysql-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:mysql-test");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2008/05/05");
      script_set_attribute(attribute:"patch_publication_date", value:"2009/09/02");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/24");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! preg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 5.x", "Red Hat " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) 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$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2009:1289";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_HOLE,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {
      flag = 0;
      if (rpm_check(release:"RHEL5", reference:"mysql-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"mysql-bench-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"mysql-bench-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"mysql-bench-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", reference:"mysql-devel-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"mysql-server-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"mysql-server-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"mysql-server-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"mysql-test-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"mysql-test-5.0.77-3.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"mysql-test-5.0.77-3.el5")) flag++;
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_HOLE,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "mysql / mysql-bench / mysql-devel / mysql-server / mysql-test");
      }
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1662.NASL
    descriptionA symlink traversal vulnerability was discovered in MySQL, a relational database server. The weakness could permit an attacker having both CREATE TABLE access to a database and the ability to execute shell commands on the database server to bypass MySQL access controls, enabling them to write to tables in databases to which they would not ordinarily have access. The Common Vulnerabilities and Exposures project identifies this vulnerability as CVE-2008-4098. Note that a closely aligned issue, identified as CVE-2008-4097, was prevented by the update announced in DSA-1608-1. This new update supersedes that fix and mitigates both potential attack vectors.
    last seen2020-06-01
    modified2020-06-02
    plugin id34700
    published2008-11-06
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/34700
    titleDebian DSA-1662-1 : mysql-dfsg-5.0 - authorization bypass
    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-1662. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(34700);
      script_version("1.14");
      script_cvs_date("Date: 2019/08/02 13:32:21");
    
      script_cve_id("CVE-2008-4098");
      script_bugtraq_id(29106);
      script_xref(name:"DSA", value:"1662");
    
      script_name(english:"Debian DSA-1662-1 : mysql-dfsg-5.0 - authorization bypass");
      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:
    "A symlink traversal vulnerability was discovered in MySQL, a
    relational database server. The weakness could permit an attacker
    having both CREATE TABLE access to a database and the ability to
    execute shell commands on the database server to bypass MySQL access
    controls, enabling them to write to tables in databases to which they
    would not ordinarily have access.
    
    The Common Vulnerabilities and Exposures project identifies this
    vulnerability as CVE-2008-4098. Note that a closely aligned issue,
    identified as CVE-2008-4097, was prevented by the update announced in
    DSA-1608-1. This new update supersedes that fix and mitigates both
    potential attack vectors."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480292"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-4098"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2008-4097"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2008/dsa-1662"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the mysql packages.
    
    For the stable distribution (etch), this problem has been fixed in
    version 5.0.32-7etch8."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:S/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:ND/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_cwe_id(59);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:mysql-dfsg-5.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:4.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/11/06");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/11/06");
      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:"libmysqlclient15-dev", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"libmysqlclient15off", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"mysql-client", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"mysql-client-5.0", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"mysql-common", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"mysql-server", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"mysql-server-4.1", reference:"5.0.32-7etch8")) flag++;
    if (deb_check(release:"4.0", prefix:"mysql-server-5.0", reference:"5.0.32-7etch8")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familySolaris Local Security Checks
    NASL idSOLARIS11_MYSQL_20130924.NASL
    descriptionThe remote Solaris system is missing necessary patches to address security updates : - MySQL before 5.0.67 allows local users to bypass certain privilege checks by calling CREATE TABLE on a MyISAM table with modified (1) DATA DIRECTORY or (2) INDEX DIRECTORY arguments that are originally associated with pathnames without symlinks, and that can point to tables created at a future time at which a pathname is modified to contain a symlink to a subdirectory of the MySQL home data directory. NOTE: this vulnerability exists because of an incomplete fix for CVE-2008-4097. (CVE-2008-4098) - sql/sql_table.cc in MySQL 5.0.x through 5.0.88, 5.1.x through 5.1.41, and 6.0 before 6.0.9-alpha, when the data home directory contains a symlink to a different filesystem, allows remote authenticated users to bypass intended access restrictions by calling CREATE TABLE with a (1) DATA DIRECTORY or (2) INDEX DIRECTORY argument referring to a subdirectory that requires following this symlink. (CVE-2008-7247) - MySQL before 5.1.46 allows local users to delete the data and index files of another user
    last seen2020-06-01
    modified2020-06-02
    plugin id80705
    published2015-01-19
    reporterThis script is Copyright (C) 2015-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/80705
    titleOracle Solaris Third-Party Patch Update : mysql (multiple_vulnerabilities_in_mysql)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from the Oracle Third Party software advisories.
    #
    include("compat.inc");
    
    if (description)
    {
      script_id(80705);
      script_version("1.2");
      script_cvs_date("Date: 2018/11/15 20:50:24");
    
      script_cve_id("CVE-2008-4098", "CVE-2008-7247", "CVE-2010-1626", "CVE-2013-1861");
    
      script_name(english:"Oracle Solaris Third-Party Patch Update : mysql (multiple_vulnerabilities_in_mysql)");
      script_summary(english:"Check for the 'entire' version.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Solaris system is missing a security patch for third-party
    software."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote Solaris system is missing necessary patches to address
    security updates :
    
      - MySQL before 5.0.67 allows local users to bypass certain
        privilege checks by calling CREATE TABLE on a MyISAM
        table with modified (1) DATA DIRECTORY or (2) INDEX
        DIRECTORY arguments that are originally associated with
        pathnames without symlinks, and that can point to tables
        created at a future time at which a pathname is modified
        to contain a symlink to a subdirectory of the MySQL home
        data directory. NOTE: this vulnerability exists because
        of an incomplete fix for CVE-2008-4097. (CVE-2008-4098)
    
      - sql/sql_table.cc in MySQL 5.0.x through 5.0.88, 5.1.x
        through 5.1.41, and 6.0 before 6.0.9-alpha, when the
        data home directory contains a symlink to a different
        filesystem, allows remote authenticated users to bypass
        intended access restrictions by calling CREATE TABLE
        with a (1) DATA DIRECTORY or (2) INDEX DIRECTORY
        argument referring to a subdirectory that requires
        following this symlink. (CVE-2008-7247)
    
      - MySQL before 5.1.46 allows local users to delete the
        data and index files of another user's MyISAM table via
        a symlink attack in conjunction with the DROP TABLE
        command, a different vulnerability than CVE-2008-4098
        and CVE-2008-7247. (CVE-2010-1626)
    
      - MariaDB 5.5.x before 5.5.30, 5.3.x before 5.3.13, 5.2.x
        before 5.2.15, and 5.1.x before 5.1.68, and Oracle MySQL
        5.1.69 and earlier, 5.5.31 and earlier, and 5.6.11 and
        earlier allows remote attackers to cause a denial of
        service (crash) via a crafted geometry feature that
        specifies a large number of points, which is not
        properly handled when processing the binary
        representation of this feature, related to a numeric
        calculation error. (CVE-2013-1861)"
      );
      # https://www.oracle.com/technetwork/topics/security/thirdparty-patch-map-1482893.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?4a913f44"
      );
      # https://blogs.oracle.com/sunsecurity/multiple-vulnerabilities-in-mysql
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?78a39345"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade to Solaris 11.1.10.5.0.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:S/C:P/I:P/A:P");
      script_cwe_id(59);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:solaris:11.1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:solaris:mysql");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/09/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/01/19");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.");
      script_family(english:"Solaris Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Solaris11/release", "Host/Solaris11/pkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("solaris.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Solaris11/release");
    if (isnull(release)) audit(AUDIT_OS_NOT, "Solaris11");
    pkg_list = solaris_pkg_list_leaves();
    if (isnull (pkg_list)) audit(AUDIT_PACKAGE_LIST_MISSING, "Solaris pkg-list packages");
    
    if (empty_or_null(egrep(string:pkg_list, pattern:"^mysql$"))) audit(AUDIT_PACKAGE_NOT_INSTALLED, "mysql");
    
    flag = 0;
    
    if (solaris_check_release(release:"0.5.11-0.175.1.10.0.5.0", sru:"SRU 11.1.10.5.0") > 0) flag++;
    
    if (flag)
    {
      error_extra = 'Affected package : mysql\n' + solaris_get_report2();
      error_extra = ereg_replace(pattern:"version", replace:"OS version", string:error_extra);
      if (report_verbosity > 0) security_warning(port:0, extra:error_extra);
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_PACKAGE_NOT_AFFECTED, "mysql");
    
  • NASL familyDatabases
    NASL idMYSQL_6_0_14_PRIV_BYPASS.NASL
    descriptionThe version of MySQL installed on the remote host is earlier than 5.0.88 / 5.1.42 / 5.5.0 / 6.0.14 and thus reportedly allows a local user to circumvent privileges through creation of MyISAM tables using the
    last seen2020-06-01
    modified2020-06-02
    plugin id17812
    published2012-01-16
    reporterThis script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/17812
    titleMySQL < 5.0.88 / 5.1.42 / 5.5.0 / 6.0.14 MyISAM CREATE TABLE Privilege Check Bypass
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_0_LIBMYSQLCLIENT-DEVEL-080919.NASL
    descriptionEmpty bit-strings in a query could crash the MySQL server (CVE-2008-3963). Due to another flaw users could access tables of other users (CVE-2008-4097, CVE-2008-4098). This update also fixes problems with the
    last seen2020-06-01
    modified2020-06-02
    plugin id40026
    published2009-07-21
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/40026
    titleopenSUSE Security Update : libmysqlclient-devel (libmysqlclient-devel-210)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_LIBMYSQLCLIENT-DEVEL-5619.NASL
    descriptionEmpty bit-strings in a query could crash the MySQL server (CVE-2008-3963). Due to another flaw users could access tables of other users (CVE-2008-4097, CVE-2008-4098). This update also fixes the previously broken mysqlhotcopy script.
    last seen2020-06-01
    modified2020-06-02
    plugin id35248
    published2008-12-21
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/35248
    titleopenSUSE 10 Security Update : libmysqlclient-devel (libmysqlclient-devel-5619)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_738F8F9ED66111DDA7650030843D3802.NASL
    descriptionMySQL Team reports : Additional corrections were made for the symlink-related privilege problem originally addressed. The original fix did not correctly handle the data directory pathname if it contained symlinked directories in its path, and the check was made only at table-creation time, not at table-opening time later.
    last seen2020-06-01
    modified2020-06-02
    plugin id35279
    published2008-12-30
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/35279
    titleFreeBSD : mysql -- MyISAM table privileges security bypass vulnerability for symlinked paths (738f8f9e-d661-11dd-a765-0030843d3802)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2009-1289.NASL
    descriptionUpdated mysql packages that fix various security issues and several bugs are now available for Red Hat Enterprise Linux 5. This update has been rated as having moderate security impact by the Red Hat Security Response Team. MySQL is a multi-user, multi-threaded SQL database server. It consists of the MySQL server daemon (mysqld) and many client programs and libraries. MySQL did not correctly check directories used as arguments for the DATA DIRECTORY and INDEX DIRECTORY directives. Using this flaw, an authenticated attacker could elevate their access privileges to tables created by other database users. Note: This attack does not work on existing tables. An attacker can only elevate their access to another user
    last seen2020-06-01
    modified2020-06-02
    plugin id43782
    published2010-01-06
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/43782
    titleCentOS 5 : mysql (CESA-2009:1289)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2010-0110.NASL
    descriptionUpdated mysql packages that fix several security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. MySQL is a multi-user, multi-threaded SQL database server. It consists of the MySQL server daemon (mysqld) and many client programs and libraries. Multiple flaws were discovered in the way MySQL handled symbolic links to tables created using the DATA DIRECTORY and INDEX DIRECTORY directives in CREATE TABLE statements. An attacker with CREATE and DROP table privileges and shell access to the database server could use these flaws to escalate their database privileges, or gain access to tables created by other database users. (CVE-2008-4098, CVE-2009-4030) Note: Due to the security risks and previous security issues related to the use of the DATA DIRECTORY and INDEX DIRECTORY directives, users not depending on this feature should consider disabling it by adding
    last seen2020-06-01
    modified2020-06-02
    plugin id44647
    published2010-02-18
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/44647
    titleCentOS 4 : mysql (CESA-2010:0110)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_MYSQL-5618.NASL
    descriptionEmpty bit-strings in a query could crash the MySQL server. (CVE-2008-3963) Due to another flaw users could access tables of other users. (CVE-2008-4097 / CVE-2008-4098)
    last seen2020-06-01
    modified2020-06-02
    plugin id34765
    published2008-11-13
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/34765
    titleSuSE 10 Security Update : MySQL (ZYPP Patch Number 5618)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2010-0110.NASL
    descriptionUpdated mysql packages that fix several security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. MySQL is a multi-user, multi-threaded SQL database server. It consists of the MySQL server daemon (mysqld) and many client programs and libraries. Multiple flaws were discovered in the way MySQL handled symbolic links to tables created using the DATA DIRECTORY and INDEX DIRECTORY directives in CREATE TABLE statements. An attacker with CREATE and DROP table privileges and shell access to the database server could use these flaws to escalate their database privileges, or gain access to tables created by other database users. (CVE-2008-4098, CVE-2009-4030) Note: Due to the security risks and previous security issues related to the use of the DATA DIRECTORY and INDEX DIRECTORY directives, users not depending on this feature should consider disabling it by adding
    last seen2020-06-01
    modified2020-06-02
    plugin id44635
    published2010-02-17
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/44635
    titleRHEL 4 : mysql (RHSA-2010:0110)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2009-094.NASL
    descriptionMultiple vulnerabilities has been found and corrected in mysql : MySQL 5.0 before 5.0.66, 5.1 before 5.1.26, and 6.0 before 6.0.6 does not properly handle a b
    last seen2020-06-01
    modified2020-06-02
    plugin id36943
    published2009-04-23
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/36943
    titleMandriva Linux Security Advisory : mysql (MDVSA-2009:094)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2009-326.NASL
    descriptionMultiple vulnerabilities has been found and corrected in mysql : MySQL 5.0 before 5.0.66, 5.1 before 5.1.26, and 6.0 before 6.0.6 does not properly handle a b
    last seen2020-06-01
    modified2020-06-02
    plugin id43045
    published2009-12-08
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/43045
    titleMandriva Linux Security Advisory : mysql (MDVSA-2009:326)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-671-1.NASL
    descriptionIt was discovered that MySQL could be made to overwrite existing table files in the data directory. An authenticated user could use the DATA DIRECTORY and INDEX DIRECTORY options to possibly bypass privilege checks. This update alters table creation behaviour by disallowing the use of the MySQL data directory in DATA DIRECTORY and INDEX DIRECTORY options. (CVE-2008-2079, CVE-2008-4097 and CVE-2008-4098) It was discovered that MySQL did not handle empty bit-string literals properly. An attacker could exploit this problem and cause the MySQL server to crash, leading to a denial of service. (CVE-2008-3963). 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.
    last seen2020-06-01
    modified2020-06-02
    plugin id37299
    published2009-04-23
    reporterUbuntu Security Notice (C) 2008-2019 Canonical, Inc. / NASL script (C) 2009-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/37299
    titleUbuntu 6.06 LTS / 7.10 / 8.04 LTS : mysql-dfsg-5.0 vulnerabilities (USN-671-1)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201201-02.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201201-02 (MySQL: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in MySQL. Please review the CVE identifiers referenced below for details. Impact : An unauthenticated remote attacker may be able to execute arbitrary code with the privileges of the MySQL process, cause a Denial of Service condition, bypass security restrictions, uninstall arbitrary MySQL plugins, or conduct Man-in-the-Middle and Cross-Site Scripting attacks. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id57446
    published2012-01-06
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/57446
    titleGLSA-201201-02 : MySQL: Multiple vulnerabilities
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2010-0110.NASL
    descriptionFrom Red Hat Security Advisory 2010:0110 : Updated mysql packages that fix several security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. MySQL is a multi-user, multi-threaded SQL database server. It consists of the MySQL server daemon (mysqld) and many client programs and libraries. Multiple flaws were discovered in the way MySQL handled symbolic links to tables created using the DATA DIRECTORY and INDEX DIRECTORY directives in CREATE TABLE statements. An attacker with CREATE and DROP table privileges and shell access to the database server could use these flaws to escalate their database privileges, or gain access to tables created by other database users. (CVE-2008-4098, CVE-2009-4030) Note: Due to the security risks and previous security issues related to the use of the DATA DIRECTORY and INDEX DIRECTORY directives, users not depending on this feature should consider disabling it by adding
    last seen2020-06-01
    modified2020-06-02
    plugin id67998
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/67998
    titleOracle Linux 4 : mysql (ELSA-2010-0110)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_MYSQL-5613.NASL
    descriptionEmpty bit-strings in a query could crash the MySQL server (CVE-2008-3963). Due to another flaw users could access tables of other users (CVE-2008-4097, CVE-2008-4098).
    last seen2020-06-01
    modified2020-06-02
    plugin id34985
    published2008-12-01
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/34985
    titleopenSUSE 10 Security Update : mysql (mysql-5613)