More Info:

No security group should allow unrestricted ingress access to MongoDB port 27017.

Risk Level

Medium

Address

Security

Compliance Standards

CBP, HITRUST, AWSWAF, GDPR, SOC2, NISTCSF, PCIDSS, FedRAMP

Triage and Remediation

Remediation

To remediate the unrestricted MongoDB access issue in AWS, you can follow these steps:

  1. Open the AWS Management Console and navigate to the EC2 dashboard.
  2. Select the Security Groups option from the left-hand menu.
  3. Find the security group associated with the MongoDB instance that you want to restrict access to.
  4. Click on the security group to open the details page.
  5. Select the Inbound Rules tab.
  6. Locate the rule that allows unrestricted access to MongoDB (default port 27017).
  7. Click on the “Edit” button next to the rule.
  8. Change the Source field to restrict access to only the IP addresses or CIDR ranges that require access to the MongoDB instance.
  9. Click “Save” to apply the changes.

By following these steps, you have successfully remediated the unrestricted MongoDB access issue in AWS by restricting access to only authorized IP addresses or CIDR ranges.

Additional Reading: