> 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/privilege-escalation-and-lateral-movement-risk-due-to-a-google-cloud-run-service-80190b7a.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Privilege escalation and lateral movement risk due to a... (Google Cloud Run Service) (80190b7a)

### Synopsis

| Field               | Value                                                                                                                   |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Rule Name           | Privilege escalation and lateral movement risk due to a publicly exposed GCP Cloud Run Service with basic role assigned |
| Rule Type           | Detection                                                                                                               |
| Finding Type        | Privilege escalation and lateral movement risk due to a publicly exposed GCP Cloud Run Service with basic role assigned |
| Finding ID          | 60001410                                                                                                                |
| Generates a Finding | This detection rule also generates a finding                                                                            |
| Severity            | High                                                                                                                    |
| Category            | POSTURE                                                                                                                 |
| Cloud Providers     | GCP                                                                                                                     |
| Platform Module     | CSPM                                                                                                                    |
| Asset Types         | GOOGLE\_CLOUD\_RUN\_SERVICE                                                                                             |

### Description

Publicly exposed GCP Cloud Run Services with basic roles ('Viewer', 'Editor', 'Owner') assigned pose a significant privilege escalation and lateral movement risk. Attackers could exploit this attack path to gain unauthorized access and perform malicious actions within the cloud environment.

Attackers might leverage publicly accessible Cloud Run services with overly permissive roles to gain initial access. Successful exploitation could lead to unauthorized data access, modification, or deletion, and further lateral movement within the GCP environment. This compromises data confidentiality, integrity, and availability.

Mitigate this risk by immediately reviewing and restricting access to the Cloud Run service. Grant only the least privilege necessary; replace basic roles with more granular, role-based access control (RBAC) configurations. This minimizes the attack surface and limits potential damage from compromised credentials.

Restrict public access to the Cloud Run service. Implement robust network security controls, such as firewalls and intrusion detection systems, to monitor and prevent unauthorized access attempts. Prioritize implementing least privilege access and regularly audit role assignments.

### Remediation

```
[PUBLIC_ACCESS]
```

It is recommended to review and add appropriate, but restrictive roles before revoking access.

1. Log in to the GCP console
2. Navigate to the Cloud Run
3. Go to 'Services' tab
4. Select the required cloud run service
5. Click on 'PERMISSIONS' button
6. Filter for 'allUsers'
7. Click on 'Remove principal' button (pencil icon)
8. Select 'Remove allUsers from all roles on this resource. They may still have access via inherited roles.'
9. Click 'Remove'
10. Repeat steps 6-9 for 'allAuthenticatedUsers'

    ```
    [PERMISSION]
    ```
11. Log in to the GCP console
12. Navigate to the IAM service
13. Find the binding between the service account used by the Cloud Run Service and the GCP basic role
14. Remove the binding
15. Create a new binding with predefined or custom role without risky permissions, if necessary. Repeat if there is a binding of the service account with another GCP basic role


---

# 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/privilege-escalation-and-lateral-movement-risk-due-to-a-google-cloud-run-service-80190b7a.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.
