S4E just found a high top 10 tcp port service scan
high·Information Scans·Updated Oct 8, 2024

MySQL Show Variables Enumeration Scanner

This scanner probes the MySQL server for the ability to execute the SHOW VARIABLES command, which can leak sensitive configuration details like paths and version info to an attacker.

Est. Time~1 minutes
Scan TypeSingle Scan
Targetsdomain, ipv4, subdomain
CostFree
2
Times Used
by S4E users
1
Assets Scanned
domains & IPs
1
Vulnerabilities Found
confirmed findings
References
Detail

MySQL is a leading open-source relational database management system widely adopted by developers, system administrators, and enterprises for managing structured data. It powers everything from small websites to large-scale applications, offering robust performance and reliability. MySQL is often deployed on Linux servers, cloud instances, and containerized environments, making it a critical component in modern IT infrastructure.

The vulnerability involves the MySQL SHOW VARIABLES command, which can be exploited to enumerate system variables. This arises when the MySQL server is configured with weak access controls, allowing unauthenticated or low-privileged users to execute this command. The feature is intended for administrative diagnostics but becomes a security risk when exposed to unauthorized parties.

Technically, the scanner sends a SHOW VARIABLES query to the MySQL server on the default port 3306 or a custom port. If the server responds with a list of variables, it confirms that enumeration is possible. This includes sensitive data such as datadir, basedir, version, and plugin_dir, which can aid in further attacks like path traversal or privilege escalation.

If exploited, an attacker can gather critical configuration details, potentially leading to data breaches, unauthorized access, or system compromise. The exposure of system paths and version information can facilitate targeted attacks, making this a high-severity issue with a CVSS score of 8.0.

Solution Advice
  • Restrict execution of the SHOW VARIABLES command to only authenticated administrative users by revoking privileges from public roles.
  • Implement network-level access controls, such as firewalls or security groups, to limit MySQL port (3306) access to trusted IP addresses only.
  • Enable MySQL's built-in authentication mechanisms, including strong password policies and multi-factor authentication where possible.
  • Regularly audit MySQL user permissions and remove any unnecessary or overly permissive grants.
  • Use MySQL Enterprise Audit or third-party tools to monitor and log all SHOW VARIABLES attempts for suspicious activity.
  • Apply the principle of least privilege by creating dedicated user roles with minimal required permissions for specific tasks.
  • Keep MySQL updated to the latest stable version to benefit from security patches and improved access controls.
  • Consider disabling the SHOW VARIABLES command entirely in production environments if not needed, using the --skip-show-database option or similar configurations.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

MySQL Show Variables Enumeration Scanner | S4E Free Check S4E