Vulnerabilities > CVE-2007-2583

047910
CVSS 4.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
SINGLE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
PARTIAL
network
low complexity
oracle
debian
canonical
nessus
exploit available

Summary

The in_decimal::set function in item_cmpfunc.cc in MySQL before 5.0.40, and 5.1 before 5.1.18-beta, allows context-dependent attackers to cause a denial of service (crash) via a crafted IF clause that results in a divide-by-zero error and a NULL pointer dereference.

Vulnerable Configurations

Part Description Count
Application
Oracle
241
OS
Debian
2
OS
Canonical
3

Exploit-Db

descriptionMySQL 5.0.x IF Query Handling Remote Denial Of Service Vulnerability. CVE-2007-2583. Dos exploit for linux platform
fileexploits/linux/dos/30020.txt
idEDB-ID:30020
last seen2016-02-03
modified2013-12-04
platformlinux
port
published2013-12-04
reporterNeil Kettle
sourcehttps://www.exploit-db.com/download/30020/
titleMySQL 5.0.x - IF Query Handling Remote Denial of Service Vulnerability
typedos

Nessus

  • NASL familyDatabases
    NASL idMYSQL_5_1_18.NASL
    descriptionThe version of MySQL installed on the remote host reportedly is affected by several issues : - Evaluation of an
    last seen2020-06-01
    modified2020-06-02
    plugin id25242
    published2007-05-17
    reporterThis script is Copyright (C) 2007-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/25242
    titleMySQL 5.1 < 5.1.18 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(25242);
      script_version("1.21");
      script_cvs_date("Date: 2018/11/15 20:50:21");
    
      script_cve_id("CVE-2007-2583", "CVE-2007-2691", "CVE-2007-2692", "CVE-2007-2693");
      script_bugtraq_id(23911, 24008, 24011, 24016);
      script_xref(name:"EDB-ID", value:"30020");
    
      script_name(english:"MySQL 5.1 < 5.1.18 Multiple Vulnerabilities");
      script_summary(english:"Checks version of MySQL");
    
      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 installed on the remote host reportedly is
    affected by several issues :
    
      - Evaluation of an 'IN()' predicate with a decimal-valued
        argument causes a service crash.
    
      - A user can rename a table even though he does not have 
        DROP privileges.
    
      - If a stored routine is declared as 'SQL SECURITY INVOKER', 
        a user may be able to gain privileges by invoking that 
        routine.
    
      - A user with only ALTER privileges on a partitioned table
        can discover information about the table that should 
        require SELECT privileges.");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=23675");
      script_set_attribute(attribute:"see_also", value:"http://bugs.mysql.com/bug.php?id=27515");
      script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=27337");
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.1/en/news-5-1-18.html");
      script_set_attribute(attribute:"solution", value:"Upgrade to MySQL version 5.1.18 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_cwe_id(189);
    
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/05/17");
      script_set_attribute(attribute:"vuln_publication_date", value:"2006/10/26");
    
      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) 2007-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("mysql_version.nasl", "mysql_login.nasl");
      script_require_ports("Services/mysql", 3306);
      script_require_keys("Settings/ParanoidReport");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    include("misc_func.inc");
    include("mysql_func.inc");
    
    
    # nb: banner checks of open source software are prone to false-
    #     positives so only run the check if reporting is paranoid.
    if (report_paranoia < 2)
      exit(1, "This plugin only runs if 'Report paranoia' is set to 'Paranoid'.");
    
    port = get_service(svc:"mysql", default:3306, exit_on_fail:TRUE);
    
    if (mysql_init(port:port, exit_on_fail:TRUE) == 1)
    {
      ver = mysql_get_version();
      if (isnull(ver)) exit(0);
    
      if (ver =~ "^5\.1\.([0-9]($|[^0-9])|1[1-7]($|[^0-9]))")
      {
        report =
          '\nThe remote MySQL '+mysql_get_variant()+'\'s version is :\n'+
          '\n  '+ver+'\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);
      }
    }
    mysql_close();
    
  • NASL familyDatabases
    NASL idMYSQL_SELECT_IF_DOS.NASL
    descriptionThe version of MySQL installed on the remote host reportedly is affected by a denial of service vulnerability that may be triggered with a specially crafted IF query. An attacker who can execute arbitrary SELECT statements may be able to leverage this issue to crash the affected service.
    last seen2020-06-01
    modified2020-06-02
    plugin id25198
    published2007-05-10
    reporterThis script is Copyright (C) 2007-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/25198
    titleMySQL Crafted IF Clause Divide-by-zero NULL Dereference DoS
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(25198);
      script_version("1.24");
      script_cvs_date("Date: 2018/07/16 14:09:13");
    
      script_cve_id("CVE-2007-2583", "CVE-2007-2692");
      script_bugtraq_id(23911);
      script_xref(name:"EDB-ID", value:"30020");
    
      script_name(english:"MySQL Crafted IF Clause Divide-by-zero NULL Dereference DoS");
      script_summary(english:"Checks version of MySQL");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote database server is prone to a denial of service attack.");
      script_set_attribute(attribute:"description", value:
    "The version of MySQL installed on the remote host reportedly is
    affected by a denial of service vulnerability that may be triggered
    with a specially crafted IF query.  An attacker who can execute
    arbitrary SELECT statements may be able to leverage this issue to
    crash the affected service.");
      script_set_attribute(attribute:"see_also", value:"http://bugs.mysql.com/bug.php?id=27513");
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.0/en/news-5-0-41.html");
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.1/en/news-5-1-18.html");
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.0/en/news-5-0-40.html");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to MySQL Community Server 5.0.41 / 5.1.18 / Enterprise Server
    5.0.40 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:N/I:N/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_cwe_id(189);
    
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/05/10");
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/03/29");
    
      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) 2007-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("mysql_version.nasl", "mysql_login.nasl");
      script_require_ports("Services/mysql", 3306);
      script_require_keys("Settings/ParanoidReport");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    include("misc_func.inc");
    include("mysql_func.inc");
    
    
    # nb: banner checks of open source software are prone to false-
    #     positives so only run the check if reporting is paranoid.
    if (report_paranoia < 2)
      exit(1, "This plugin only runs if 'Report paranoia' is set to 'Paranoid'.");
    
    port = get_service(svc:"mysql", default:3306, exit_on_fail:TRUE);
    
    if (mysql_init(port:port, exit_on_fail:TRUE) == 1)
    {
      variant = mysql_get_variant();
      ver = mysql_get_version();
    
      if (
        (
          "Enterprise" >< variant && 
          ver =~ "^5\.0\.([0-9]|[1-3][0-9])($|[^0-9])"
        ) ||
        ver =~ "^5\.(0\.([0-9]|[1-3][0-9])|1\.([0-9]|1[1-7]))($|[^0-9])"
      )
      {
        report =
          '\nThe remote MySQL '+mysql_get_variant()+'\'s version is :\n'+
          '\n  '+ver+'\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);
      }
    }
    mysql_close();
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1413.NASL
    descriptionSeveral vulnerabilities have been found in the MySQL database packages with implications ranging from unauthorized database modifications to remotely triggered server crashes. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2007-2583 The in_decimal::set function in item_cmpfunc.cc in MySQL before 5.0.40 allows context-dependent attackers to cause a denial of service (crash) via a crafted IF clause that results in a divide-by-zero error and a NULL pointer dereference. (Affects source version 5.0.32.) - CVE-2007-2691 MySQL does not require the DROP privilege for RENAME TABLE statements, which allows remote authenticated users to rename arbitrary tables. (All supported versions affected.) - CVE-2007-2692 The mysql_change_db function does not restore THD::db_access privileges when returning from SQL SECURITY INVOKER stored routines, which allows remote authenticated users to gain privileges. (Affects source version 5.0.32.) - CVE-2007-3780 MySQL could be made to overflow a signed char during authentication. Remote attackers could use specially crafted authentication requests to cause a denial of service. (Upstream source versions 4.1.11a and 5.0.32 affected.) - CVE-2007-3782 Phil Anderton discovered that MySQL did not properly verify access privileges when accessing external tables. As a result, authenticated users could exploit this to obtain UPDATE privileges to external tables. (Affects source version 5.0.32.) - CVE-2007-5925 The convert_search_mode_to_innobase function in ha_innodb.cc in the InnoDB engine in MySQL 5.1.23-BK and earlier allows remote authenticated users to cause a denial of service (database crash) via a certain CONTAINS operation on an indexed column, which triggers an assertion error. (Affects source version 5.0.32.)
    last seen2020-06-01
    modified2020-06-02
    plugin id28336
    published2007-11-29
    reporterThis script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/28336
    titleDebian DSA-1413-1 : mysql - multiple vulnerabilities
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2007-139.NASL
    descriptionMySQL 5.x before 5.0.36 allows local users to cause a denial of service (database crash) by performing information_schema table subselects and using ORDER BY to sort a single-row result, which prevents certain structure elements from being initialized and triggers a NULL dereference in the filesort function. This issue does not affect MySQL 5.0.37 in Mandriva Linux 2007.1. (CVE-2007-1420) The in_decimal::set function in item_cmpfunc.cc in MySQL before 5.0.40, and 5.1 before 5.1.18-beta, allows context-dependent attackers to cause a denial of service (crash) via a crafted IF clause that results in a divide-by-zero error and a NULL pointer dereference. (CVE-2007-2583) MySQL before 4.1.23, 5.0.x before 5.0.42, and 5.1.x before 5.1.18 does not require the DROP privilege for RENAME TABLE statements, which allows remote authenticated users to rename arbitrary tables. (CVE-2007-2691) Updated packages have been patched to prevent the above issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id25669
    published2007-07-05
    reporterThis script is Copyright (C) 2007-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/25669
    titleMandrake Linux Security Advisory : MySQL (MDKSA-2007:139)
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20080521_MYSQL_ON_SL5_X.NASL
    descriptionMySQL did not require privileges such as
    last seen2020-06-01
    modified2020-06-02
    plugin id60406
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60406
    titleScientific Linux Security Update : mysql on SL5.x i386/x86_64
  • NASL familySuSE Local Security Checks
    NASL idSUSE_MYSQL-4879.NASL
    descriptionThis update fixes several security vulnerabilities (note: not all versions are affected by every bug) : - CVE-2007-2583 - CVE-2007-2691 - CVE-2007-2692 - CVE-2007-5925 - CVE-2007-5969 - CVE-2007-6303 - CVE-2007-6304
    last seen2020-06-01
    modified2020-06-02
    plugin id30182
    published2008-02-05
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/30182
    titleSuSE 10 Security Update : MySQL (ZYPP Patch Number 4879)
  • NASL familyDatabases
    NASL idMYSQL_5_0_40.NASL
    descriptionThe version of MySQL installed on the remote host is reportedly affected by several issues : - Evaluation of an
    last seen2020-06-01
    modified2020-06-02
    plugin id17832
    published2012-01-18
    reporterThis script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/17832
    titleMySQL 5.0 < 5.0.40 Multiple Vulnerabilities
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2008-0364.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 low security impact by the Red Hat Security Response Team. MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld), and many different client programs and libraries. MySQL did not require privileges such as
    last seen2020-06-01
    modified2020-06-02
    plugin id32425
    published2008-05-22
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/32425
    titleRHEL 5 : mysql (RHSA-2008:0364)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-528-1.NASL
    descriptionNeil Kettle discovered that MySQL could be made to dereference a NULL pointer and divide by zero. An authenticated user could exploit this with a crafted IF clause, leading to a denial of service. (CVE-2007-2583) Victoria Reznichenko discovered that MySQL did not always require the DROP privilege. An authenticated user could exploit this via RENAME TABLE statements to rename arbitrary tables, possibly gaining additional database access. (CVE-2007-2691) It was discovered that MySQL could be made to overflow a signed char during authentication. Remote attackers could use crafted authentication requests to cause a denial of service. (CVE-2007-3780) Phil Anderton discovered that MySQL did not properly verify access privileges when accessing external tables. As a result, authenticated users could exploit this to obtain UPDATE privileges to external tables. (CVE-2007-3782) In certain situations, when installing or upgrading mysql, there was no notification that the mysql root user password needed to be set. If the password was left unset, attackers would be able to obtain unrestricted access to mysql. This is now checked during mysql start-up. 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 id28133
    published2007-11-10
    reporterUbuntu Security Notice (C) 2007-2019 Canonical, Inc. / NASL script (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/28133
    titleUbuntu 6.06 LTS / 6.10 / 7.04 : mysql-dfsg-5.0 vulnerabilities (USN-528-1)
  • NASL familySuSE Local Security Checks
    NASL idSUSE9_12044.NASL
    descriptionThis update fixes several security vulnerabilities (note: not all versions are affected by every bug) : - CVE-2007-2583 - CVE-2007-2691 - CVE-2007-2692 - CVE-2007-5925 - CVE-2007-5969 - CVE-2007-6303 - CVE-2007-6304
    last seen2020-06-01
    modified2020-06-02
    plugin id41184
    published2009-09-24
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/41184
    titleSuSE9 Security Update : MySQL (YOU Patch Number 12044)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_LIBMYSQLCLIENT-DEVEL-4873.NASL
    descriptionThis update fixes several security vulnerabilities (note: not all versions are affected by every bug) : - CVE-2007-2583 - CVE-2007-2691 - CVE-2007-2692 - CVE-2007-5925 - CVE-2007-5969 - CVE-2007-6303 - CVE-2007-6304
    last seen2020-06-01
    modified2020-06-02
    plugin id30180
    published2008-02-05
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/30180
    titleopenSUSE 10 Security Update : libmysqlclient-devel (libmysqlclient-devel-4873)

Oval

accepted2013-04-29T04:23:24.805-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 5
    ovaloval:org.mitre.oval:def:11414
  • commentThe operating system installed on the system is CentOS Linux 5.x
    ovaloval:org.mitre.oval:def:15802
  • commentOracle Linux 5.x
    ovaloval:org.mitre.oval:def:15459
descriptionThe in_decimal::set function in item_cmpfunc.cc in MySQL before 5.0.40, and 5.1 before 5.1.18-beta, allows context-dependent attackers to cause a denial of service (crash) via a crafted IF clause that results in a divide-by-zero error and a NULL pointer dereference.
familyunix
idoval:org.mitre.oval:def:9930
statusaccepted
submitted2010-07-09T03:56:16-04:00
titleThe in_decimal::set function in item_cmpfunc.cc in MySQL before 5.0.40, and 5.1 before 5.1.18-beta, allows context-dependent attackers to cause a denial of service (crash) via a crafted IF clause that results in a divide-by-zero error and a NULL pointer dereference.
version18

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/124295/mysql50x-dos.txt
idPACKETSTORM:124295
last seen2016-12-05
published2013-12-05
reporterNeil Kettle
sourcehttps://packetstormsecurity.com/files/124295/MySQL-5.0.x-Denial-Of-Service.html
titleMySQL 5.0.x Denial Of Service

Redhat

advisories
rhsa
idRHSA-2008:0364
rpms
  • mysql-0:5.0.45-7.el5
  • mysql-bench-0:5.0.45-7.el5
  • mysql-debuginfo-0:5.0.45-7.el5
  • mysql-devel-0:5.0.45-7.el5
  • mysql-server-0:5.0.45-7.el5
  • mysql-test-0:5.0.45-7.el5

Statements

contributorJoshua Bressers
lastmodified2008-07-25
organizationRed Hat
statementThis issue did not affect mysql packages as shipped in Red Hat Enterprise Linux 2.1, 3, and 4. Issue was addressed in mysql packages as shipped in Red Hat Enterprise Linux 5 via: https://rhn.redhat.com/errata/RHSA-2008-0364.html