CVE-2020-7221 json
mysql_install_db in MariaDB 10.4.7 through 10.4.11 allows privilege escalation from the mysql user account to root because chown and chmod…
published 2020-02-04 6 y ago modified 2026-09-08 2 mo ago also BIT-mariadb-2020-7221 , BIT-mariadb-min-2020-7221 , BIT-mysql-client-2020-7221 , EUVD-2020-28350
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 52%
- public exploits
- 0
- none known
Summary
mysql_install_db in MariaDB 10.4.7 through 10.4.11 allows privilege escalation from the mysql user account to root because chown and chmod are performed unsafely, as demonstrated by a symlink attack on a chmod 04755 of auth_pam_tool_dir/auth_pam_tool. NOTE: this does not affect the Oracle MySQL product, which implements mysql_install_db differently.
Patch / fix
- bitnami mariadb 10.4.12
- bitnami mysql-client 10.4.12
- mariadb104 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 10.4.30-8.5.46
- lz4 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 1.8.0-3.5.2
- python-mysqlclient SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 1.3.14-8.9.2
- mariadb-connector-c SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 3.1.22-2.35.1
- mariadb104 SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLE High Performance Computing 15 SP1-LTSS 10.4.30-150100.3.5.10
- python-mysqlclient SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLE High Performance Computing 15 SP1-LTSS 1.4.6-150100.3.3.7
suse advisories SUSE-RU-2023:4991-1SUSE-RU-2023:3956-1
- mariadb openSUSE Tumbleweed 10.6.4-2.1
opensuse advisories openSUSE-SU-2024:11038-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2020-7221 updated cvss 7.8
mariadb: mysql_install_db allows privilege escalation due to unsafe chown and chmod operations
-
Red Hat Enterprise Linux 7 mariadb, mariadb-libs, mariadb-test, mariadb-bench, mariadb-server, mariadb-embedded Red Hat Enterprise Linux 8 Judy, galera, mariadb, mariadb-pam, mariadb-test, mariadb-backup, +8 more Red Hat OpenStack Platform 13 (Queens) mariadb, mariadb-libs, mariadb-test, mariadb-common, mariadb-config, mariadb-errmsg, +3 more Red Hat Software Collections rh-mariadb102, rh-mariadb103, rh-mariadb102-runtime, rh-mariadb103-runtime, rh-mariadb102-scldevel, rh-mariadb102-syspaths, +2 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.67% chance of exploitation in the next 30 days, higher than 52% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- seclists.org https://seclists.org/oss-sec/2020/q1/55 referenced PoC, tagged "exploit" by a source, unverified
- bugzilla.suse.com https://bugzilla.suse.com/show_bug.cgi?id=1160868 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.2 | AV:L/AC:L/Au:N/C:C/I:C/A:C |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | mariadb | >=10.4.7, <10.4.12 |
10.4.12 |
| bitnami | mariadb-min | >=10.4.7, <=10.4.11 |
no fix listed |
| bitnami | mysql-client | >=10.4.7, <10.4.12 |
10.4.12 |
Classification
- Weakness
-
- CWE-59 Improper Link Resolution Before File Access
- Technology feeds
References
-
github.com
/MariaDB/server/commit/9d18b6246755472c8324bf3e20e234e08ac45618
third-party-advisory, advisory
-
seclists.org
/oss-sec/2020/q1/55
exploit, mailing-list, third-party-advisory, advisory
-
bugzilla.suse.com
/show_bug.cgi?id=1160868
exploit, issue-tracking, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-7221
web
Sources
- CVE List CVE-2020-7221
- NVD CVE-2020-7221
- OSV BIT-mariadb-2020-7221
- OSV BIT-mariadb-min-2020-7221
- OSV BIT-mysql-client-2020-7221
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.