Vulnerabilities > CVE-2012-4414 - SQL Injection vulnerability in multiple products

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

Multiple SQL injection vulnerabilities in the replication code in Oracle MySQL possibly before 5.5.29, and MariaDB 5.1.x through 5.1.62, 5.2.x through 5.2.12, 5.3.x through 5.3.7, and 5.5.x through 5.5.25, allow remote authenticated users to execute arbitrary SQL commands via vectors related to the binary log. NOTE: as of 20130116, Oracle has not commented on claims from a downstream vendor that the fix in MySQL 5.5.29 is incomplete.

Vulnerable Configurations

Part Description Count
Application
Oracle
437
Application
Mariadb
39

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:

Nessus

  • NASL familyDatabases
    NASL idMARIADB_BINARY_LOG_SQLI.NASL
    descriptionAccording to its self-reported version number, the version of MariaDB running on the remote host has multiple SQL injection vulnerabilities. User-supplied identifiers are not properly quoted before being written into the binary log. An attacker with a valid account and privileges to modify data could exploit this to modify tables that they should not have access to.
    last seen2020-06-01
    modified2020-06-02
    plugin id64502
    published2013-02-08
    reporterThis script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/64502
    titleMariaDB Binary Log SQL Injection
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(64502);
      script_version("1.7");
      script_cvs_date("Date: 2018/11/15 20:50:21");
    
      script_cve_id("CVE-2012-4414");
      script_bugtraq_id(55498);
    
      script_name(english:"MariaDB Binary Log SQL Injection");
      script_summary(english:"Checks version of MariaDB");
    
      script_set_attribute(attribute:"synopsis", value:
    "The database server running on the remote host is affected by multiple
    SQL injection vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version number, the version of MariaDB
    running on the remote host has multiple SQL injection vulnerabilities.
    User-supplied identifiers are not properly quoted before being written
    into the binary log. An attacker with a valid account and privileges
    to modify data could exploit this to modify tables that they should
    not have access to.");
      script_set_attribute(attribute:"see_also", value:"https://mariadb.atlassian.net/browse/MDEV-382");
      script_set_attribute(attribute:"see_also", value:"https://www.openwall.com/lists/oss-security/2012/09/11/4");
      script_set_attribute(attribute:"solution", value:"Upgrade to MariaDB 5.5.27 / 5.3.8 / 5.2.13 / 5.1.66 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/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:"2012/09/11");  
      script_set_attribute(attribute:"patch_publication_date", value:"2012/09/10"); 
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/02/08");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:mariadb:mariadb");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Databases");
    
      script_copyright(english:"This script is Copyright (C) 2013-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("mysql_version.inc");
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    port = get_service(svc:"mysql", default:3306, exit_on_fail:TRUE);
    mysql_init(port:port, exit_on_fail:TRUE);
    
    if (!is_mariadb()) audit(AUDIT_NOT_LISTEN, 'MariaDB', port);
    
    ver = mysql_get_version();
    if (isnull(ver)) exit(1, 'Failed to get the version from the MariaDB server listening on port '+port+'.');
    
    # Fix up MariaDB version.
    real_ver = ver;
    match = eregmatch(pattern:"^5\.5\.5-([0-9]+\.[0-9]+\.[0-9]+)-MariaDB", string:ver);
    if (!isnull(match)) ver = match[1];
    
    if (mysql_ver_cmp(ver:ver, fix:'5.5.27', same_branch:TRUE) < 0)
       fix = '5.5.27-MariaDB';
    else if (mysql_ver_cmp(ver:ver, fix:'5.3.8', same_branch:TRUE)  < 0)
      fix = '5.3.8-MariaDB';
    else if (mysql_ver_cmp(ver:ver, fix:'5.2.13', same_branch:TRUE) < 0)
       fix = '5.2.13-MariaDB';
    else if (mysql_ver_cmp(ver:ver, fix:'5.1.66', same_branch:TRUE)  < 0)
       fix = '5.1.66-MariaDB';
    else
      fix = NULL;
    
    if (isnull(fix))
      audit(AUDIT_LISTEN_NOT_VULN, 'MariaDB', port, ver);
    else
      set_kb_item(name:'www/0/SQLInjection', value:TRUE);
    
    
    if (report_verbosity > 0)
    {
      ver_ui = ver;
      if (ver != real_ver) ver_ui += " (" + real_ver + ")";
    
      report =
        '\n  Installed version : ' + ver_ui +
        '\n  Fixed version     : ' + fix + '\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);
    
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2013-6.NASL
    descriptionMariaDB was updated to 5.5.28a, fixing bugs and security issues : - Release notes: http://kb.askmonty.org/v/mariadb-5528a-release-notes http://kb.askmonty.org/v/mariadb-5528-release-notes http://kb.askmonty.org/v/mariadb-5527-release-notes - Changelog: http://kb.askmonty.org/v/mariadb-5528a-changelog http://kb.askmonty.org/v/mariadb-5528-changelog http://kb.askmonty.org/v/mariadb-5527-changelog
    last seen2020-06-05
    modified2014-06-13
    plugin id75141
    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/75141
    titleopenSUSE Security Update : mariadb (openSUSE-SU-2013:0011-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-2013-6.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(75141);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2012-4414", "CVE-2012-5611");
    
      script_name(english:"openSUSE Security Update : mariadb (openSUSE-SU-2013:0011-1)");
      script_summary(english:"Check for the openSUSE-2013-6 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "MariaDB was updated to 5.5.28a, fixing bugs and security issues :
    
      - Release notes:
        http://kb.askmonty.org/v/mariadb-5528a-release-notes
        http://kb.askmonty.org/v/mariadb-5528-release-notes
        http://kb.askmonty.org/v/mariadb-5527-release-notes
    
      - Changelog:
        http://kb.askmonty.org/v/mariadb-5528a-changelog
        http://kb.askmonty.org/v/mariadb-5528-changelog
        http://kb.askmonty.org/v/mariadb-5527-changelog"
      );
      # http://kb.askmonty.org/v/mariadb-5527-changelog
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5527-changelog/"
      );
      # http://kb.askmonty.org/v/mariadb-5527-release-notes
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5527-release-notes/"
      );
      # http://kb.askmonty.org/v/mariadb-5528-changelog
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5528-changelog/"
      );
      # http://kb.askmonty.org/v/mariadb-5528-release-notes
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5528-release-notes/"
      );
      # http://kb.askmonty.org/v/mariadb-5528a-changelog
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5528a-changelog/"
      );
      # http://kb.askmonty.org/v/mariadb-5528a-release-notes
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5528a-release-notes/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=779476"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=792444"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2013-01/msg00003.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected mariadb packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/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:libmariadbclient18");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient18-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient18-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient18-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient_r18");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient_r18-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-bench");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-bench-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-client-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debug-version");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debug-version-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debugsource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-errormessages");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-test");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-test-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-tools");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-tools-debuginfo");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:12.2");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/12/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13");
      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\.2)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "12.2", 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.2", reference:"libmariadbclient18-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"libmariadbclient18-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"libmariadbclient_r18-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-bench-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-bench-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-client-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-client-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-debug-version-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-debug-version-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-debugsource-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-errormessages-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-test-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-test-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-tools-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", reference:"mariadb-tools-debuginfo-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"libmariadbclient18-32bit-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"libmariadbclient18-debuginfo-32bit-5.5.28a-1.4.1") ) flag++;
    if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"libmariadbclient_r18-32bit-5.5.28a-1.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, "mariadb");
    }
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1807-1.NASL
    descriptionMultiple security issues were discovered in MySQL and this update includes new upstream MySQL versions to fix these issues. MySQL has been updated to 5.1.69 in Ubuntu 10.04 LTS and Ubuntu 11.10. Ubuntu 12.04 LTS and Ubuntu 12.10 have been updated to MySQL 5.5.31. In addition to security fixes, the updated packages contain bug fixes, new features, and possibly incompatible changes. Please see the following for more information: http://dev.mysql.com/doc/relnotes/mysql/5.1/en/news-5-1-69.html http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html http://www.oracle.com/technetwork/topics/security/cpuapr2013-1899555.h tml. 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 id66215
    published2013-04-25
    reporterUbuntu Security Notice (C) 2013-2019 Canonical, Inc. / NASL script (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/66215
    titleUbuntu 10.04 LTS / 11.10 / 12.04 LTS / 12.10 : mysql-5.1, mysql-5.5, mysql-dfsg-5.1 vulnerabilities (USN-1807-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-1807-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(66215);
      script_version("1.17");
      script_cvs_date("Date: 2019/09/19 12:54:29");
    
      script_cve_id("CVE-2012-0553", "CVE-2012-4414", "CVE-2012-5613", "CVE-2012-5615", "CVE-2012-5627", "CVE-2013-1492", "CVE-2013-1502", "CVE-2013-1506", "CVE-2013-1511", "CVE-2013-1512", "CVE-2013-1521", "CVE-2013-1523", "CVE-2013-1526", "CVE-2013-1532", "CVE-2013-1544", "CVE-2013-1552", "CVE-2013-1555", "CVE-2013-1623", "CVE-2013-1861", "CVE-2013-2375", "CVE-2013-2376", "CVE-2013-2378", "CVE-2013-2389", "CVE-2013-2391", "CVE-2013-2392");
      script_bugtraq_id(55498, 56766, 56771, 56837, 57780, 58511, 58594, 58595, 59180, 59188, 59196, 59201, 59207, 59209, 59210, 59211, 59217, 59218, 59224, 59225, 59227, 59229, 59237, 59239, 59242);
      script_xref(name:"USN", value:"1807-1");
    
      script_name(english:"Ubuntu 10.04 LTS / 11.10 / 12.04 LTS / 12.10 : mysql-5.1, mysql-5.5, mysql-dfsg-5.1 vulnerabilities (USN-1807-1)");
      script_summary(english:"Checks dpkg output for updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Ubuntu host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Multiple security issues were discovered in MySQL and this update
    includes new upstream MySQL versions to fix these issues.
    
    MySQL has been updated to 5.1.69 in Ubuntu 10.04 LTS and Ubuntu 11.10.
    Ubuntu 12.04 LTS and Ubuntu 12.10 have been updated to MySQL 5.5.31.
    
    In addition to security fixes, the updated packages contain bug fixes,
    new features, and possibly incompatible changes.
    
    Please see the following for more information:
    http://dev.mysql.com/doc/relnotes/mysql/5.1/en/news-5-1-69.html
    http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html
    http://www.oracle.com/technetwork/topics/security/cpuapr2013-1899555.h
    tml.
    
    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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://usn.ubuntu.com/1807-1/"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Update the affected mysql-server-5.1 and / or mysql-server-5.5
    packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:F/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:"metasploit_name", value:'Oracle MySQL for Microsoft Windows FILE Privilege Abuse');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-server-5.1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-server-5.5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:10.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:11.10");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:12.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:12.10");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/12/03");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/04/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/04/25");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2013-2019 Canonical, Inc. / NASL script (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(10\.04|11\.10|12\.04|12\.10)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 10.04 / 11.10 / 12.04 / 12.10", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) 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$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"10.04", pkgname:"mysql-server-5.1", pkgver:"5.1.69-0ubuntu0.10.04.1")) flag++;
    if (ubuntu_check(osver:"11.10", pkgname:"mysql-server-5.1", pkgver:"5.1.69-0ubuntu0.11.10.1")) flag++;
    if (ubuntu_check(osver:"12.04", pkgname:"mysql-server-5.5", pkgver:"5.5.31-0ubuntu0.12.04.1")) flag++;
    if (ubuntu_check(osver:"12.10", pkgname:"mysql-server-5.5", pkgver:"5.5.31-0ubuntu0.12.10.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "mysql-server-5.1 / mysql-server-5.5");
    }
    
  • NASL familyDatabases
    NASL idMYSQL_BINARY_LOG_SQLI.NASL
    descriptionThe version of MySQL installed on the remote host is earlier than 5.5.33 / 5.6.x earlier than 5.6.13 and is, therefore, potentially affected by multiple SQL injection vulnerabilities. User-supplied identifiers are not properly quoted before being written into the binary log. An attacker with a valid account and privileges to modify data could exploit this to modify tables that they should not have access to.
    last seen2020-06-01
    modified2020-06-02
    plugin id64503
    published2013-02-08
    reporterThis script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/64503
    titleMySQL Binary Log SQL Injection
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(64503);
      script_version("1.7");
      script_cvs_date("Date: 2018/11/15 20:50:21");
    
      script_cve_id("CVE-2012-4414");
      script_bugtraq_id(55498);
    
      script_name(english:"MySQL Binary Log SQL Injection");
      script_summary(english:"Checks version of MySQL");
    
      script_set_attribute(
        attribute:"synopsis",
        value:
    "The database server running on the remote host has multiple SQL
    injection vulnerabilities."
      );
      script_set_attribute(
        attribute:"description",
        value:
    "The version of MySQL installed on the remote host is earlier than
    5.5.33 / 5.6.x earlier than 5.6.13 and is, therefore, potentially
    affected by multiple SQL injection vulnerabilities.  User-supplied
    identifiers are not properly quoted before being written into the
    binary log.  An attacker with a valid account and privileges to modify
    data could exploit this to modify tables that they should not have
    access to."
      );
      script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-33.html");
      script_set_attribute(attribute:"see_also", value:"https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-13.html");
      script_set_attribute(attribute:"see_also", value:"https://mariadb.atlassian.net/browse/MDEV-382");
      script_set_attribute(attribute:"see_also", value:"https://www.openwall.com/lists/oss-security/2012/09/11/4");
      # https://www.percona.com/blog/2013/01/13/cve-2012-4414-in-mysql-5-5-29-and-percona-server-5-5-29/
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?8f7e56e9");
      script_set_attribute(attribute:"solution", value:"Upgrade to MySQL version 5.5.33 / 5.6.13 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/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:"2012/09/11");  # mailing list announcement
      script_set_attribute(attribute:"patch_publication_date", value:"2013/07/31");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/02/08");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:oracle:mysql");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Databases");
    
      script_copyright(english:"This script is Copyright (C) 2013-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("mysql_version.inc");
    
    port = get_service(svc:"mysql", default:3306, exit_on_fail:TRUE);
    mysql_init(port:port, exit_on_fail:TRUE);
    
    if (is_mariadb()) audit(AUDIT_NOT_LISTEN, 'MySQL', port);
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    ver = mysql_get_version();
    
    if (mysql_ver_cmp(ver:ver, fix:'5.6.13', same_branch:TRUE) < 0)
      fix = '5.6.13';
    else if (mysql_ver_cmp(ver:ver, fix:'5.5.33', same_branch:FALSE)  < 0)
      fix = '5.5.33 / 5.6.13';
    else
      audit(AUDIT_LISTEN_NOT_VULN, 'MySQL', port, ver);
    
    
    set_kb_item(name:'www/'+port+'/SQLInjection', value:TRUE);
    if (report_verbosity > 0)
    {
      report =
        '\n  Installed version : ' + ver +
        '\n  Fixed version     : ' + fix + '\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);
    
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2013-102.NASL
    descriptionUpdated mariadb packages includes fixes for the following security vulnerabilities : Unspecified vulnerability in the MySQL Server component in Oracle MySQL 5.5.26 and earlier allows remote attackers to affect integrity and availability, related to MySQL Client (CVE-2012-3147). Unspecified vulnerability in the MySQL Server component in Oracle MySQL 5.1.64 and earlier, and 5.5.26 and earlier, allows remote attackers to affect confidentiality, integrity, and availability via unknown vectors related to Protocol (CVE-2012-3158). Multiple SQL injection vulnerabilities in the replication code in Oracle MySQL possibly before 5.5.29, and MariaDB 5.1.x through 5.1.62, 5.2.x through 5.2.12, 5.3.x through 5.3.7, and 5.5.x through 5.5.25, allow remote authenticated users to execute arbitrary SQL commands via vectors related to the binary log. NOTE: as of 20130116, Oracle has not commented on claims from a downstream vendor that the fix in MySQL 5.5.29 is incomplete (CVE-2012-4414). Stack-based buffer overflow in the acl_get function in Oracle MySQL 5.5.19 and other versions through 5.5.28, and 5.1.53 and other versions through 5.1.66, and MariaDB 5.5.2.x before 5.5.28a, 5.3.x before 5.3.11, 5.2.x before 5.2.13 and 5.1.x before 5.1.66, allows remote authenticated users to execute arbitrary code via a long argument to the GRANT FILE command (CVE-2012-5611). A buffer overflow that can cause a server crash or arbitrary code execution (a variant of CVE-2012-5611) Heap-based buffer overflow in Oracle MySQL 5.5.19 and other versions through 5.5.28, and MariaDB 5.5.28a and possibly other versions, allows remote authenticated users to cause a denial of service (memory corruption and crash) and possibly execute arbitrary code, as demonstrated using certain variations of the (1) USE, (2) SHOW TABLES, (3) DESCRIBE, (4) SHOW FIELDS FROM, (5) SHOW COLUMNS FROM, (6) SHOW INDEX FROM, (7) CREATE TABLE, (8) DROP TABLE, (9) ALTER TABLE, (10) DELETE FROM, (11) UPDATE, and (12) SET PASSWORD commands (CVE-2012-5612). MySQL 5.5.19 and possibly other versions, and MariaDB 5.5.28a, 5.3.11, 5.2.13, 5.1.66, and possibly other versions, generates different error messages with different time delays depending on whether a user name exists, which allows remote attackers to enumerate valid usernames (CVE-2012-5615). Be advised that for CVE-2012-5615 to be completely closed, it
    last seen2020-06-01
    modified2020-06-02
    plugin id66114
    published2013-04-20
    reporterThis script is Copyright (C) 2013-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/66114
    titleMandriva Linux Security Advisory : mariadb (MDVSA-2013:102)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandriva Linux Security Advisory MDVSA-2013:102. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    if (NASL_LEVEL < 3000) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(66114);
      script_version("1.6");
      script_cvs_date("Date: 2019/08/02 13:32:55");
    
      script_cve_id("CVE-2012-3147", "CVE-2012-3158", "CVE-2012-4414", "CVE-2012-5611", "CVE-2012-5612", "CVE-2012-5615", "CVE-2012-5627");
      script_bugtraq_id(55498, 56017, 56022, 56766, 56768, 56769, 56837);
      script_xref(name:"MDVSA", value:"2013:102");
      script_xref(name:"MGASA", value:"2012-0244");
      script_xref(name:"MGASA", value:"2012-0341");
      script_xref(name:"MGASA", value:"2012-0349");
      script_xref(name:"MGASA", value:"2013-0019");
      script_xref(name:"MGASA", value:"2013-0046");
    
      script_name(english:"Mandriva Linux Security Advisory : mariadb (MDVSA-2013:102)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandriva Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated mariadb packages includes fixes for the following security
    vulnerabilities :
    
    Unspecified vulnerability in the MySQL Server component in Oracle
    MySQL 5.5.26 and earlier allows remote attackers to affect integrity
    and availability, related to MySQL Client (CVE-2012-3147).
    
    Unspecified vulnerability in the MySQL Server component in Oracle
    MySQL 5.1.64 and earlier, and 5.5.26 and earlier, allows remote
    attackers to affect confidentiality, integrity, and availability via
    unknown vectors related to Protocol (CVE-2012-3158).
    
    Multiple SQL injection vulnerabilities in the replication code in
    Oracle MySQL possibly before 5.5.29, and MariaDB 5.1.x through 5.1.62,
    5.2.x through 5.2.12, 5.3.x through 5.3.7, and 5.5.x through 5.5.25,
    allow remote authenticated users to execute arbitrary SQL commands via
    vectors related to the binary log. NOTE: as of 20130116, Oracle has
    not commented on claims from a downstream vendor that the fix in MySQL
    5.5.29 is incomplete (CVE-2012-4414).
    
    Stack-based buffer overflow in the acl_get function in Oracle MySQL
    5.5.19 and other versions through 5.5.28, and 5.1.53 and other
    versions through 5.1.66, and MariaDB 5.5.2.x before 5.5.28a, 5.3.x
    before 5.3.11, 5.2.x before 5.2.13 and 5.1.x before 5.1.66, allows
    remote authenticated users to execute arbitrary code via a long
    argument to the GRANT FILE command (CVE-2012-5611).
    
    A buffer overflow that can cause a server crash or arbitrary code
    execution (a variant of CVE-2012-5611)
    
    Heap-based buffer overflow in Oracle MySQL 5.5.19 and other versions
    through 5.5.28, and MariaDB 5.5.28a and possibly other versions,
    allows remote authenticated users to cause a denial of service (memory
    corruption and crash) and possibly execute arbitrary code, as
    demonstrated using certain variations of the (1) USE, (2) SHOW TABLES,
    (3) DESCRIBE, (4) SHOW FIELDS FROM, (5) SHOW COLUMNS FROM, (6) SHOW
    INDEX FROM, (7) CREATE TABLE, (8) DROP TABLE, (9) ALTER TABLE, (10)
    DELETE FROM, (11) UPDATE, and (12) SET PASSWORD commands
    (CVE-2012-5612).
    
    MySQL 5.5.19 and possibly other versions, and MariaDB 5.5.28a, 5.3.11,
    5.2.13, 5.1.66, and possibly other versions, generates different error
    messages with different time delays depending on whether a user name
    exists, which allows remote attackers to enumerate valid usernames
    (CVE-2012-5615). Be advised that for CVE-2012-5615 to be completely
    closed, it's recommended to remove any anonymous logins. Previously,
    such a user without access rights was added by default.
    
    A vulnerability was found in the handling of password salt values in
    MySQL. When a user logs into MySQL a salt value is generated that is
    then used to prevent password guessing attacks (since the salt value
    must be known in order to send a password). This salt value is created
    at the start of a session and used for the entire session, once
    authenticated an attacker can use the MySQL change_user command to
    attempt to login as a different, as the salt value is known a password
    guessing attack will be much more efficient (CVE-2012-5627).
    
    in addition it fixes MDEV-4029 and rpl.rpl_mdev382 test from
    mariadb-bench, and a problem preventing the feedback plugin from
    working has been corrected."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0135"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:ND/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mariadb-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mariadb-embedded-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mariadb-embedded18");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mariadb18");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-bench");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-common-core");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-core");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-extra");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-feedback");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mariadb-obsolete");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-MariaDB");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:business_server:1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/04/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/04/20");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2019 Tenable Network Security, Inc.");
      script_family(english:"Mandriva Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/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);
    if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux");
    if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64mariadb-devel-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64mariadb-embedded-devel-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64mariadb-embedded18-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64mariadb18-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-bench-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-client-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-common-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-common-core-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-core-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-extra-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-feedback-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mariadb-obsolete-5.5.25-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"mysql-MariaDB-5.5.25-1.1.mbs1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_8C773D7F6CBB11E2B242C8600054B392.NASL
    descriptionORACLE reports : Multiple SQL injection vulnerabilities in the replication code Stack-based buffer overflow Heap-based buffer overflow
    last seen2020-06-01
    modified2020-06-02
    plugin id64421
    published2013-02-04
    reporterThis script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/64421
    titleFreeBSD : mysql/mariadb/percona server -- multiple vulnerabilities (8c773d7f-6cbb-11e2-b242-c8600054b392)
    code
    #
    # (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(64421);
      script_version("1.4");
      script_cvs_date("Date: 2018/12/19 13:21:18");
    
      script_cve_id("CVE-2012-4414", "CVE-2012-5611", "CVE-2012-5612", "CVE-2012-5615", "CVE-2012-5627");
    
      script_name(english:"FreeBSD : mysql/mariadb/percona server -- multiple vulnerabilities (8c773d7f-6cbb-11e2-b242-c8600054b392)");
      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:
    "ORACLE reports :
    
    Multiple SQL injection vulnerabilities in the replication code
    
    Stack-based buffer overflow
    
    Heap-based buffer overflow"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.atlassian.net/browse/MDEV-4029"
      );
      # https://mariadb.atlassian.net/browse/MDEV-MDEV-729
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a50de489"
      );
      # https://mariadb.atlassian.net/browse/MDEV-MDEV-729
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a50de489"
      );
      # http://www.mysqlperformanceblog.com/2013/01/23/announcing-percona-server-5-5-29-29-4/
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?6c5021eb"
      );
      # https://vuxml.freebsd.org/freebsd/8c773d7f-6cbb-11e2-b242-c8600054b392.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?c62174a0"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:mariadb-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:mysql-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:percona-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/12/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/02/01");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/02/04");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2018 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>=5.1<5.1.67")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"mysql-server>=5.5<5.5.29")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"mariadb-server>=5.3<5.3.12")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"mariadb-server>=5.5<5.5.29")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"percona-server>=5.5<5.5.29.29.4")) 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 familySuSE Local Security Checks
    NASL idOPENSUSE-2013-4.NASL
    descriptionMariaDB was updated to 5.2.13. - Release notes: http://kb.askmonty.org/v/mariadb-5213-release-notes - Changelog: http://kb.askmonty.org/v/mariadb-5213-changelog
    last seen2020-06-05
    modified2014-06-13
    plugin id75036
    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/75036
    titleopenSUSE Security Update : mariadb (openSUSE-SU-2013:0014-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-2013-4.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(75036);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2012-4414", "CVE-2012-5611");
    
      script_name(english:"openSUSE Security Update : mariadb (openSUSE-SU-2013:0014-1)");
      script_summary(english:"Check for the openSUSE-2013-4 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "MariaDB was updated to 5.2.13.
    
      - Release notes:
        http://kb.askmonty.org/v/mariadb-5213-release-notes
    
      - Changelog:
        http://kb.askmonty.org/v/mariadb-5213-changelog"
      );
      # http://kb.askmonty.org/v/mariadb-5213-changelog
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5213-changelog/"
      );
      # http://kb.askmonty.org/v/mariadb-5213-release-notes
      script_set_attribute(
        attribute:"see_also",
        value:"https://mariadb.com/kb/en/library/mariadb-5213-release-notes/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=779476"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=792444"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2013-01/msg00005.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected mariadb packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/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:libmariadbclient16");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient16-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient_r16");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libmariadbclient_r16-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-bench");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-bench-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-client-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debug");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debug-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-debugsource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-test");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-test-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-tools");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:mariadb-tools-debuginfo");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:12.1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/12/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13");
      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:"libmariadbclient16-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libmariadbclient16-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libmariadbclient_r16-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libmariadbclient_r16-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-bench-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-bench-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-client-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-client-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-debug-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-debug-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-debugsource-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-test-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-test-debuginfo-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-tools-5.2.13-2.8.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"mariadb-tools-debuginfo-5.2.13-2.8.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, "mariadb");
    }