AWS network ACL rule allows public access Affecting VPC service in AWS


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Network/ Access

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-ControlsCSA-CCMISO-27001NIST-800-53PCI-DSSSOC-2
  • Snyk IDSNYK-CC-00269
  • creditSnyk Research Team

Description

Inbound traffic is allowed to a resource from any source instead of a restricted range, and potentially everyone can access your resource.

How to fix?

Set cidr_block to specific CIDR block range only, e.g. 192.168.1.0/24.

Example Configuration

resource "aws_network_acl_rule" "rule1" {
  network_acl_id = "${aws_network_acl.nacl1.id}"
  rule_number = 10
  protocol = "tcp"
  rule_action = "allow"
  cidr_block = "192.168.1.0/24"
  from_port = 22
  to_port = 22
}