Privilege Escalation Vulnerability in MariaDB: CVE-2022-24051

mariadb Updated 02 Oct 2025

Summary

18/02/2022
N/A
Yes i
High
7.8

ALPINE-CVE-2022-24051: MariaDB CONNECT Storage Engine Format String Privilege Escalation Vulnerability. Affects mariadb versions < 10.4.24-r0. Fixed in 10.4.24-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

MariaDB is an open-source relational database management system that is widely used for web applications and data storage. It is known for its high performance, scalability, and robust features, making it a popular choice among developers. However, like any software, it is susceptible to vulnerabilities that can compromise its security. CVE-2022-24051 specifically affects the CONNECT Storage Engine of MariaDB, allowing local attackers to escalate privileges under certain conditions.

Vulnerability Detail

The vulnerability identified as CVE-2022-24051 arises from improper validation of user-supplied strings used as format specifiers in SQL queries. This flaw permits authenticated attackers to exploit the vulnerability to escalate their privileges, potentially allowing them to execute arbitrary code within the context of the service account. The ramifications of this vulnerability can be severe, as it could lead to unauthorized access to sensitive data or complete control over the database server.

How To Fix

Minimum fixed version

10.4.24-r0

This is the first release that contains the fix.

sudo apk add --upgrade mariadb

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, consider restricting access to the MariaDB service to trusted users only, thereby minimizing the risk of exploitation until the package can be updated. Additionally, ensure that proper security measures are in place, such as using strong authentication methods.

Conclusion

CVE-2022-24051 is a significant vulnerability in MariaDB that poses a risk of privilege escalation for authenticated users. It is crucial to update to the patched versions to mitigate this risk. Regular monitoring and adherence to security best practices are essential to protect your database from potential threats.

See every vulnerability recorded for mariadb →

Share this vulnerability

FAQ

CVE-2022-24051 is a vulnerability in MariaDB that allows local attackers to escalate privileges due to improper validation of user-supplied strings.

If you are using an affected version of MariaDB prior to the patched releases, your installation may be vulnerable. You can check your version using the command 'mysql -V'.

Exploitation of this vulnerability can lead to privilege escalation, allowing attackers to execute arbitrary code and potentially gain unauthorized access to sensitive data.

Yes, authentication is required to exploit CVE-2022-24051, meaning that an attacker must have valid credentials to access the database.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json. You can check for vulnerabilities in your application using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for mariadb.

How To Fix

Minimum fixed version

10.4.24-r0

This is the first release that contains the fix.

sudo apk add --upgrade mariadb

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback