Vulnerabilities > CVE-2009-5026 - SQL Injection vulnerability in multiple products

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
mysql
oracle
CWE-89
nessus
exploit available

Summary

The executable comment feature in MySQL 5.0.x before 5.0.93 and 5.1.x before 5.1.50, when running in certain slave configurations in which the slave is running a newer version than the master, allows remote attackers to execute arbitrary SQL commands via custom comments.

Vulnerable Configurations

Part Description Count
Application
Mysql
21
Application
Oracle
64

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Object Relational Mapping Injection
    An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject his or her own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
  • SQL Injection through SOAP Parameter Tampering
    An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
  • Expanding Control over the Operating System from the Database
    An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
  • SQL Injection
    This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input. When specially crafted user-controlled input consisting of SQL syntax is used without proper validation as part of SQL queries, it is possible to glean information from the database in ways not envisaged during application design. Depending upon the database and the design of the application, it may also be possible to leverage injection to have the database execute system-related commands of the attackers' choice. SQL Injection enables an attacker to talk directly to the database, thus bypassing the application completely. Successful injection can cause information disclosure as well as ability to add or modify data in the database. In order to successfully inject SQL and retrieve information from a database, an attacker:

Exploit-Db

descriptionOracle MySQL Prior to 5.1.50 Privilege Escalation Vulnerability. CVE-2009-5026. Remote exploits for multiple platform
idEDB-ID:34796
last seen2016-02-03
modified2010-08-03
published2010-08-03
reporterLibing Song
sourcehttps://www.exploit-db.com/download/34796/
titleOracle MySQL < 5.1.50 - Privilege Escalation Vulnerability

Nessus

  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2012-276.NASL
    descriptionMySQL Cluster 7.1.21 fixes several security issues and bugs. Please refer to the following upstream announcement for details : http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-7-1.html
    last seen2020-06-05
    modified2014-06-13
    plugin id74626
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/74626
    titleopenSUSE Security Update : mysql-cluster (openSUSE-SU-2012:0617-1)
    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 openSUSE-2012-276.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(74626);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2009-5026", "CVE-2012-0583", "CVE-2012-1688", "CVE-2012-1690", "CVE-2012-1696", "CVE-2012-1697", "CVE-2012-1703");
    
      script_name(english:"openSUSE Security Update : mysql-cluster (openSUSE-SU-2012:0617-1)");
      script_summary(english:"Check for the openSUSE-2012-276 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "MySQL Cluster 7.1.21 fixes several security issues and bugs. Please
    refer to the following upstream announcement for details :
    
    http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-7-1.html"
      );
      # http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-7-1.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-7-1.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=675870"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=734436"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=742272"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=758460"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2012-05/msg00018.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected mysql-cluster packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmysqlclusterclient16");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmysqlclusterclient16-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmysqlclusterclient_r16");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmysqlclusterclient_r16-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-bench");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-bench-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-client-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-debug");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-debug-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-debugsource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-extra");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-extra-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-management");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-management-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-storage");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-storage-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-tools");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-ndb-tools-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-test");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-test-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-tools");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mysql-cluster-tools-debuginfo");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:12.1");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/05/03");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/05/08");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      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", "Host/cpu");
    
      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 !~ "^(SUSE12\.1)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "12.1", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE12.1", reference:"libmysqlclusterclient16-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libmysqlclusterclient16-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libmysqlclusterclient_r16-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libmysqlclusterclient_r16-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-bench-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-bench-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-client-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-client-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-debug-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-debug-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-debugsource-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-extra-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-extra-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-management-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-management-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-storage-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-storage-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-tools-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-ndb-tools-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-test-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-test-debuginfo-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-tools-7.1.21-2.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mysql-cluster-tools-debuginfo-7.1.21-2.4.1") ) 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, "libmysqlclusterclient16 / libmysqlclusterclient16-debuginfo / etc");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_LIBMYSQLCLIENT-DEVEL-120731.NASL
    descriptionMySQL has been upgraded to version 5.0.96 to fix several vulnerabilities.
    last seen2020-06-05
    modified2013-01-25
    plugin id64183
    published2013-01-25
    reporterThis script is Copyright (C) 2013-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/64183
    titleSuSE 11.1 Security Update : MySQL (SAT Patch Number 6613)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from SuSE 11 update information. The text itself is
    # copyright (C) Novell, Inc.
    #
    
    if (NASL_LEVEL < 3000) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(64183);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2009-5026", "CVE-2012-0075", "CVE-2012-0087", "CVE-2012-0101", "CVE-2012-0102", "CVE-2012-0114", "CVE-2012-0484", "CVE-2012-0490", "CVE-2012-2122");
    
      script_name(english:"SuSE 11.1 Security Update : MySQL (SAT Patch Number 6613)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote SuSE 11 host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "MySQL has been upgraded to version 5.0.96 to fix several
    vulnerabilities."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=765092"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=769062"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2009-5026.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0075.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0087.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0101.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0102.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0114.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0484.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0490.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-2122.html"
      );
      script_set_attribute(attribute:"solution", value:"Apply SAT patch number 6613.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'CANVAS');
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:libmysqlclient15");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:libmysqlclient15-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:libmysqlclient_r15");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:libmysqlclient_r15-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:mysql-Max");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:mysql-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:mysql-tools");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:suse_linux:11");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/07/31");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/25");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2020 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("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)11") audit(AUDIT_OS_NOT, "SuSE 11");
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^i[3-6]86$" && "x86_64" >!< cpu && "s390x" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "SuSE 11", cpu);
    
    pl = get_kb_item("Host/SuSE/patchlevel");
    if (isnull(pl) || int(pl) != 1) audit(AUDIT_OS_NOT, "SuSE 11.1");
    
    
    flag = 0;
    if (rpm_check(release:"SLED11", sp:1, cpu:"i586", reference:"libmysqlclient15-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"i586", reference:"libmysqlclient_r15-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"i586", reference:"mysql-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"i586", reference:"mysql-client-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"libmysqlclient15-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"libmysqlclient15-32bit-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"libmysqlclient_r15-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"libmysqlclient_r15-32bit-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"mysql-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"mysql-client-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, reference:"libmysqlclient15-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, reference:"libmysqlclient_r15-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, reference:"mysql-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, reference:"mysql-Max-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, reference:"mysql-client-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, reference:"mysql-tools-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, cpu:"s390x", reference:"libmysqlclient15-32bit-5.0.96-0.4.1")) flag++;
    if (rpm_check(release:"SLES11", sp:1, cpu:"x86_64", reference:"libmysqlclient15-32bit-5.0.96-0.4.1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDatabases
    NASL idMYSQL_5_1_51.NASL
    descriptionThe version of MySQL Community Server installed on the remote host is earlier than 5.1.51 and is, therefore, potentially affected by multiple vulnerabilities: - A privilege escalation vulnerability exists when using statement-based replication. Version specific comments used on a master server with a lesser release version than its slave can allow the MySQL privilege system on the slave server to be subverted. (49124) - An authenticated user can crash the MySQL server by passing improper WKB to the
    last seen2020-06-01
    modified2020-06-02
    plugin id49711
    published2010-10-05
    reporterThis script is Copyright (C) 2010-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/49711
    titleMySQL Community Server < 5.1.51 Multiple Vulnerabilities
    code
    
    
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(49711);
      script_version("1.19");
      script_cvs_date("Date: 2018/11/15 20:50:21");
    
      script_cve_id(
        "CVE-2009-5026",
        "CVE-2010-3833",
        "CVE-2010-3834",
        "CVE-2010-3835",
        "CVE-2010-3836",
        "CVE-2010-3837",
        "CVE-2010-3838",
        "CVE-2010-3839",
        "CVE-2010-3840"
      );
      script_bugtraq_id(43676, 43677);
      script_xref(name:"Secunia", value:"41716");
    
      script_name(english:"MySQL Community Server < 5.1.51 Multiple Vulnerabilities");
      script_summary(english:"Checks version of MySQL 5.1 Server");
    
      script_set_attribute(attribute:"synopsis", value:"The remote database server is affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of MySQL Community Server installed on the remote host is
    earlier than 5.1.51 and is, therefore, potentially affected by
    multiple vulnerabilities:
    
      - A privilege escalation vulnerability exists when using
        statement-based replication. Version specific comments
        used on a master server with a lesser release version
        than its slave can allow the MySQL privilege system on
        the slave server to be subverted. (49124)
    
      - An authenticated user can crash the MySQL server by
        passing improper WKB to the 'PolyFromWKB()' function.
        (51875)
    
      - The improper handling of type errors during argument
        evaluation in extreme-value functions, e.g., 'LEAST()'
        or 'GREATEST()' caused server crashes. (55826)
    
      - The creation of derived tables needing a temporary
        grouping table caused server crashes. (55568)
    
      - The re-evaluation of a user-variable assignment
        expression after the creation of a temporary table
        caused server crashes. (55564)
    
      - The 'convert_tz()' function can be used to crash the
        server by setting the timezone argument to an empty
        SET column value. (55424)
    
      - The pre-evaluation of 'LIKE' predicates while preparing
        a view caused server crashes. (54568)
    
      - The use of 'GROUP_CONCAT()' and 'WITH ROLLUP' caused
        server crashes. (54476)
    
      - The use of an intermediate temporary table and queries
        containing calls to 'GREATEST()' or 'LEAST()', having
        a list of both numeric and 'LONGBLOB' arguments, caused
        server crashes. (54461)
    
      - The use of nested joins in prepared statements or
        stored procedures could result in infinite loops.
        (53544)");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=49124");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=51875");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=55826");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=55568");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=55564");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=54568");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=54476");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=54461");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=53544");
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html");
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.1/en/news-5-1-51.html");
      script_set_attribute(attribute:"solution", value:"Upgrade to MySQL Community Server 5.1.51 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:S/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/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:"vuln_publication_date", value:"2010/08/03");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/09/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/10/05");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:mysql:mysql");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Databases");
    
      script_copyright(english:"This script is Copyright (C) 2010-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("mysql_version.nasl", "mysql_login.nasl");
      script_require_keys("Settings/ParanoidReport");
      script_require_ports("Services/mysql", 3306);
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("mysql_func.inc");
    
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    
    port = get_service(svc:"mysql", default:3306, exit_on_fail:TRUE);
    vuln = FALSE;
    
    if (mysql_init(port:port, exit_on_fail:TRUE) == 1)
    {
      variant = mysql_get_variant();
      version = mysql_get_version();
      ver_fields = split(version, sep:'.', keep:FALSE);
      major = int(ver_fields[0]);
      minor = int(ver_fields[1]);
      rev = int(ver_fields[2]);
    
      if (
        !isnull(variant) && "Community" >< variant &&
        strlen(version) &&
        major == 5 && minor == 1 && rev < 51
      ) vuln = TRUE;
    
    }
    else exit(1, "Can't establish a MySQL connection on port "+port+".");
    mysql_close();
    
    if (vuln)
    {
      if (report_verbosity > 0)
      {
        report = '\n  Installed version : ' + version +
                 '\n  Fixed version     : 5.1.51\n';
        datadir = get_kb_item('mysql/' + port + '/datadir');
        if (!empty_or_null(datadir))
        {
          report += '  Data Dir          : ' + datadir + '\n';
        }
        databases = get_kb_item('mysql/' + port + '/databases');
        if (!empty_or_null(databases))
        { 
          report += '  Databases         :\n' + databases;
        }
        security_warning(port:port, extra:report);
      }
      else security_warning(port);
      exit(0);
    }
    else
    {
      if (isnull(variant)) exit(1, "Can't determine the variant of MySQL listening on port "+port+".");
      else if ("Community" >< variant) exit(0, "MySQL version "+version+" is listening on port "+port+" and is not affected.");
      else exit(0, "MySQL "+variant+" is listening on port "+port+" and is not affected.");
    }