> 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/gcp-sql-server-instance-database-flag-3625-trace-flag-is-not-set-to-on.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP SQL server instance database flag 3625 (trace flag) is not set to on

### Synopsis

| Field               | Value                                                                    |
| ------------------- | ------------------------------------------------------------------------ |
| Rule Type           | Detection                                                                |
| Finding Type        | GCP SQL server instance database flag 3625 (trace flag) is not set to on |
| Finding ID          | 60000756                                                                 |
| Generates a Finding | This detection rule also generates a finding                             |
| Severity            | Informational                                                            |
| Category            | CONFIGURATION                                                            |
| Cloud Providers     | GCP                                                                      |
| Platform Module     | CSPM                                                                     |
| Asset Types         | GOOGLE\_CLOUD\_SQL\_DB\_INSTANCE                                         |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                          |
| ATT\&CK Technique   | T1685 (T1685)                                                            |

### Description

GCP SQL server instances that do not have database flag 3625 (trace flag) enabled risk exposing sensitive information in error messages. This misconfiguration can reveal internal system details to unauthorized users, increasing the attack surface. Ensuring this flag is 'on' is crucial for data protection and minimizing information leakage.

The Cloud SQL SQL Server instance database flag 3625 controls the masking of parameter values in specific error messages. When this flag is not set to 'on', error messages returned to users who are not members of the 'sysadmin' fixed server role may contain actual parameter values instead of masked characters like asterisks. This exposure can allow attackers to gain insights into database schema, application logic, or even sensitive data patterns, facilitating further exploitation.

The impact of this misconfiguration includes potential information disclosure, which could lead to reconnaissance by malicious actors. Exposed parameters in error messages provide valuable intel for crafting more targeted attacks, such as SQL injection or privilege escalation attempts. Enabling trace flag 3625 aligns with the principle of least privilege for information access, ensuring that sensitive internal details are not unnecessarily disclosed to non-administrative users.

To mitigate this risk, ensure that the database flag 3625 (trace flag) for all GCP SQL Server instances is explicitly set to 'on'. Regularly review database configurations to confirm adherence to this setting. Implement automated checks to detect deviations from this best practice and promptly remediate any instances where the flag is found to be 'off' to enhance overall security posture.

### Remediation

**Manual steps:**

Google Cloud SQL DB Instance - Manual remediation steps:

1. Log in to GCP console
2. Navigate SQL Instances page
3. Click on reported SQL server instance
4. Click on EDIT
5. If the flag has not been set on the instance,

   Under 'Flags and parameters', click on 'ADD FLAG' in 'New database flag' section, choose the flag '3625' from the drop-down menu and set the value as 'On'

   OR

   If the flag has been set to other than on, Under 'Flags and parameters', choose the flag '3625' and set the value as 'On'
6. Click on DONE
7. Click on SAVE


---

# 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/gcp-sql-server-instance-database-flag-3625-trace-flag-is-not-set-to-on.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.
