Back to Checks
EFS file system has no access points allowing access to the root directory
efs_access_point_enforce_root_directory
Service: efsSeverity: medium
OfficialBuilt-inVerified
Categories:vulnerabilities
Resource Type:AwsEfsAccessPoint
Amazon EFS access points are evaluated to ensure they enforce a non-root directory. The check identifies access points whose configured root directory Path is /, meaning clients would mount the file system's root instead of a scoped subdirectory.
Risk
Exposing the file system root via an access point undermines confidentiality and integrity by allowing traversal beyond intended datasets. Attackers or misconfigured apps could:
- Read sensitive directories
- Modify or delete shared data
- Pivot across tenants, impacting availability
Run this check with Prowler
Run in Prowler CloudRun
prowler aws --checks efs_access_point_enforce_root_directoryRecommendation
Apply least privilege: set each access point Path to a dedicated subdirectory and avoid /.
- Use per-application access points
- Enforce POSIX identity and directory permissions
- Layer controls (network segmentation, monitoring) for defense in depth
Remediation
CLI
aws efs delete-access-point --access-point-id <access-point-id>Terraform
# Terraform: EFS access point enforcing a non-root directory
resource "aws_efs_access_point" "<example_resource_name>" {
file_system_id = "<example_resource_id>"
root_directory {
path = "/data" # Critical: not "/"; enforces a subdirectory as root to pass the check
}
}NativeIaC
# CloudFormation: EFS access point enforcing a non-root directory
Resources:
<example_resource_name>:
Type: AWS::EFS::AccessPoint
Properties:
FileSystemId: <example_resource_id>
RootDirectory:
Path: /data # Critical: set to a non-root path to avoid "/" and pass the check
# This enforces the access point root to /data instead of the file system rootOther
1In the AWS Console, go to EFS > Access points
2Select the access point showing Root directory as /
3Click Delete and confirm
4Click Create access point
5Select the file system and set Root directory Path to a non-root path (for example, /data)
6Click Create access point
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.efs.efs_client import efs_client
class efs_access_point_enforce_root_directory(Check):
def execute(self):
findings = []
for fs in efs_client.filesystems.values():
if fs.access_points:
report = Check_Report_AWS(metadata=self.metadata(), resource=fs)
report.status = "PASS"
report.status_extended = f"EFS {fs.id} does not have any access point allowing access to the root directory."
access_points = []
for access_point in fs.access_points:
if access_point.root_directory_path == "/":
access_points.append(access_point)
if access_points:
report.status = "FAIL"
report.status_extended = f"EFS {fs.id} has access points which allow access to the root directory: {', '.join([ap.id for ap in access_points])}."
findings.append(report)
return findings