Vulnerabilities > CVE-2005-1636

047910
CVSS 4.6 - MEDIUM
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
local
low complexity
mysql
oracle
nessus

Summary

mysql_install_db in MySQL 4.1.x before 4.1.12 and 5.x up to 5.0.4 creates the mysql_install_db.X file with a predictable filename and insecure permissions, which allows local users to execute arbitrary SQL commands by modifying the file's contents.

Nessus

  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_EEAE6CCED05C11D99AED000E0C2E438A.NASL
    descriptionA Zataz advisory reports that MySQL contains a security flaw which could allow a malicious local user to inject arbitrary SQL commands during the initial database creation process. The problem lies in the mysql_install_db script which creates temporary files based on the PID used by the script.
    last seen2020-06-01
    modified2020-06-02
    plugin id19160
    published2005-07-13
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19160
    titleFreeBSD : mysql-server -- insecure temporary file creation (eeae6cce-d05c-11d9-9aed-000e0c2e438a)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(19160);
      script_version("1.15");
      script_cvs_date("Date: 2019/08/02 13:32:38");
    
      script_cve_id("CVE-2005-1636");
      script_bugtraq_id(13660);
    
      script_name(english:"FreeBSD : mysql-server -- insecure temporary file creation (eeae6cce-d05c-11d9-9aed-000e0c2e438a)");
      script_summary(english:"Checks for updated packages in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote FreeBSD host is missing one or more security-related
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "A Zataz advisory reports that MySQL contains a security flaw which
    could allow a malicious local user to inject arbitrary SQL commands
    during the initial database creation process.
    
    The problem lies in the mysql_install_db script which creates
    temporary files based on the PID used by the script."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.zataz.net/adviso/mysql-05172005.txt"
      );
      # https://vuxml.freebsd.org/freebsd/eeae6cce-d05c-11d9-9aed-000e0c2e438a.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?da2a41ff"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:ND");
      script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:mysql-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/05/07");
      script_set_attribute(attribute:"patch_publication_date", value:"2005/07/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/07/13");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"mysql-server>4.1<4.1.12")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"mysql-server>5.0<5.0.6")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-685.NASL
    descriptionUpdated mysql packages that fix a temporary file flaw and a number of bugs are now available. 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. An insecure temporary file handling bug was found in the mysql_install_db script. It is possible for a local user to create specially crafted files in /tmp which could allow them to execute arbitrary SQL commands during database installation. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-1636 to this issue. These packages update mysql to version 4.1.12, fixing a number of problems. Also, support for SSL-encrypted connections to the database server is now provided. All users of mysql are advised to upgrade to these updated packages.
    last seen2020-06-01
    modified2020-06-02
    plugin id19993
    published2005-10-11
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19993
    titleRHEL 4 : mysql (RHSA-2005:685)
    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-2005:685. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(19993);
      script_version ("1.23");
      script_cvs_date("Date: 2019/10/25 13:36:11");
    
      script_cve_id("CVE-2005-1636");
      script_xref(name:"RHSA", value:"2005:685");
    
      script_name(english:"RHEL 4 : mysql (RHSA-2005:685)");
      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 a temporary file flaw and a number of
    bugs are now available.
    
    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.
    
    An insecure temporary file handling bug was found in the
    mysql_install_db script. It is possible for a local user to create
    specially crafted files in /tmp which could allow them to execute
    arbitrary SQL commands during database installation. The Common
    Vulnerabilities and Exposures project (cve.mitre.org) has assigned the
    name CVE-2005-1636 to this issue.
    
    These packages update mysql to version 4.1.12, fixing a number of
    problems. Also, support for SSL-encrypted connections to the database
    server is now provided.
    
    All users of mysql are advised to upgrade to these updated packages."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2005-1636"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2005:685"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/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: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:"cpe:/o:redhat:enterprise_linux:4");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/05/17");
      script_set_attribute(attribute:"patch_publication_date", value:"2005/10/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/10/11");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-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:"^4([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 4.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-2005:685";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          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:"RHEL4", reference:"mysql-4.1.12-3.RHEL4.1")) flag++;
      if (rpm_check(release:"RHEL4", reference:"mysql-bench-4.1.12-3.RHEL4.1")) flag++;
      if (rpm_check(release:"RHEL4", reference:"mysql-devel-4.1.12-3.RHEL4.1")) flag++;
      if (rpm_check(release:"RHEL4", reference:"mysql-server-4.1.12-3.RHEL4.1")) flag++;
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          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");
      }
    }
    
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2006-045.NASL
    descriptionEric Romang discovered a temporary file vulnerability in the mysql_install_db script provided with MySQL. This vulnerability only affects versions of MySQL 4.1.x prior to 4.1.12. The updated packages have been patched to address this issue.
    last seen2017-10-29
    modified2012-09-07
    plugin id20963
    published2006-02-22
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=20963
    titleMDKSA-2006:045 : MySQL
    code
    #%NASL_MIN_LEVEL 999999
    
    # @DEPRECATED@
    #
    # This script has been deprecated as the associated update is not
    # for a supported release of Mandrake / Mandriva Linux.
    #
    # Disabled on 2012/09/06.
    #
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # This script was automatically generated from
    # Mandrake Linux Security Advisory MDKSA-2006:045.
    #
    
    if (!defined_func("bn_random")) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(20963);
      script_version ("1.11");
      script_cvs_date("Date: 2018/07/20  0:18:52");
    
      script_cve_id("CVE-2005-1636");
    
      script_name(english:"MDKSA-2006:045 : MySQL");
      script_summary(english:"Checks for patch(es) in 'rpm -qa' output");
    
      script_set_attribute(attribute:"synopsis", value: 
    "The remote Mandrake host is missing one or more security-related
    patches.");
      script_set_attribute(attribute:"description", value:
    "Eric Romang discovered a temporary file vulnerability in the
    mysql_install_db script provided with MySQL. This vulnerability only
    affects versions of MySQL 4.1.x prior to 4.1.12.
    
    The updated packages have been patched to address this issue.");
      script_set_attribute(attribute:"see_also", value:"http://www.mandriva.com/security/advisories?name=MDKSA-2006:045");
      script_set_attribute(attribute:"solution", value:"Update the affected package(s).");
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P");
      script_set_attribute(attribute:"patch_publication_date", value:"2006/02/21");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux");
      script_set_attribute(attribute:"plugin_type", value:"local");
     script_set_attribute(attribute:"plugin_publication_date", value: "2006/02/22");
      script_end_attributes();
     
      script_category(ACT_GATHER_INFO);
      script_family(english:"Mandriva Local Security Checks");
     
      script_copyright(english:"This script is Copyright (C) 2006-2018 Tenable Network Security, Inc.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/Mandrake/release", "Host/Mandrake/rpm-list");
    
      exit(0);
    }
    
    # Deprecated.
    exit(0, "The associated update is not currently for a supported release of Mandrake / Mandriva Linux.");
    
    
    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/Mandrake/release")) exit(0, "The host is not running Mandrake Linux.");
    if (!get_kb_item("Host/Mandrake/rpm-list")) exit(1, "Could not get the list of packages.");
    
    flag = 0;
    
    if (rpm_check(reference:"libmysql14-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"libmysql14-devel-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"MySQL-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"MySQL-bench-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"MySQL-client-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"MySQL-common-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"MySQL-Max-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    if (rpm_check(reference:"MySQL-NDB-4.1.11-1.2.102mdk", release:"MDK10.2", cpu:"i386", yank:"mdk")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else 
    {
      if (rpm_exists(rpm:"MySQL-", release:"MDK10.2"))
      {
        set_kb_item(name:"CVE-2005-1636", value:TRUE);
      }
    
      exit(0, "The host is not affected.");
    }
    
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2005-685.NASL
    descriptionUpdated mysql packages that fix a temporary file flaw and a number of bugs are now available. 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. An insecure temporary file handling bug was found in the mysql_install_db script. It is possible for a local user to create specially crafted files in /tmp which could allow them to execute arbitrary SQL commands during database installation. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-1636 to this issue. These packages update mysql to version 4.1.12, fixing a number of problems. Also, support for SSL-encrypted connections to the database server is now provided. All users of mysql are advised to upgrade to these updated packages.
    last seen2020-06-01
    modified2020-06-02
    plugin id67032
    published2013-06-29
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/67032
    titleCentOS 4 : mysql (CESA-2005:685)
    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-2005:685 and 
    # CentOS Errata and Security Advisory 2005:685 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(67032);
      script_version("1.6");
      script_cvs_date("Date: 2019/10/25 13:36:02");
    
      script_cve_id("CVE-2005-1636");
      script_xref(name:"RHSA", value:"2005:685");
    
      script_name(english:"CentOS 4 : mysql (CESA-2005:685)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated mysql packages that fix a temporary file flaw and a number of
    bugs are now available.
    
    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.
    
    An insecure temporary file handling bug was found in the
    mysql_install_db script. It is possible for a local user to create
    specially crafted files in /tmp which could allow them to execute
    arbitrary SQL commands during database installation. The Common
    Vulnerabilities and Exposures project (cve.mitre.org) has assigned the
    name CVE-2005-1636 to this issue.
    
    These packages update mysql to version 4.1.12, fixing a number of
    problems. Also, support for SSL-encrypted connections to the database
    server is now provided.
    
    All users of mysql are advised to upgrade to these updated packages."
      );
      # https://lists.centos.org/pipermail/centos-announce/2005-October/012242.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?938bb962"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected mysql packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/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:centos:centos:mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:mysql-bench");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:mysql-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:mysql-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:4");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/05/17");
      script_set_attribute(attribute:"patch_publication_date", value:"2005/10/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/06/29");
      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:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/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/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^4([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 4.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && "ia64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"mysql-4.1.12-3.RHEL4.1")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"mysql-bench-4.1.12-3.RHEL4.1")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"mysql-devel-4.1.12-3.RHEL4.1")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"mysql-server-4.1.12-3.RHEL4.1")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      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");
    }
    
  • NASL familyDatabases
    NASL idMYSQL_5_0_4.NASL
    descriptionThe remote MySQL server is earlier than 4.1.12 / 5.0.4 and thus reportedly creates a temporary file with insecure permissions and a predictable name, which could allow a local user to run arbitrary SQL commands.
    last seen2020-06-01
    modified2020-06-02
    plugin id17805
    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/17805
    titleMySQL < 4.1.12 / 5.0.4 Insecure Permissions
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(17805);
      script_version("1.6");
      script_cvs_date("Date: 2018/11/15 20:50:21");
    
      script_cve_id("CVE-2005-1636");
      script_bugtraq_id(13660);
    
      script_name(english:"MySQL < 4.1.12 / 5.0.4 Insecure Permissions");
      script_summary(english:"Checks version of MySQL Server");
    
      script_set_attribute(attribute:"synopsis", value:
    "Arbitrary SQL commands may be run on the remote database server.");
      script_set_attribute(attribute:"description", value:
    "The remote MySQL server is earlier than 4.1.12 / 5.0.4 and thus
    reportedly creates a temporary file with insecure permissions and a
    predictable name, which could allow a local user to run arbitrary SQL
    commands.");
      script_set_attribute(attribute:"see_also", value:"https://marc.info/?l=full-disclosure&m=111632686805498&w=2");
      script_set_attribute(attribute:"solution", value:"Upgrade to MySQL version 4.1.12 / 5.0.4 or later.");
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/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_set_attribute(attribute:"vuln_publication_date", value:"2005/05/17");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/01/16");
    
      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) 2012-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("mysql_version.inc");
    
    mysql_check_version(fixed:make_list('4.1.12', '5.0.4'), severity:SECURITY_WARNING);
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-783.NASL
    descriptionEric Romang discovered a temporary file vulnerability in a script accompanied with MySQL, a popular database, that allows an attacker to execute arbitrary SQL commands when the server is installed or updated. The old stable distribution (woody) as well as mysql-dfsg are not affected by this problem.
    last seen2020-06-01
    modified2020-06-02
    plugin id19526
    published2005-08-30
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19526
    titleDebian DSA-783-1 : mysql-dfsg-4.1 - insecure temporary file

Oval

accepted2013-04-29T04:19:51.181-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 4
    ovaloval:org.mitre.oval:def:11831
  • commentCentOS Linux 4.x
    ovaloval:org.mitre.oval:def:16636
  • commentOracle Linux 4.x
    ovaloval:org.mitre.oval:def:15990
descriptionmysql_install_db in MySQL 4.1.x before 4.1.12 and 5.x up to 5.0.4 creates the mysql_install_db.X file with a predictable filename and insecure permissions, which allows local users to execute arbitrary SQL commands by modifying the file's contents.
familyunix
idoval:org.mitre.oval:def:9504
statusaccepted
submitted2010-07-09T03:56:16-04:00
titlemysql_install_db in MySQL 4.1.x before 4.1.12 and 5.x up to 5.0.4 creates the mysql_install_db.X file with a predictable filename and insecure permissions, which allows local users to execute arbitrary SQL commands by modifying the file's contents.
version26

Redhat

advisories
rhsa
idRHSA-2005:685
rpms
  • mysql-0:4.1.12-3.RHEL4.1
  • mysql-bench-0:4.1.12-3.RHEL4.1
  • mysql-debuginfo-0:4.1.12-3.RHEL4.1
  • mysql-devel-0:4.1.12-3.RHEL4.1
  • mysql-server-0:4.1.12-3.RHEL4.1