MariaDBDatabase / datastore

CVE-2017-15945

HIGH · 7.8 CVSS v3.0 Published 2017-10-27
Fix available
A fix is available. Upgrade to 5.6.36 / 10.0.30 or later.
See remediation →
80/100
Remediation priority · High
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
The installation scripts in the Gentoo dev-db/mysql, dev-db/mariadb, dev-db/percona-server, dev-db/mysql-cluster, and dev-db/mariadb-galera packages before 2017-09-29 have chown calls for user-writable directory trees, which allows local users to gain privileges by leveraging access to the mysql account for creation of a link.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The Gentoo installation scripts for MySQL, MariaDB, Percona Server, and MySQL Cluster packages contain insecure chown operations on directory trees that can be influenced by local users. A local user with access to the mysql account can create symbolic links within these writable directories, causing the installation scripts to follow the links and change ownership of arbitrary files or directories to the mysql user, enabling privilege escalation.

MitigationModify installation scripts to validate target paths before chown operations, check for and reject symbolic links in the path hierarchy, and ensure all temporary directories used during installation are created with secure permissions in protected locations.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
MariaDBDatabase / datastore
Affected:< 10.0.30
MySQLDatabase / datastore
Affected:< 5.6.36

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed database product and version
    Run `mysql --version` or `mariadb --version` to determine if MySQL or MariaDB is installed and note the exact version number
    Affected if The installed version is MariaDB below 10.0.30 or MySQL below 5.6.36
  2. Confirm Gentoo installation environment
    Check if the system is Gentoo Linux or if Gentoo installation scripts are in use by examining /var/db/pkg or the package manager metadata
    Affected if The system uses Gentoo ebuild scripts for database package installation
  3. Check mysql data directory permissions and structure
    Inspect the mysql data directory (commonly /var/lib/mysql) and verify which system accounts have write access to subdirectories
    Affected if Non-privileged users have write access to directories within the mysql data path that could contain symlinks during installation
  4. Verify temporary directory configuration
    Examine the temporary directories used during package installation or upgrade (check installation script logs or configuration for TEMP/TMPDIR settings)
    Affected if Temporary directories are writable by non-root users and could be manipulated with symbolic links
  5. Inspect for existing symbolic links in mysql directories
    Run `find /var/lib/mysql -type l -ls` to list any symbolic links currently present in the mysql data directory tree
    Affected if Symbolic links exist within mysql-managed directories pointing to system locations outside the intended data path

The environment is affected if a vulnerable MariaDB (< 10.0.30) or MySQL (< 5.6.36) version is installed via Gentoo installation scripts on a system where unprivileged users can create symbolic links in writable mysql-related directories.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to 5.6.36 / 10.0.30 or later
Fixed in 5.6.3610.0.30
Interim mitigation

Modify installation scripts to validate target paths before chown operations, check for and reject symbolic links in the path hierarchy, and ensure all temporary directories used during installation are created with secure permissions in protected locations.

Fix this in MariaDB Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing4.0 h
  • Review / QA2.0 h
12.0 hours of engineering $2,080
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,328.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2017-15945 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2017-15945 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data