Finding · CIS 4.4 / 7.1 / 8.2
11 application accounts hold wildcard host grants with SUPER and mysql_native_password over plaintext TCP
Inspection of mysql.user and performance_schema.status_by_thread showed 11 microservice accounts connecting as '%' with SUPER privileges, legacy mysql_native_password hashes, and Ssl_cipher = NULL. We staged dual passwords, migrated each pool to caching_sha2_password + TLS 1.3, and scoped grants via SQL Roles.
1. Read-only privilege, auth plugin, and TLS session audit
Read-only diagnostic SQL
-- Inspect authentication plugins, wildcard hosts, and lock policies
SELECT user, host, plugin, account_locked, password_expired
FROM mysql.user
WHERE plugin != 'caching_sha2_password' OR host = '%';
-- Identify administrative SUPER or SYSTEM_VARIABLES_ADMIN grants
SELECT grantee, privilege_type, is_grantable
FROM information_schema.user_privileges
WHERE privilege_type IN ('SUPER', 'ALL PRIVILEGES');2. Staged remediation (dual-password rotation, SQL Role & TLS enforcement)
Guarded remediation SQL
-- Stage caching_sha2_password while keeping current password active ALTER USER 'checkout_app'@'10.24.%.%' IDENTIFIED WITH caching_sha2_password BY '<NewStrongSecret>' RETAIN CURRENT PASSWORD REQUIRE TLS; -- Grant least-privilege role and enforce secure transport globally CREATE ROLE IF NOT EXISTS 'role_checkout_rw'; GRANT SELECT, INSERT, UPDATE, DELETE ON checkout_prod.* TO 'role_checkout_rw'; GRANT 'role_checkout_rw' TO 'checkout_app'@'10.24.%.%'; SET PERSIST require_secure_transport = ON;
3. Rollback commands
Immediate rollback SQL
SET PERSIST require_secure_transport = OFF; -- If a legacy client pool fails handshake before secret rollout completes: ALTER USER 'checkout_app'@'10.24.%.%' REQUIRE NONE;







