> 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/azure-network-security-group-allows-all-traffic-on-smtp-tcp-port-25.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Azure Network Security Group allows all traffic on SMTP (TCP Port 25)

### Synopsis

| Field               | Value                                                                 |
| ------------------- | --------------------------------------------------------------------- |
| Rule Type           | Detection                                                             |
| Finding Type        | Azure Network Security Group allows all traffic on SMTP (TCP Port 25) |
| Finding ID          | 60000199                                                              |
| Generates a Finding | This detection rule also generates a finding                          |
| Severity            | Medium                                                                |
| Category            | CONFIGURATION                                                         |
| Cloud Providers     | AZURE                                                                 |
| Platform Module     | CSPM                                                                  |
| Asset Types         | AZURE\_SECURITY\_GROUP                                                |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                       |
| ATT\&CK Technique   | T1686.001 (T1686.001)                                                 |

### Description

Azure Network Security Groups (NSGs) permitting all inbound traffic on TCP port 25 (SMTP) pose a significant security risk. This misconfiguration exposes the associated Virtual Machines to unauthorized SMTP access, enabling attackers to send spam, relay malicious emails, or compromise email servers.

The NSG's rule allowing unrestricted inbound SMTP traffic bypasses crucial security controls. Without proper filtering, any untrusted IP address can connect to the Virtual Machine's SMTP service. This creates opportunities for attackers to exploit the open port, initiating denial-of-service attacks, data breaches, or malware distribution through email.

Such a misconfiguration could lead to significant reputational damage, financial losses, and regulatory non-compliance. Restricting SMTP access to trusted sources ensures that only authorized parties can interact with the mail server, thus minimizing the attack surface and reducing the risk of compromise. Proactive control over email traffic is essential for maintaining a secure environment.

To mitigate this risk, implement NSG rules that allow SMTP traffic only from explicitly defined, trusted IP addresses or subnets. Regularly review and update these rules as needed. Consider using additional security measures such as email authentication protocols to further enhance email security.

### Remediation

**Manual steps:**

Azure Security Group - Manual remediation steps:

Before making any changes, please check the impact to your applications/services. Evaluate whether you want to edit the rule and limit access to specific users, hosts, and services only, deny access, or delete the rule completely.

1. Log in to the Azure Portal.
2. Select 'All services'.
3. Select 'Network security groups', under NETWORKING.
4. Select the Network security group you need to modify.
5. Select 'Inbound security rules' under Settings.
6. Select the rule you need to modify, and edit it to allow specific IP addresses OR set the 'Action' to 'Deny' OR 'Delete' the rule based on your requirement.
7. 'Save' your changes.


---

# 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/azure-network-security-group-allows-all-traffic-on-smtp-tcp-port-25.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.
