CVE-2021-2021 MySql Server 8.0.22 and prior is affected by a vulnerability.

CVE-2021-2021 MySql Server 8.0.22 and prior is affected by a vulnerability.

High privileged attacker (such as root user) can exploit this vulnerability by connecting to MySQL via network and then executing malicious code. By default, MySQL is configured to accept client connections only from the local host (127.0.0.1).
If you wish to allow access from remote hosts, you have to modify the server configuration. For example, to enable remote access, you can change the default configuration directive for `MySQL` service to `On` and then `OK`. However, this approach has several disadvantages. The main drawback of this method is that it allows hackers to connect to the server as root user, which gives the attacker complete control over the server. The second disadvantage is that this setting will not work when the server is configured to use a different host (such as `localhost`) for the root user. To work around this problem, you will have to change the host where the MySQL server is running. The last method for allowing remote access to the MySQL server is to use a network address where the server is accessible. For example, if the server is running on `192.168.1.100`, then you can configure MySQL server as follows: Syntax: `[mysqld] -u root -H `mysqld_safe` --bind-address=192.168.1.100
In the first line, `192.168.1.100` is the network address where the MySQL server is accessible. After that,

MySQL Server Configuration Option

The MySQL configuration file is located in `/etc/mysql/my.cnf`. If you modify this file, you have to restart the server so that the changes take effect.

References

Subscribe to CVE.news
Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe