Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306Provider: AWS
Service:
ec2Severity: HIGH
Categories:
internet-exposedResource type:
AwsEc2SecurityGroupWhat this check verifies
EC2 security groups are assessed for inbound exposure of MySQL onTCP 3306 from 0.0.0.0/0 or ::/0.
The finding reflects whether this port is reachable from any IPv4 or IPv6 address.
Risk
Public MySQL access lets anyone reach the service, enabling credential brute force and vulnerability exploitation. This threatens:- Confidentiality: data exfiltration
- Integrity: unauthorized writes or schema changes
- Availability: DoS from abuse or scans
Recommendation
Apply least privilege: restrict3306 to specific sources or peer security groups only. Keep databases in private subnets and use VPN, bastion, or application proxies for admin access. Enable defense in depth with TLS and strong auth. Never allow 0.0.0.0/0 or ::/0 ingress.
Remediation
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/EC2/unrestricted-mysql-access.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306. 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 AWS checks