Check ID: ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888
Provider: AWS
Service: ec2
Severity: HIGH
Categories: internet-exposed
Resource type: AwsEc2SecurityGroup

What this check verifies

EC2 security groups are evaluated for inbound rules that allow the Internet (0.0.0.0/0 or ::/0) to reach Cassandra ports 7199, 9160, or 8888. Focuses on tcp rules that expose these ports to public sources.

Risk

Exposed Cassandra interfaces (7199 JMX, 9160 Thrift, 8888 tools) enable:
  • Unauthorized reads of data/metrics (confidentiality)
  • Schema and cluster changes (integrity)
  • Remote operations causing outages (availability)
Public reachability also increases brute-force and exploit attempts.

Recommendation

Restrict ingress on 7199, 9160, 8888 to trusted sources:
  • Enforce least privilege allow-lists; avoid 0.0.0.0/0 and ::/0
  • Place nodes in private subnets; use VPN or a bastion for admin
  • Prefer strong auth and mTLS; bind management to internal interfaces
  • Apply defense in depth with segmentation (north-south and east-west)

Remediation

aws ec2 revoke-security-group-ingress --group-id <SECURITY_GROUP_ID> --ip-permissions IpProtocol=tcp,FromPort=7199,ToPort=7199,IpRanges='[{CidrIp=0.0.0.0/0}]',Ipv6Ranges='[{CidrIpv6=::/0}]' IpProtocol=tcp,FromPort=9160,ToPort=9160,IpRanges='[{CidrIp=0.0.0.0/0}]',Ipv6Ranges='[{CidrIpv6=::/0}]' IpProtocol=tcp,FromPort=8888,ToPort=8888,IpRanges='[{CidrIp=0.0.0.0/0}]',Ipv6Ranges='[{CidrIpv6=::/0}]'

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888. 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