CVE-2020-4067

7.0 HIGH

📋 TL;DR

CVE-2020-4067 is an information disclosure vulnerability in coturn STUN/TURN servers where uninitialized memory buffers allow attackers to leak data from other client connections. Attackers can query the server to extract sensitive information from padding bytes of other clients' sessions. This affects all coturn servers running versions before 4.5.1.3.

💻 Affected Systems

Products:
  • coturn
Versions: All versions before 4.5.1.3
Operating Systems: All operating systems running coturn
Default Config Vulnerable: ⚠️ Yes
Notes: All coturn deployments using vulnerable versions are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could extract authentication tokens, session identifiers, or other sensitive data from other clients' connections, potentially leading to account takeover or session hijacking.

🟠

Likely Case

Information leakage of random memory contents from other client sessions, which could include partial authentication data or connection metadata.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent unauthorized clients from reaching the coturn server.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires network access to the coturn server but no authentication. The vulnerability is well-documented in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.5.1.3

Vendor Advisory: https://github.com/coturn/coturn/security/advisories/GHSA-c8r8-8vp5-6gcm

Restart Required: Yes

Instructions:

1. Stop the coturn service. 2. Update to version 4.5.1.3 or later using your package manager or compile from source. 3. Restart the coturn service. 4. Verify the new version is running.

🔧 Temporary Workarounds

Network Access Restriction

linux

Restrict network access to coturn servers to only trusted clients and networks.

iptables -A INPUT -p tcp --dport 3478 -s trusted_network -j ACCEPT
iptables -A INPUT -p udp --dport 3478 -s trusted_network -j ACCEPT
iptables -A INPUT -p tcp --dport 3478 -j DROP
iptables -A INPUT -p udp --dport 3478 -j DROP

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate coturn servers from untrusted networks
  • Monitor coturn logs for unusual connection patterns or repeated queries from single sources

🔍 How to Verify

Check if Vulnerable:

Check coturn version with 'turnserver -v' or 'coturn --version' and compare against 4.5.1.3

Check Version:

turnserver -v 2>&1 | head -1

Verify Fix Applied:

Confirm version is 4.5.1.3 or higher and test STUN/TURN functionality remains operational

📡 Detection & Monitoring

Log Indicators:

  • Unusual volume of STUN/TURN requests from single IP addresses
  • Repeated connection attempts with varying parameters

Network Indicators:

  • High volume of STUN/TURN traffic to single endpoints
  • Patterns of repeated queries with small variations

SIEM Query:

source="coturn.log" | stats count by src_ip | where count > threshold

🔗 References

📤 Share & Export