/

CVE-2026-53450

Severity:

HIGH RISK

(7.4)

Server-Side Request Forgery (CWE-918) via Coturn TURN

CVE-2026-53450

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Exposure of internal localhost-bound services via TURN relay

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Coturn suffers from a server-side request forgery issue where IPv4-mapped IPv6 loopback addresses bypass the default localhost protection in TURN relay handling.

Under certain configurations, an authenticated TURN client can cause the relay to access services bound only to 127.0.0.1 on the Coturn host, exposing internal interfaces that were expected to remain unreachable.

Affected context

This vulnerability arises in Coturn TURN/STUN server deployments where:

  • The server is configured with default loopback peer rejection (without explicitly hardened custom policies)
  • TURN relay traffic is allowed for authenticated clients
  • Services on the Coturn host listen only on localhost (127.0.0.1 / ::1) and are assumed to be inaccessible externally

In this context, the TURN server can inadvertently act as a proxy, allowing authenticated clients to reach localhost-bound services using specially crafted peer addresses.

Exploit preconditions

  • Attack surface: TURN relay functionality exposed by a Coturn server
  • Required access: Valid TURN client credentials to allocate and use relay endpoints
  • Trigger point: Submission of a TURN request containing a XOR-PEER-ADDRESS attribute with an IPv4-mapped IPv6 loopback address (e.g., ::ffff:127.0.0.1)
  • Why exploitation is possible: The loopback detection logic (ioa_addr_is_loopback) checks for the pure IPv6 loopback pattern before handling IPv4-mapped IPv6 addresses, meaning the default loopback guard does not treat these mapped addresses as localhost and does not reject them.

Why this happens

The core issue is an incomplete and order-dependent validation of peer addresses in the TURN server's loopback protection logic.

Coturn's ioa_addr_is_loopback routine focuses on recognizing the canonical IPv6 loopback form but fails to consistently classify IPv4-mapped IPv6 loopback addresses as localhost before policy decisions are made.

As a result, good_peer_addr does not apply the intended default rejection for loopback peers when they are represented in the mapped format, allowing authenticated clients to direct TURN relay traffic to 127.0.0.1 via ::ffff:127.0.0.1.

This pattern matches CWE-918: Server-Side Request Forgery (SSRF), where a server component unwittingly makes network requests to internal targets on behalf of a client due to insufficient target validation.

Potential impact

  • Authenticated clients can access services bound only to localhost on the Coturn host
  • Internal administrative APIs or debug endpoints may be exposed via TURN relay traffic
  • Attackers could interact with local databases or message brokers listening on 127.0.0.1
  • Sensitive configuration or status information may be retrieved from local management interfaces
  • Further compromise may occur if internal services trust localhost-originated connections

General mitigation guidance

Effective mitigation focuses on strengthening address validation and reducing implicit trust in localhost and internal network targets.

Common defensive patterns include:

  • Normalizing all incoming peer addresses to a canonical form before applying loopback and internal network checks
  • Treating both IPv4 and IPv6 loopback representations, including IPv4-mapped IPv6, as equally sensitive and subject to strict rejection by default
  • Implementing explicit allowlists for relay targets rather than relying on implicit assumptions about safety of particular address ranges
  • Segregating the TURN server from internal services so that even if relay traffic is misdirected, sensitive endpoints are not reachable
  • Ensuring local services do not automatically trust traffic simply because it appears to originate from localhost or the host's own network stack

How teams detect issues like this

Detection generally involves a mix of configuration review, code analysis, and traffic monitoring:

  • Static analysis and code review: Look for address validation routines that treat IPv4, IPv6, and IPv4-mapped IPv6 differently or apply checks in an order that leaves edge cases unprotected. Pay special attention to logic around loopback and private network ranges.
  • Configuration auditing: Review TURN server settings that govern peer address policies and relay constraints to confirm that loopback and internal segments are explicitly guarded.
  • Network monitoring: Use logging and intrusion detection systems to identify TURN traffic targeting localhost or unusual internal addresses, especially via XOR-PEER-ADDRESS attributes.
  • Policy enforcement: Introduce automated checks in deployment pipelines to flag configurations where the relay can reach host-local or otherwise sensitive interfaces, and to enforce standardized validation patterns for address handling.

Sources

SourceLink
github.comgithub.com/coturn/coturn/commit/b057acbebe721c8f2f202ddad5e16289e295c754
github.comgithub.com/coturn/coturn/security/advisories/GHSA-w4hf-cr3w-6h79

Frequently asked

questions

It is exploitable over the network by authenticated TURN clients.

The attacker does not need local shell access on the Coturn host but must be able to establish TURN allocations and send crafted relay requests.

The attacker needs valid TURN credentials to authenticate to the Coturn server and use its relay functionality.

Unauthenticated users cannot typically exploit this issue unless the server is configured to allow anonymous allocations.

The safest pattern is to normalize and strictly validate all target addresses before the server makes any outbound or relay connections.

Loopback and internal-network destinations should be treated as sensitive, with explicit rejection or tightly controlled allowlists that apply uniformly to IPv4, IPv6, and mapped address formats.

Future prevention should combine strong address validation with network design and policy controls:

  • Implement uniform validation routines that cover all address representations
  • Avoid assuming localhost or private ranges are inherently safe for server-initiated connections
  • Use segmentation and firewall rules to ensure proxy or relay components cannot reach sensitive internal services by default
  • Integrate security-focused code review and automated checks into CI/CD pipelines to catch SSRF patterns early in development.
Find out what's already
exploitable in your codebase.