Ensure Security Group attached to application load balancer instance does not allow inbound traffic from all to TCP 27018 (MongoDB)

Error: Security Group attached to application load balancer instance allows inbound traffic from all to TCP 27018 (MongoDB)

Bridgecrew Policy ID: BC_AWS_NETWORKING_26
Severity: HIGH

Security Group attached to application load balancer instance allows inbound traffic from all to TCP 27018 (MongoDB)

Description

TCP port 27018 is used by the MongoDB Database, a free and open-source cross-platform document-oriented NoSQL database. We recommend all Mongo DBs should be protected with an access control mechanism to prevent data theft and data loss. Allowing unrestricted MongoDB Database access can increase opportunities for malicious activity such as hacking, denial-of-service (DoS) attacks, and loss of data.

Fix - Runtime

AWS Console

  1. Log in to the AWS Management Console at https://console.aws.amazon.com/.
  2. Open the Amazon EC2 console.
  3. In navigation on the left, select Load Balancers.
  4. Select the desired load balancer.
  5. Navigate to the Security section.
  6. Select the Description tab and take note of the security groups associated with the load balancer.
  7. In navigation on the left, select Security Groups.
  8. Search and select the security groups from the previous step.
  9. Click the Inbound tab.
  10. To remove any references to TCP port 27018 (MongoDB), click Edit.

Did this page help you?