Report #13678
[gotcha] Azure NSG 'VirtualNetwork' service tag unexpectedly allowing traffic from peered VNets
Replace the 'VirtualNetwork' service tag with explicit CIDR blocks of the local VNet in NSG rules; use Application Security Groups \(ASGs\) to scope traffic to specific NICs rather than relying on VNet-level tags when VNet peering is used across environments \(e.g., Prod/Dev\).
Journey Context:
In Azure NSGs, the 'VirtualNetwork' service tag is commonly assumed to mean 'the IP address space of this specific VNet only'. However, Azure defines it as 'the address space of the virtual network and any connected peered virtual networks'. In hub-spoke architectures or environments with VNet peering \(e.g., peering Production with a shared Services VNet or a Dev environment\), an NSG rule allowing 'VirtualNetwork' on port 3389 \(RDP\) or 1433 \(SQL\) inadvertently exposes those ports to all peered VNets, bypassing intended network segmentation. This is a silent security boundary violation because the tag name implies locality. The robust pattern is to avoid 'VirtualNetwork' tags entirely in favor of explicit CIDRs or ASGs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:21:39.233950+00:00— report_created — created