> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-ecs-fargate-task-definition-root-user-found.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS ECS Fargate task definition root user found

### Synopsis

| Field               | Value                                           |
| ------------------- | ----------------------------------------------- |
| Rule Type           | Detection                                       |
| Finding Type        | AWS ECS Fargate task definition root user found |
| Finding ID          | 60000287                                        |
| Generates a Finding | This detection rule also generates a finding    |
| Severity            | Informational                                   |
| Category            | CONFIGURATION                                   |
| Cloud Providers     | AWS                                             |
| Platform Module     | CSPM                                            |
| Asset Types         | ECS\_TASK\_DEFINITION                           |
| ATT\&CK Tactic      | TA0004 (TA0004)                                 |
| ATT\&CK Technique   | T1078.004 (T1078.004)                           |

### Description

AWS ECS Fargate task definitions using the 'root' user present a significant security risk. Using 'root' provides excessive privileges within the container, increasing the impact of a compromise.

Fargate task definitions specify the user used to run processes within the container. Using 'root' grants unrestricted access to the container's file system and resources. An attacker who compromises a container running as 'root' gains complete control, potentially impacting other containers or the underlying infrastructure.

Exploiting this misconfiguration could lead to data breaches, unauthorized access to sensitive resources, or complete host takeover. The elevated privileges associated with 'root' significantly increase the potential damage from a successful attack. Therefore, using a non-root user is crucial for minimizing the attack surface and limiting the potential impact of a compromise.

To mitigate this risk, utilize a dedicated, least-privileged user for each Fargate task definition. Create non-root users with only the necessary permissions to execute the application. Implement robust access control mechanisms and regularly review and update user permissions.

### Remediation

**Manual steps:**

ECS Task Definition - Manual remediation steps:

Create a task definition revision.

1. Open the Amazon ECS console.
2. From the navigation bar, choose the region that contains reported task definition.
3. In the navigation pane, choose Task Definitions.
4. On the Task Definitions page, select the box to the left of the task definition to revise and choose Create new revision with JSON.
5. On the Create new revision of Task Definition page, change the existing Container Definitions.
6. Under containerDefinitions, remove root from the user field and enter the non-root user you want the container to run as
7. Verify the information and choose Update, then Create.
8. If your task definition is used in a service, update your service with the updated task definition.
9. For deactivate previous task definition, Go back to Task Definitions and select the original task definition family.
10. In the Task definition: revision tab, select the older revision(s).
11. From the Actions menu, choose Deregister and click on Deregister button in the Deregister window.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-ecs-fargate-task-definition-root-user-found.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
