Vulnerabilities > CVE-2007-2692 - Privilege Escalation vulnerability in MySQL Security Invoker

047910
CVSS 6.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
SINGLE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
mysql
oracle
nessus

Summary

The mysql_change_db function in MySQL 5.0.x before 5.0.40 and 5.1.x before 5.1.18 does not restore THD::db_access privileges when returning from SQL SECURITY INVOKER stored routines, which allows remote authenticated users to gain privileges.

Nessus

  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-588-1.NASL
    descriptionMasaaki Hirose discovered that MySQL could be made to dereference a NULL pointer. An authenticated user could cause a denial of service (application crash) via an EXPLAIN SELECT FROM on the INFORMATION_SCHEMA table. This issue only affects Ubuntu 6.06 and 6.10. (CVE-2006-7232) Alexander Nozdrin discovered that MySQL did not restore database access privileges when returning from SQL SECURITY INVOKER stored routines. An authenticated user could exploit this to gain privileges. This issue does not affect Ubuntu 7.10. (CVE-2007-2692) Martin Friebe discovered that MySQL did not properly update the DEFINER value of an altered view. An authenticated user could use CREATE SQL SECURITY DEFINER VIEW and ALTER VIEW statements to gain privileges. (CVE-2007-6303) Luigi Auriemma discovered that yaSSL as included in MySQL did not properly validate its input. A remote attacker could send crafted requests and cause a denial of service or possibly execute arbitrary code. This issue did not affect Ubuntu 6.06 in the default installation. (CVE-2008-0226, CVE-2008-0227). 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 id31638
    published2008-03-21
    reporterUbuntu Security Notice (C) 2008-2019 Canonical, Inc. / NASL script (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/31638
    titleUbuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1)
  • 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
  • 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
  • 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 familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-588-2.NASL
    descriptionUSN-588-1 fixed vulnerabilities in MySQL. In fixing CVE-2007-2692 for Ubuntu 6.06, additional improvements were made to make privilege checks more restictive. As a result, an upstream bug was exposed which could cause operations on tables or views in a different database to fail. This update fixes the problem. We apologize for the inconvenience. Masaaki Hirose discovered that MySQL could be made to dereference a NULL pointer. An authenticated user could cause a denial of service (application crash) via an EXPLAIN SELECT FROM on the INFORMATION_SCHEMA table. This issue only affects Ubuntu 6.06 and 6.10. (CVE-2006-7232) Alexander Nozdrin discovered that MySQL did not restore database access privileges when returning from SQL SECURITY INVOKER stored routines. An authenticated user could exploit this to gain privileges. This issue does not affect Ubuntu 7.10. (CVE-2007-2692) Martin Friebe discovered that MySQL did not properly update the DEFINER value of an altered view. An authenticated user could use CREATE SQL SECURITY DEFINER VIEW and ALTER VIEW statements to gain privileges. (CVE-2007-6303) Luigi Auriemma discovered that yaSSL as included in MySQL did not properly validate its input. A remote attacker could send crafted requests and cause a denial of service or possibly execute arbitrary code. This issue did not affect Ubuntu 6.06 in the default installation. (CVE-2008-0226, CVE-2008-0227). 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 id31783
    published2008-04-04
    reporterUbuntu Security Notice (C) 2008-2019 Canonical, Inc. / NASL script (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/31783
    titleUbuntu 6.06 LTS : mysql-dfsg-5.0 regression (USN-588-2)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2007-177.NASL
    descriptionA vulnerability was found in MySQL
    last seen2020-06-01
    modified2020-06-02
    plugin id26009
    published2007-09-07
    reporterThis script is Copyright (C) 2007-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/26009
    titleMandrake Linux Security Advisory : MySQL (MDKSA-2007:177)
  • 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 familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2008-028.NASL
    descriptionThe mysql_change_db() function in MySQL 5.0.x before 5.0.40 did not restore THD::db_access privileges when returning from SQL SECURITY INVOKER stored routines, which allowed remote authenticated users to gain privileges (CVE-2007-2692). The federated engine in MySQL 5.0.x, when performing a certain SHOW TABLE STATUS query, did not properly handle a response with a small number of columns, which could allow a remote MySQL server to cause a denial of service (federated handler crash and daemon crash) via a response that lacks the minimum required number of columns (CVE-2007-6304). The updated packages provide MySQL 5.0.45 for all Mandriva Linux platforms that shipped with MySQL 5.0.x which offers a number of feature enhancements and bug fixes. In addition, the updates for Corporate Server 4.0 include support for the Sphinx engine. Please note that due to the package name change (from
    last seen2020-06-01
    modified2020-06-02
    plugin id36399
    published2009-04-23
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/36399
    titleMandriva Linux Security Advisory : mysql (MDVSA-2008:028)
  • 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 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:18:24.000-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 mysql_change_db function in MySQL 5.0.x before 5.0.40 and 5.1.x before 5.1.18 does not restore THD::db_access privileges when returning from SQL SECURITY INVOKER stored routines, which allows remote authenticated users to gain privileges.
familyunix
idoval:org.mitre.oval:def:9166
statusaccepted
submitted2010-07-09T03:56:16-04:00
titleThe mysql_change_db function in MySQL 5.0.x before 5.0.40 and 5.1.x before 5.1.18 does not restore THD::db_access privileges when returning from SQL SECURITY INVOKER stored routines, which allows remote authenticated users to gain privileges.
version18

Redhat

advisories
  • rhsa
    idRHSA-2007:0894
  • rhsa
    idRHSA-2008:0364
rpms
  • mysql-0:5.0.44-1.el4s1.1
  • mysql-bench-0:5.0.44-1.el4s1.1
  • mysql-cluster-0:5.0.44-1.el4s1.1
  • mysql-debuginfo-0:5.0.44-1.el4s1.1
  • mysql-devel-0:5.0.44-1.el4s1.1
  • mysql-libs-0:5.0.44-1.el4s1.1
  • mysql-server-0:5.0.44-1.el4s1.1
  • mysql-test-0:5.0.44-1.el4s1.1
  • 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. Affected mysql packages as shipped in Red Hat Enterprise Linux 5 and Red Hat Application Stack were fixed via: https://rhn.redhat.com/errata/CVE-2007-2692.html