CVE-2020-26262
📋 TL;DR
CVE-2020-26262 is a vulnerability in Coturn TURN/STUN servers that allows attackers to bypass loopback address restrictions and relay packets to the local loopback interface. This affects Coturn servers with default configurations, potentially enabling attackers to access services bound to localhost that should be inaccessible from external networks.
💻 Affected Systems
- coturn
📦 What is this software?
Coturn by Coturn Project
Fedora by Fedoraproject
Fedora by Fedoraproject
⚠️ Risk & Real-World Impact
Worst Case
Attackers could relay traffic to sensitive services listening only on localhost (like databases, admin interfaces, or internal APIs), potentially leading to data theft, privilege escalation, or service disruption.
Likely Case
Unauthorized access to internal services that administrators assumed were protected by loopback restrictions, potentially exposing configuration data or enabling lateral movement.
If Mitigated
If loopback peers are explicitly denied or proper network segmentation exists, impact is limited to potential information disclosure about internal network structure.
🎯 Exploit Status
Exploitation requires sending specially crafted CONNECT requests with XOR-PEER-ADDRESS set to 0.0.0.0, ::1, or ::. Public advisories include technical details.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 4.5.2
Vendor Advisory: https://github.com/coturn/coturn/security/advisories/GHSA-6g6j-r9rf-cm7p
Restart Required: Yes
Instructions:
1. Download Coturn 4.5.2 or later from official repository. 2. Stop Coturn service. 3. Install/upgrade to patched version. 4. Restart Coturn service. 5. Verify version with 'turnserver -v'.
🔧 Temporary Workarounds
Deny loopback and unspecified addresses
allExplicitly deny 0.0.0.0/8, ::1, and :: addresses in Coturn configuration
Add to turnserver.conf: denied-peer-ip=0.0.0.0/8
Add to turnserver.conf: denied-peer-ip=::1
Add to turnserver.conf: denied-peer-ip=::
🧯 If You Can't Patch
- Implement network-level controls to restrict access to Coturn servers from untrusted networks
- Monitor for suspicious CONNECT requests with 0.0.0.0, ::1, or :: peer addresses
🔍 How to Verify
Check if Vulnerable:
Check Coturn version with 'turnserver -v' or examine running process. Versions below 4.5.2 are vulnerable.
Check Version:
turnserver -v
Verify Fix Applied:
Confirm version is 4.5.2 or higher and check configuration includes denied-peer-ip settings for 0.0.0.0/8, ::1, and ::.
📡 Detection & Monitoring
Log Indicators:
- CONNECT requests with XOR-PEER-ADDRESS containing 0.0.0.0, ::1, or ::
- Successful CONNECTIONBIND responses following such CONNECT requests
Network Indicators:
- Unusual TURN relay traffic to loopback addresses
- External IPs attempting to establish relays to 127.x.x.x ranges
SIEM Query:
source="coturn.log" AND ("XOR-PEER-ADDRESS=0.0.0.0" OR "XOR-PEER-ADDRESS=::1" OR "XOR-PEER-ADDRESS=::")
🔗 References
- https://github.com/coturn/coturn/blob/57180ab60afcaeb13537e69ae8cb8aefd8f3f546/ChangeLog#L48
- https://github.com/coturn/coturn/commit/abfe1fd08d78baa0947d17dac0f7411c3d948e4d
- https://github.com/coturn/coturn/security/advisories/GHSA-6g6j-r9rf-cm7p
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G54UIUFTEC6RLPOISMB6FUW7456SBZC4/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M4CJOPAQT43MYAFU3UROGLEXN3Z6RS4H/
- https://github.com/coturn/coturn/blob/57180ab60afcaeb13537e69ae8cb8aefd8f3f546/ChangeLog#L48
- https://github.com/coturn/coturn/commit/abfe1fd08d78baa0947d17dac0f7411c3d948e4d
- https://github.com/coturn/coturn/security/advisories/GHSA-6g6j-r9rf-cm7p
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G54UIUFTEC6RLPOISMB6FUW7456SBZC4/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M4CJOPAQT43MYAFU3UROGLEXN3Z6RS4H/