> 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-virtual-network-subnet-is-not-configured-with-a-network-security-group.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Azure Virtual Network subnet is not configured with a Network Security Group

### Synopsis

| Field               | Value                                                                        |
| ------------------- | ---------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                    |
| Finding Type        | Azure Virtual Network subnet is not configured with a Network Security Group |
| Finding ID          | 60000239                                                                     |
| Generates a Finding | This detection rule also generates a finding                                 |
| Severity            | Medium                                                                       |
| Category            | CONFIGURATION                                                                |
| Cloud Providers     | AZURE                                                                        |
| Platform Module     | CSPM                                                                         |
| Asset Types         | AZURE\_SUBNET                                                                |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                              |
| ATT\&CK Technique   | T1685 (T1685)                                                                |

### Description

Azure Virtual Network subnets lacking associated Network Security Groups (NSGs) present a significant security misconfiguration.

Azure Virtual Networks utilize subnets to organize virtual machines and other resources. NSGs filter network traffic based on pre-defined rules, enhancing security by controlling inbound and outbound connections. Omitting an NSG from a subnet leaves all resources within that subnet vulnerable to unauthorized access and attacks, potentially leading to data breaches or service disruptions. Untrusted IPs can freely access resources within the unprotected subnet.

The impact of this misconfiguration is substantial, exposing all VMs and resources in the affected subnet to various threats. Implementing NSGs at the subnet level provides a crucial layer of defense, enforcing consistent security policies across all resources within a subnet. This greatly reduces the attack surface and limits the potential damage from successful exploits.

To mitigate this risk, associate an NSG with each subnet. Configure appropriate inbound and outbound rules within the NSG to allow only necessary network traffic. Regularly review and update NSG rules to adapt to changing security needs. Prioritize least privilege access principles when defining rules.

For more information, <https://learn.microsoft.com/en-gb/archive/blogs/igorpag/azure-network-security-groups-nsg-best-practices-and-lessons-learned> <https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#limitations>

Note: This policy will not report for subnets used by Azure Firewall Subnet, Azure Firewall Management Subnet, Gateway Subnet, NetApp File Share, Route Server Subnet, Private endpoints and Private links as Azure recommends not to configure Network Security Group (NSG) for these services.

### Remediation

**Manual steps:**

Azure Subnet - Manual remediation steps:

1. Log in to the Azure Portal.
2. Select 'Virtual Networks', and select the virtual network you need to modify.
3. Select 'Subnets', and select the subnet you need to modify.
4. Select the Network security group (NSG) you want to associate with the subnet.
5. '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-virtual-network-subnet-is-not-configured-with-a-network-security-group.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.
