CVE-2017-3291: Medium severity Oracle MySQL vulnerability

Published Jan 18, 2017
·
Updated

It was discovered that the mysqldsafe could read ledir value - which specifies the directory where mysqld is stored - from configuration file. This could allow a user with privileges to write to some mysql configuration file - either mysql OS user, or any local OS user able to write to the config via some other way, e.g. by exploiting CVE-2016-6662 - to escalate their privileges to root if mysqldsafe was run with root privileges.

This problem is related to this change applied as part of the CVE-2016-6662 fix:

https://github.com/mysql/mysql-server/commit/684a165f28b3718160a3e4c5ebd18a465d85e97c#diff-144aa2f11374843c969d96b7b84247eaR211

It introduced restriction that mysqld and mysqldversion options can only be specified on the command line and can not be defined in a configuration file. However, such restriction was trivial to bypass while ledir was not restricted in a similar way.

Restriction for ledir was added in MySQL versions 5.5.54, 5.6.35, and 5.7.17. The following related entry can be found in the release notes:

The --ledir option now is accepted only on the command line, not in option files.

http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-54.html http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-35.html http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-17.html

MySQL upstream commit:

https://github.com/mysql/mysql-server/commit/53230ba274a37fa13d65e802c6ef3766cd0c6d91#diff-144aa2f11374843c969d96b7b84247ea

The CVE was made public via Oracle CPU January 2017:

http://www.oracle.com/technetwork/security-advisory/cpujan2017-2881727.html#AppendixMSQL

Other sources

Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: Packaging). Supported versions that are affected are 5.5.53 and earlier, 5.6.34 and earlier and 5.7.16 and earlier. Difficult to exploit vulnerability allows high privileged attacker with logon to the infrastructure where MySQL Server executes to compromise MySQL Server. Successful attacks require human interaction from a person other than the attacker. Successful attacks of this vulnerability can result in takeover of MySQL Server. CVSS v3.0 Base Score 6.3 (Confidentiality, Integrity and Availability impacts).

MITRE

Affected Software

19 affected components
Oracle MySQL>=5.5.0<=5.5.53
Oracle MySQL>=5.6.0<=5.6.34
Oracle MySQL>=5.7.0<=5.7.16
MariaDB MariaDB>=5.5.0<5.5.54
MariaDB MariaDB>=10.0.0<10.0.29
MariaDB MariaDB>=10.1.0<10.1.21
Debian Debian Linux=8.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Eus=7.4
redhat Enterprise Linux Eus=7.5
redhat Enterprise Linux Eus=7.6
redhat Enterprise Linux Eus=7.7
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Aus=7.4
redhat Enterprise Linux Server Aus=7.6
redhat Enterprise Linux Server Aus=7.7
redhat Enterprise Linux Server Tus=7.6
redhat Enterprise Linux Server Tus=7.7
redhat Enterprise Linux Workstation=7.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade MySQL Server to a version that resolves this vulnerability.

    Fixed in 5.5.54
  2. Upgrade

    Upgrade MySQL Server to a version that resolves this vulnerability.

    Fixed in 5.6.35
  3. Upgrade

    Upgrade MySQL Server to a version that resolves this vulnerability.

    Fixed in 5.7.17
  4. Configuration

    Ensure ledir is provided only via the command line; do not define the ledir option in configuration/option files. This matches the restriction added in versions 5.5.54, 5.6.35, and 5.7.17.

    MySQL Server (mysqld/mysqld_safe) --ledir = accepted only on the command line (not in option files/configuration files)

Event History

Jan 18, 2017
Data Sourced
via Red Hat·01:30 PM
DescriptionSeverityAffected Software
Jan 27, 2017
CVE Published
via MITRE·10:01 PM
Data Sourced
via MITRE·10:01 PM
DescriptionWeakness
Data Sourced
via NVD·10:59 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2017-3291?

The severity of CVE-2017-3291 is considered low and difficult to exploit.

2

How do I fix CVE-2017-3291?

To fix CVE-2017-3291, upgrade MySQL Server to versions 5.5.54, 5.6.35, or 5.7.17 or later.

3

Which versions are affected by CVE-2017-3291?

CVE-2017-3291 affects MySQL versions 5.5.53 and earlier, 5.6.34 and earlier, and 5.7.16 and earlier.

4

Is MariaDB affected by CVE-2017-3291?

Yes, certain versions of MariaDB are also affected by CVE-2017-3291.

5

What type of vulnerability is CVE-2017-3291?

CVE-2017-3291 is classified as a difficult to exploit vulnerability in the MySQL Server packaging.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203