Vulnerabilities > CVE-2004-0835 - Local vulnerability in MySQL
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
PARTIAL Integrity impact
PARTIAL Availability impact
PARTIAL Summary
MySQL 3.x before 3.23.59, 4.x before 4.0.19, 4.1.x before 4.1.2, and 5.x before 5.0.1, checks the CREATE/INSERT rights of the original table instead of the target table in an ALTER TABLE RENAME operation, which could allow attackers to conduct unauthorized activities.
Vulnerable Configurations
Exploit-Db
description | MySQL 3.x/4.x ALTER TABLE/RENAME Forces Old Permission Checks. CVE-2004-0835. Remote exploit for linux platform |
id | EDB-ID:24669 |
last seen | 2016-02-02 |
modified | 2004-10-08 |
published | 2004-10-08 |
reporter | Oleksandr Byelkin |
source | https://www.exploit-db.com/download/24669/ |
title | MySQL 3.x/4.x ALTER TABLE/RENAME Forces Old Permission Checks |
Nessus
NASL family Debian Local Security Checks NASL id DEBIAN_DSA-562.NASL description Several problems have been discovered in MySQL, a commonly used SQL database on Unix servers. The following problems have been identified by the Common Vulnerabilities and Exposures Project : - CAN-2004-0835 Oleksandr Byelkin noticed that ALTER TABLE ... RENAME checks CREATE/INSERT rights of the old table instead of the new one. - CAN-2004-0836 Lukasz Wojtow noticed a buffer overrun in the mysql_real_connect function. - CAN-2004-0837 Dean Ellis noticed that multiple threads ALTERing the same (or different) MERGE tables to change the UNION can cause the server to crash or stall. last seen 2020-06-01 modified 2020-06-02 plugin id 15660 published 2004-11-10 reporter This script is Copyright (C) 2004-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/15660 title Debian DSA-562-1 : mysql - several vulnerabilities code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Debian Security Advisory DSA-562. The text # itself is copyright (C) Software in the Public Interest, Inc. # include("compat.inc"); if (description) { script_id(15660); script_version("1.19"); script_cvs_date("Date: 2019/08/02 13:32:18"); script_cve_id("CVE-2004-0835", "CVE-2004-0836", "CVE-2004-0837"); script_xref(name:"DSA", value:"562"); script_name(english:"Debian DSA-562-1 : mysql - several vulnerabilities"); script_summary(english:"Checks dpkg output for the updated package"); script_set_attribute( attribute:"synopsis", value:"The remote Debian host is missing a security-related update." ); script_set_attribute( attribute:"description", value: "Several problems have been discovered in MySQL, a commonly used SQL database on Unix servers. The following problems have been identified by the Common Vulnerabilities and Exposures Project : - CAN-2004-0835 Oleksandr Byelkin noticed that ALTER TABLE ... RENAME checks CREATE/INSERT rights of the old table instead of the new one. - CAN-2004-0836 Lukasz Wojtow noticed a buffer overrun in the mysql_real_connect function. - CAN-2004-0837 Dean Ellis noticed that multiple threads ALTERing the same (or different) MERGE tables to change the UNION can cause the server to crash or stall." ); script_set_attribute( attribute:"see_also", value:"http://www.debian.org/security/2004/dsa-562" ); script_set_attribute( attribute:"solution", value: "Upgrade the mysql and related packages and restart services linking against them (e.g. Apache/PHP). For the stable distribution (woody) these problems have been fixed in version 3.23.49-8.8." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C"); script_cwe_id(119); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:mysql"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:3.0"); script_set_attribute(attribute:"patch_publication_date", value:"2004/10/11"); script_set_attribute(attribute:"plugin_publication_date", value:"2004/11/10"); script_set_attribute(attribute:"vuln_publication_date", value:"2004/06/04"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2004-2019 Tenable Network Security, Inc."); 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:"3.0", prefix:"libmysqlclient10", reference:"3.23.49-8.8")) flag++; if (deb_check(release:"3.0", prefix:"libmysqlclient10-dev", reference:"3.23.49-8.8")) flag++; if (deb_check(release:"3.0", prefix:"mysql-client", reference:"3.23.49-8.8")) flag++; if (deb_check(release:"3.0", prefix:"mysql-common", reference:"3.23.49-8.8")) flag++; if (deb_check(release:"3.0", prefix:"mysql-doc", reference:"3.23.49-8.5")) flag++; if (deb_check(release:"3.0", prefix:"mysql-server", reference:"3.23.49-8.8")) flag++; if (flag) { if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get()); else security_hole(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2004-597.NASL description Updated mysql packages that fix various security issues, as well as a number of bugs, are now available for Red Hat Enterprise Linux 2.1. MySQL is a multi-user, multi-threaded SQL database server. A number security issues that affect the mysql server have been reported : Oleksandr Byelkin discovered that last seen 2020-06-01 modified 2020-06-02 plugin id 15536 published 2004-10-21 reporter This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/15536 title RHEL 2.1 : mysql (RHSA-2004:597) 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-2004:597. The text # itself is copyright (C) Red Hat, Inc. # include("compat.inc"); if (description) { script_id(15536); script_version ("1.28"); script_cvs_date("Date: 2019/10/25 13:36:10"); script_cve_id("CVE-2004-0381", "CVE-2004-0388", "CVE-2004-0457", "CVE-2004-0835", "CVE-2004-0836", "CVE-2004-0837", "CVE-2004-0957"); script_xref(name:"RHSA", value:"2004:597"); script_name(english:"RHEL 2.1 : mysql (RHSA-2004:597)"); 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, as well as a number of bugs, are now available for Red Hat Enterprise Linux 2.1. MySQL is a multi-user, multi-threaded SQL database server. A number security issues that affect the mysql server have been reported : Oleksandr Byelkin discovered that 'ALTER TABLE ... RENAME' checked the CREATE/INSERT rights of the old table instead of the new one. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2004-0835 to this issue. Lukasz Wojtow discovered a buffer overrun in the mysql_real_connect function. In order to exploit this issue an attacker would need to force the use of a malicious DNS server (CVE-2004-0836). Dean Ellis discovered that multiple threads ALTERing the same (or different) MERGE tables to change the UNION could cause the server to crash or stall (CVE-2004-0837). Sergei Golubchik discovered that if a user is granted privileges to a database with a name containing an underscore ('_'), the user also gains the ability to grant privileges to other databases with similar names (CVE-2004-0957). Additionally, the following minor temporary file vulnerabilities were discovered : - Stan Bubroski and Shaun Colley found a temporary file vulnerability in the mysqlbug script (CVE-2004-0381). - A temporary file vulnerability was discovered in mysqld_multi (CVE-2004-0388). - Jeroen van Wolffelaar discovered an temporary file vulnerability in the mysqlhotcopy script when using the scp method (CVE-2004-0457). All users of mysql should upgrade to these updated packages, which resolve these issues and also include fixes for a number of small bugs." ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0381" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0388" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0457" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0835" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0836" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0837" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2004-0957" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/errata/RHSA-2004:597" ); script_set_attribute( attribute:"solution", value:"Update the affected mysql, mysql-devel and / or mysql-server packages." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E: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(119); 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-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:mysql-server"); script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:2.1"); script_set_attribute(attribute:"vuln_publication_date", value:"2004/05/04"); script_set_attribute(attribute:"patch_publication_date", value:"2004/10/20"); script_set_attribute(attribute:"plugin_publication_date", value:"2004/10/21"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2004-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:"^2\.1([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 2.1", "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); if (cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i386", cpu); yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo"); if (!empty_or_null(yum_updateinfo)) { rhsa = "RHSA-2004:597"; 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:"RHEL2.1", cpu:"i386", reference:"mysql-3.23.58-1.72.1")) flag++; if (rpm_check(release:"RHEL2.1", cpu:"i386", reference:"mysql-devel-3.23.58-1.72.1")) flag++; if (rpm_check(release:"RHEL2.1", cpu:"i386", reference:"mysql-server-3.23.58-1.72.1")) 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-devel / mysql-server"); } }
NASL family Solaris Local Security Checks NASL id SOLARIS10_X86_120293.NASL description SunOS 5.10_x86 : mysql patch. Date this patch was last updated by Sun : Jun/27/08 This plugin has been deprecated and either replaced with individual 120293 patch-revision plugins, or deemed non-security related. last seen 2019-02-21 modified 2018-07-30 plugin id 19452 published 2005-08-18 reporter Tenable source https://www.tenable.com/plugins/index.php?view=single&id=19452 title Solaris 10 (x86) : 120293-02 (deprecated) NASL family Solaris Local Security Checks NASL id SOLARIS10_120292-02.NASL description SunOS 5.10 : mysql patch. Date this patch was last updated by Sun : Jun/27/08 last seen 2020-06-01 modified 2020-06-02 plugin id 107361 published 2018-03-12 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/107361 title Solaris 10 (sparc) : 120292-02 NASL family Databases NASL id MYSQL_MULTIPLE_FLAWS2.NASL description The remote host is running a version of the MySQL database which is older than 4.0.21 or 3.23.59. MySQL is a database which runs on both Linux/BSD and Windows platform. The remote version of this software is vulnerable to specially crafted last seen 2020-06-01 modified 2020-06-02 plugin id 15449 published 2004-10-11 reporter This script is Copyright (C) 2004-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/15449 title MySQL < 3.23.59 / 4.0.21 Multiple Vulnerabilities NASL family Solaris Local Security Checks NASL id SOLARIS10_X86_120293-02.NASL description SunOS 5.10_x86 : mysql patch. Date this patch was last updated by Sun : Jun/27/08 last seen 2020-06-01 modified 2020-06-02 plugin id 107863 published 2018-03-12 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/107863 title Solaris 10 (x86) : 120293-02 NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2004-611.NASL description An updated mysql-server package that fixes various security issues is now available in the Red Hat Enterprise Linux 3 Extras channel of Red Hat Network. MySQL is a multi-user, multi-threaded SQL database server. A number of security issues that affect the mysql-server package have been reported. Although Red Hat Enterprise Linux 3 does not ship with the mysql-server package, the affected package is available from the Red Hat Network Extras channel. Oleksandr Byelkin discovered that last seen 2020-06-01 modified 2020-06-02 plugin id 15631 published 2004-11-04 reporter This script is Copyright (C) 2004-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/15631 title RHEL 3 : mysql-server (RHSA-2004:611) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_035D17B2484A11D9813C00065BE4B5B6.NASL description A Red Hat advisory reports : Oleksandr Byelkin discovered that last seen 2020-06-01 modified 2020-06-02 plugin id 18823 published 2005-07-13 reporter This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/18823 title FreeBSD : mysql -- erroneous access restrictions applied to table renames (035d17b2-484a-11d9-813c-00065be4b5b6) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2004-569.NASL description Updated mysql packages that fix various temporary file security issues, as well as a number of bugs, are now available. MySQL is a multi-user, multi-threaded SQL database server. This update fixes a number of small bugs, including some potential security problems associated with careless handling of temporary files. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the names CVE-2004-0381, CVE-2004-0388, and CVE-2004-0457 to these issues. A number of additional security issues that affect mysql have been corrected in the source package. These include CVE-2004-0835, CVE-2004-0836, CVE-2004-0837, and CVE-2004-0957. Red Hat Enterprise Linux 3 does not ship with the mysql-server package and is therefore not affected by these issues. This update also allows 32-bit and 64-bit libraries to be installed concurrently on the same system. All users of mysql should upgrade to these updated packages, which resolve these issues. last seen 2020-06-01 modified 2020-06-02 plugin id 15534 published 2004-10-21 reporter This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/15534 title RHEL 3 : mysql (RHSA-2004:569) NASL family Mandriva Local Security Checks NASL id MANDRAKE_MDKSA-2004-119.NASL description A number of problems have been discovered in the MySQL database server : Jeroen van Wolffelaar discovered an insecure temporary file vulnerability in the mysqlhotcopy script when using the scp method (CVE-2004-0457). Oleksandr Byelkin discovered that the last seen 2020-06-01 modified 2020-06-02 plugin id 15599 published 2004-11-02 reporter This script is Copyright (C) 2004-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/15599 title Mandrake Linux Security Advisory : MySQL (MDKSA-2004:119) NASL family Solaris Local Security Checks NASL id SOLARIS10_120292.NASL description SunOS 5.10 : mysql patch. Date this patch was last updated by Sun : Jun/27/08 This plugin has been deprecated and either replaced with individual 120292 patch-revision plugins, or deemed non-security related. last seen 2019-02-21 modified 2018-07-30 plugin id 19447 published 2005-08-18 reporter Tenable source https://www.tenable.com/plugins/index.php?view=single&id=19447 title Solaris 10 (sparc) : 120292-02 (deprecated) NASL family Fedora Local Security Checks NASL id FEDORA_2004-530.NASL description - Tue Oct 12 2004 Tom Lane <tgl at redhat.com> 3.23.58-9.1 - fix security issues CVE-2004-0835, CVE-2004-0836, CVE-2004-0837 (bugs #135372, 135375, 135387) - fix privilege escalation on GRANT ALL ON `Foo\_Bar` (CVE-2004-0957) - fix multilib problem with mysqlbug and mysql_config - adjust chkconfig priority per bug #128852 - remove bogus quoting per bug #129409 (MySQL 4.0 has done likewise) - add sleep to mysql.init restart(); may or may not fix bug #133993 - fix low-priority security issues CVE-2004-0388, CVE-2004-0381, CVE-2004-0457 (bugs #119442, 125991, 130347, 130348) - fix bug with dropping databases under recent kernels (bug #124352) Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 15930 published 2004-12-09 reporter This script is Copyright (C) 2004-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/15930 title Fedora Core 2 : mysql-3.23.58-9.1 (2004-530) NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-200410-22.NASL description The remote host is affected by the vulnerability described in GLSA-200410-22 (MySQL: Multiple vulnerabilities) The following vulnerabilities were found and fixed in MySQL: Oleksandr Byelkin found that ALTER TABLE ... RENAME checks CREATE/INSERT rights of the old table instead of the new one (CAN-2004-0835). Another privilege checking bug allowed users to grant rights on a database they had no rights on. Dean Ellis found a defect where multiple threads ALTERing the MERGE tables to change the UNION could cause the server to crash (CAN-2004-0837). Another crash was found in MATCH ... AGAINST() queries with missing closing double quote. Finally, a buffer overrun in the mysql_real_connect function was found by Lukasz Wojtow (CAN-2004-0836). Impact : The privilege checking issues could be used by remote users to bypass their rights on databases. The two crashes issues could be exploited by a remote user to perform a Denial of Service attack on MySQL server. The buffer overrun issue could also be exploited as a Denial of Service attack, and may allow to execute arbitrary code with the rights of the MySQL daemon (typically, the last seen 2020-06-01 modified 2020-06-02 plugin id 15558 published 2004-10-25 reporter This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/15558 title GLSA-200410-22 : MySQL: Multiple vulnerabilities
Redhat
advisories |
|
References
- http://bugs.mysql.com/bug.php?id=3270
- http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000892
- http://lists.mysql.com/internals/13073
- http://secunia.com/advisories/12783/
- http://securitytracker.com/id?1011606
- http://sunsolve.sun.com/search/document.do?assetkey=1-26-101864-1
- http://www.ciac.org/ciac/bulletins/p-018.shtml
- http://www.debian.org/security/2004/dsa-562
- http://www.gentoo.org/security/en/glsa/glsa-200410-22.xml
- http://www.mysql.org/doc/refman/4.1/en/news-4-0-19.html
- http://www.mysql.org/doc/refman/4.1/en/news-4-1-2.html
- http://www.redhat.com/support/errata/RHSA-2004-597.html
- http://www.redhat.com/support/errata/RHSA-2004-611.html
- http://www.securityfocus.com/bid/11357
- http://www.trustix.org/errata/2004/0054/
- https://exchange.xforce.ibmcloud.com/vulnerabilities/17666