More Info:

Ensure that Microsoft Azure network security groups (NSGs) do not allow unrestricted access (i.e. 0.0.0.0/0) on TCP port 3306 in order to protect against malicious actors and significantly reduce the attack surface. TCP port 3306 is used by the MySQL Database Server, a popular open-source Relational Database Management System (RDBMS) server.

Risk Level

High

Address

Security

Compliance Standards

SOC2, GDPR, ISO27001, HIPAA, NISTCSF, PCIDSS, FedRAMP

Triage and Remediation

Remediation

To remediate the unrestricted MySQL database access issue in Azure, please follow the below steps:

  1. Log in to the Azure portal (https://portal.azure.com/).
  2. Navigate to the Azure Database for MySQL service.
  3. Click on the MySQL server that has the unrestricted access issue.
  4. In the left-hand menu, click on “Firewalls and virtual networks”.
  5. Under “Firewall rules”, click on “Add client IP”.
  6. This will automatically add a firewall rule to allow only your IP address to access the MySQL database.
  7. If you need to grant access to a specific IP range, click on “Add existing virtual network” and select the virtual network and subnet that you want to allow access from.
  8. Save the changes by clicking on “Save”.

By following these steps, you have successfully remediated the unrestricted MySQL database access issue in Azure.