Session Traversal Utilities for NAT (STUN) is a protocol that helps clients discover their public-facing address and NAT behaviour for real-time communications. Attackers can use it to map network reachability or support traversal for media sessions. Defenders should control where STUN is allowed, monitor unexpected use, and understand its role in wider voice and video exposure.
How STUN Works in Real-Time Communications
STUN is a lightweight signalling protocol used by clients to learn how they appear to the public internet through network address translation. In practice, it helps applications discover the reflexive address and the NAT mapping behaviour they can use for voice, video and other interactive sessions.
This makes STUN useful early in a connection setup, before media flows, because the client can test reachability and adapt how it tries to contact peers. It is not a media protocol itself, but it often sits alongside other traversal mechanisms in real-time communication stacks.
Why STUN Matters for Connectivity and Exposure
STUN solves a real connectivity problem, but it also reveals useful network facts. A successful STUN exchange can expose the public-facing address a client is using, confirm whether traffic is leaving through a NAT, and indicate how reachable that endpoint may be from the outside.
That visibility is valuable for legitimate communications, yet it can also broaden an organisation’s attack surface if the protocol is allowed from places it should not be. The security question is less about STUN as a standalone risk and more about where it is permitted, who can use it, and what that reveals about the environment.
Where STUN Fits in VoIP and Video Architectures
STUN is commonly associated with browser-based calling, softphones and other RTC systems that need to establish direct peer connectivity. It often works as one component in a broader traversal design, alongside ICE, TURN and application-specific signalling.
Because of that role, STUN traffic can be easy to overlook in firewall, proxy and monitoring policy. A network that is not expecting interactive media may still see STUN requests from endpoints, conferencing services or embedded communication features in business applications.
What Defenders Should Watch For
For defenders, the practical issue is distinguishing approved real-time communications from unexpected or unauthorised use. Monitoring should focus on whether STUN is being sent only from sanctioned applications and approved egress points, rather than appearing as unexplained outbound UDP activity.
When STUN shows up unexpectedly, it may indicate shadow communications tooling, an application that is reaching out for traversal support without review, or a system that is mapping local reachability in a way the organisation did not intend.
Risk and Threat Considerations
STUN can be abused as a low-noise way to discover public reachability and network translation behaviour, especially where egress is broad and logging is thin. That makes it useful both for reconnaissance and for supporting communication paths that bypass the assumptions of perimeter-only control.
Failure mechanism: If STUN is reachable from untrusted systems or is left broadly allowed across user networks, an attacker or rogue application can use it to confirm external address exposure and support traversal for session setup.
Impact: The result can be improved attacker visibility into network posture, weaker control over who can initiate media-capable sessions, and a larger opportunity for undesired voice, video or other real-time communication exposure.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | DE.CM-01 — Networks and network services are monitored to find potential cybersecurity events | STUN use is a network-service activity that should be monitored for unexpected exposure or misuse. |
| PR.PS-05 — Configurations, including software and firmware, are managed consistent with policy | Allowing STUN only where approved is a configuration and policy control over a network service. | |
| PR.AA-05 — Network integrity is protected, incorporating network segmentation and traffic management | STUN exposure depends on traffic handling and segmentation across user and media networks. | |
| Recommendation — Monitor STUN egress and alert on unexpected protocol use from unmanaged endpoints. Restrict STUN to approved applications, ports and egress paths by policy. Segment and filter STUN traffic so only sanctioned real-time communications can traverse it. | ||
| CIS Controls v8 | CIS-4 — Secure Configuration of Enterprise Assets and Software | STUN allowance is a configuration decision that should be standardised and controlled. |
| CIS-12 — Network Infrastructure Management | STUN is a network protocol whose permitted use and monitoring belong in network infrastructure management. | |
| Recommendation — Harden host and network configurations so only approved STUN paths remain open. Manage and monitor STUN on firewalls, routers and egress controls as part of network administration. | ||
Practitioner Guidance
What to watch for: Treat STUN as a policy-controlled protocol, not a default commodity service. If your environment uses real-time communications, define which applications, destinations and network zones are allowed to use it, and ensure that those exceptions are deliberate.
Governance implication: STUN should be reviewed alongside broader RTC and egress policy so that teams understand whether it is needed, where it is permitted and how unexpected use will be investigated.
Related resources from NHI Mgmt Group
- Guide: Network Ports and Protocols Security Guide
- What breaks when NAT traversal is too restrictive for peer-to-peer access?
- What breaks when remote connectivity depends only on NAT traversal and DERP fallback?
- What are the signs that a NAT traversal setup is failing to establish a direct path?
- What are the signs that NAT traversal is falling back too often?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org