Check ID:
Provider: AWS
Service:
Severity: CRITICAL
Categories:
Resource type:
ec2_instance_port_sqlserver_exposed_to_internetProvider: AWS
Service:
ec2Severity: CRITICAL
Categories:
internet-exposedResource type:
AwsEc2InstanceWhat this check verifies
EC2 instances with security groups permitting any source toTCP 1433 or 1434 (SQL Server) are identified, considering the instance’s public reachability based on IP and subnet exposure.
Risk
Internet-reachable SQL services enable:- Brute-force and credential-stuffing of DB logins
- Exploitation of SQL Server flaws for remote code execution
- Unauthorized queries and data exfiltration This threatens confidentiality and integrity, and facilitates lateral movement from the database host.
Recommendation
Enforce least privilege and defense in depth:- Remove
0.0.0.0/0and::/0to1433-1434 - Allow only trusted IPs or app tiers via security group references
- Keep databases in private subnets without public IPs; access via VPN or bastion
- Require TLS and strong authentication; monitor access.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html
- https://support.icompaas.com/support/solutions/articles/62000223371-ensure-no-security-groups-allow-ingress-from-0-0-0-0-0-or-0-to-windows-sql-server-ports-1433-or-14
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/EC2/unrestricted-mssql-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_instance_port_sqlserver_exposed_to_internet. 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