Check provider logo

Security group does not allow ingress from 0.0.0.0/0 or ::/0 to Memcached TCP port 11211

ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211

Severityhigh
Serviceec2
by Prowler

EC2 security groups are evaluated for inbound rules that permit Internet-sourced access to TCP 11211 (Memcached) from 0.0.0.0/0 or ::/0.

Risk

Exposed Memcached enables unauthenticated access, impacting CIA:

  • Confidentiality: read cached data (sessions, secrets)
  • Integrity: modify or poison entries
  • Availability: flush or overload cache, degrading apps

Open 11211 is widely scanned, enabling unauthorized access and lateral movement.

Run this check with Prowler CLI

prowler aws --checks ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211

Recommendation

Apply least privilege and segmentation:

  • Restrict TCP 11211 to trusted CIDRs or security groups
  • Keep Memcached on private subnets; avoid public IPs
  • Add defense in depth with NACLs/firewalls; disable unused protocols
  • Use private connectivity (VPN/peering) and monitor access

Remediation

Native IaC
Terraform
Other
  1. In the AWS Console, go to EC2 > Security Groups
  2. Select the affected security group and open the Inbound rules tab
  3. Click Edit inbound rules
  4. Delete any rule allowing TCP 11211 from 0.0.0.0/0 or ::/0, or change its Source to a specific trusted CIDR
  5. Click Save rules

Source Code

Resource Type

AwsEc2SecurityGroup

References