Check ID:
Provider: AWS
Service:
Severity: CRITICAL
Categories:
Resource type:
ec2_instance_port_ldap_exposed_to_internetProvider: AWS
Service:
ec2Severity: CRITICAL
Categories:
internet-exposedResource type:
AwsEc2InstanceWhat this check verifies
EC2 instances with security groups permitting Internet-sourced access to LDAP onTCP 389 or LDAPS on TCP 636 are identified.
Public exposure context (presence of public IP and subnet reachability) is considered to gauge how broadly these ports can be accessed.
Risk
Publicly reachable LDAP/LDAPS enables:- Directory enumeration and weak/anonymous bind attempts
- Password spraying and credential theft (cleartext on
389) - Unauthorized queries causing data exfiltration
Recommendation
Limit LDAP to trusted networks:- Allowlist specific source CIDRs in security groups (least privilege)
- Use private connectivity (peering/VPN) instead of Internet
- Require LDAPS, strong certificates, and disable insecure binds
- Add NACLs and monitoring for defense in depth
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
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_ldap_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