Project network access list has entries and excludes 0.0.0.0/0, ::/0, 0.0.0.0, and ::
MongoDB Atlas project network access list configuration is evaluated for entries that allow access from anywhere (0.0.0.0/0, ::/0, 0.0.0.0, ::) or for missing access lists, instead of restricting connections to specific IPs or CIDRs.
Risk
Internet-wide access enables scanning, brute force, and credential stuffing against database endpoints. A successful compromise can cause data exfiltration (confidentiality), unauthorized writes or drops (integrity), and service disruption or lockout (availability).
Run this check with Prowler
Run in Prowler Cloudprowler mongodbatlas --checks projects_network_access_list_exposed_to_internetRecommendation
Apply least privilege: permit only required IPs/CIDRs or approved security groups; avoid 0.0.0.0/0 and ::/0. Prefer private connectivity (VPC peering or private endpoints) over public access. Use temporary entries for short-lived admin needs and review lists regularly.
Remediation
Terraform
resource "mongodbatlas_project_ip_access_list" "<example_resource_name>" {
project_id = "<example_resource_id>"
cidr_block = "<ALLOWED_CIDR>" # Critical: add a restricted CIDR (not 0.0.0.0/0 or ::/0) to ensure the list isn't empty and not open to the world
}Other
Check Code
from typing import List
from prowler.lib.check.models import Check, CheckReportMongoDBAtlas
from prowler.providers.mongodbatlas.services.projects.projects_client import (
projects_client,
)
class projects_network_access_list_exposed_to_internet(Check):
"""Check if MongoDB Atlas project network access list is not open to the world
This class verifies that MongoDB Atlas projects don't have network access
entries that allow unrestricted access from the internet (0.0.0.0/0 or ::/0).
"""
def execute(self) -> List[CheckReportMongoDBAtlas]:
"""Execute the MongoDB Atlas project network access list check
Iterates over all projects and checks if their network access lists
contain entries that allow unrestricted access from anywhere.
Returns:
List[CheckReportMongoDBAtlas]: A list of reports for each project
"""
findings = []
for project in projects_client.projects.values():
report = CheckReportMongoDBAtlas(metadata=self.metadata(), resource=project)
if not project.network_access_entries:
report.status = "FAIL"
report.status_extended = (
f"Project {project.name} has no network access list entries configured, "
f"which may allow unrestricted access."
)
else:
open_entries = []
for entry in project.network_access_entries:
if entry.cidr_block and entry.cidr_block in ["0.0.0.0/0", "::/0"]:
open_entries.append(f"CIDR: {entry.cidr_block}")
if entry.ip_address and entry.ip_address in ["0.0.0.0", "::"]:
open_entries.append(f"IP: {entry.ip_address}")
if open_entries:
report.status = "FAIL"
report.status_extended = (
f"Project {project.name} has network access entries open to the world: "
f"{', '.join(open_entries)}. This allows unrestricted access from anywhere on the internet."
)
else:
report.status = "PASS"
report.status_extended = (
f"Project {project.name} has properly configured network access list "
f"with {len(project.network_access_entries)} restricted entries."
)
findings.append(report)
return findings