Check ID: ec2_instance_port_cassandra_exposed_to_internet
Provider: AWS
Service: ec2
Severity: CRITICAL
Categories: internet-exposed
Resource type: AwsEc2Instance

What this check verifies

EC2 instances have Cassandra service ports (7000, 7001, 7199, 9042, 9160) reachable from the Internet through security group ingress. Public IP presence and subnet exposure are considered to assess external reachability.

Risk

Internet-exposed Cassandra enables unauthorized queries on 9042, remote management via 7199 (JMX), and tampering with inter-node channels on 7000/7001 and 9160. Attackers can read/modify data (confidentiality, integrity), disrupt or take over the cluster (availability), and pivot within the VPC.

Recommendation

Apply least privilege network access:
  • Remove 0.0.0.0/0 and ::/0 to Cassandra ports
  • Allow only trusted subnets or VPN/bastion
  • Keep nodes in private subnets; segment inter-node traffic
  • Enforce authentication and TLS/mTLS for clients and JMX
  • Add defense in depth with NACLs and monitoring

Remediation

aws ec2 revoke-security-group-ingress --group-id <SECURITY_GROUP_ID> --ip-permissions '[{"IpProtocol":"tcp","FromPort":7000,"ToPort":7000,"IpRanges":[{"CidrIp":"0.0.0.0/0"}]},{"IpProtocol":"tcp","FromPort":7001,"ToPort":7001,"IpRanges":[{"CidrIp":"0.0.0.0/0"}]},{"IpProtocol":"tcp","FromPort":7199,"ToPort":7199,"IpRanges":[{"CidrIp":"0.0.0.0/0"}]},{"IpProtocol":"tcp","FromPort":9042,"ToPort":9042,"IpRanges":[{"CidrIp":"0.0.0.0/0"}]},{"IpProtocol":"tcp","FromPort":9160,"ToPort":9160,"IpRanges":[{"CidrIp":"0.0.0.0/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_instance_port_cassandra_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