Executive brief
Leapp-repository is a tool Red Hat provides to automate upgrades from RHEL 9 to RHEL 10. A flaw in the scan_mysql component runs MySQL configuration validation as root instead of the unprivileged mysql user, allowing an attacker with mysql-level OS access to load malicious code that executes with root privileges during the upgrade process. An administrator performing a documented upgrade workflow would unknowingly trigger attacker-controlled code with full system privileges.
Technical details
The vulnerability is a privilege escalation in the scan_mysql actor of leapp-upgrade-el9toel10. The root cause is improper privilege handling: the actor invokes mysqld --validate-config --log-error-verbosity=2 directly as root, bypassing the systemd unit that normally drops to User=mysql. An attacker with OS-level access as the mysql user can write a malicious mysqld-auto.cnf configuration file and shared object to /var/lib/mysql (owned by mysql), configuring MySQL to load the attacker's plugin via plugin_dir and early_plugin_load directives. When an administrator runs the documented Leapp preupgrade or upgrade workflow, the plugin loads with dlopen() before MySQL validates the plugin origin or checks the runtime user, resulting in arbitrary code execution as UID 0 with full capabilities in an unconfined SELinux context. Patches are available via RHSA-2026:67608.
Affected products
- Red Hat leapp-repository before 0.24.0-1.el9_8.1
- Red Hat Red Hat Enterprise Linux 9
Timeline
- 2026-09-15: disclosed
- 2026-09-15: patched: RHSA-2026:67608 released