Check ID:
Provider: GCP
Service:
Severity: HIGH
Categories:
Resource type:
cloudsql_instance_public_ipProvider: GCP
Service:
cloudsqlSeverity: HIGH
Categories:
internet-exposedResource type:
sqladmin.googleapis.com/InstanceWhat this check verifies
Cloud SQL instances are evaluated for exposure via public IP addresses instead ofprivate IP connectivity within a VPC.
Instances with an externally routable database endpoint are surfaced.
Risk
Public DB endpoints expand attack surface:- Credential brute force and SQL injection threaten confidentiality and integrity
- Internet DDoS reduces availability
- Exposure bypasses VPC controls, easing lateral movement and data exfiltration
Recommendation
Prefer private IP and disable public endpoints. Access databases over VPC, VPN/Interconnect, or Private Service Connect. Ifauthorized networks are required, restrict to specific sources-never 0.0.0.0/0. Enforce least privilege IAM, use Cloud SQL connectors/proxy, and layer defense in depth with network controls and monitoring.
Remediation
- CLI
- Terraform
- Dashboard steps
References
- https://cloud.google.com/sql/docs/mysql/configure-private-ip
- https://cloud.google.com/sql/docs/mysql/recommender-disable-public-ip
Where this check fires
This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable byCheck ID = cloudsql_instance_public_ip. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GCP checks