Details about CVE-2020-26262, bypass of Coturn’s default access control protection
Coturn's default access control, which blocks relaying to loopback addresses, could be bypassed by using [redacted] on IPv4 or [::1] on IPv6, allowing an attacker to connect to services on the TURN server itself. The text also notes that [::] was not blocked at all.
rtcsec.com
Published on rtcsec.com
Sandro Gauci, Enable Security
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the access control only checked for the specific loopback address [redacted] (and failed to properly handle IPv6 loopback and the unspecified address), rather than blocking the whole loopback range and equivalent addresses.
Impact
An attacker could use the TURN server to connect to services running on the same machine, such as the RPC port, potentially accessing internal services; the text notes that only one live environment was found vulnerable and only over UDP.
What the attacker needed
Coturn server with default config; attacker can reach the TURN server; TURN credentials (if required)
The fix
The issue was fixed in coturn version 4.5.2 by blocking [redacted]/8 and [::] by default and correctly parsing the IPv6 loopback address [::1].
How it was found
- Configure a TURN server with default settings.
- Use a TURN client to request a relay to [redacted] (IPv4) or [::1] (IPv6).
- Observe that the connection to the local service is allowed instead of being blocked.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A TURN server helps relay internet traffic for video calls. It is supposed to block connections to the machine it runs on (localhost) to stop misuse. This report shows that the block could be avoided by using a different address that still points to the same machine, so an attacker could reach services that should be off-limits.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.