VPC security group rule permits ingress from '0.0.0.0/0' to port 5900 (Virtual Network Computing) Affecting VPC service in AWS


Severity

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

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
  • Snyk IDSNYK-CC-00131
  • creditSnyk Research Team

Description

Removing unfettered connectivity to remote console services reduces a server's exposure to risk.

How to fix?

Set the ingress.cidr_blocks attribute with a more restrictive CIDR block, for example 192.168.1.0/24.

Example configuration:

resource "aws_security_group" "allow_some_cidr_valid" {
  name        = "allow_some_cidr_valid"
  description = "Allow from valid CIDR"

  ingress {
    from_port   = 5900
    to_port     = 5900
    protocol    = "tcp"
    cidr_blocks = ["192.168.1.0/24"]
  }
}