Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
ecs_task_definitions_no_privileged_containersProvider: AWS
Service:
ecsSeverity: HIGH
Categories:
container-securityResource type:
AwsEcsTaskDefinitionWhat this check verifies
Amazon ECS task definitions are evaluated for containers configured with privileged mode (privileged: true).
The outcome indicates whether any container definition enables this setting.
Risk
Privileged containers can act with host-level root, breaking isolation. A foothold lets attackers achieve container escape, mount host devices, read secrets, alter configs, and control other workloads-impacting confidentiality, integrity, and availability via data theft, tampering, and service disruption.Recommendation
Run containers without elevated rights (privileged: false) and as non-root (user). Apply least privilege:
- Grant only required Linux capabilities via
capDrop/capAdd - Prefer
readonlyRootFilesystem: true - Isolate networks and separate duties
- Monitor with logging to support defense in depth
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws ecs deregister-task-definition —task-definition <task-family>:<revision>
References
- https://docs.aws.amazon.com/config/latest/developerguide/ecs-containers-nonprivileged.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/ecs-controls.html#ecs-4
- https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_security
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = ecs_task_definitions_no_privileged_containers. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks