Slack DTLS uses a private key that is in the public domain, which may lead to SRTP stream hijack
Slack's WebRTC calls used a DTLS certificate and private key that were previously published in the Janus open-source project, so the key is effectively public. An attacker in a man-in-the-middle position could present that certificate to a victim's client and take over the SRTP media stream, though the text says a full two-way interception does not appear possible.
Originally disclosed on HackerOne
- Triaged in 8 hours
- Fixed in 45 days
- Paid in 45 days
- Disclosed after 11 months
Summary by the researcher
DTLS certificate used for Slack WebRTC calls was previously included in the Janus (WebRTC server) together with the private key, thus considered public domain.
The report
- Affects: Janus DTLS certificate
Description
The Janus server in use by Slack is configured using a certificate and private key that were previously distributed by default. This certificate is used to authenticate the DTLS connection which is later used to exchange keys for the SRTP stream. As a result, the confidentiality of the WebRTC call over Slack cannot be ensured.
How to reproduce the issue
- Start Wireshark and set a display filter for stun
- In the web browser, open
about:webrtc-internals - Start a call on Slack
- Observe the packets containing the string rainmaker which would be part of the DTLS certificate
- Notice that the
SetRemoteDescriptionfingerprint in theabout:webrtc-internalspage isC5:5F:DA:7D:84:47:B1:BF:6B:55:16:62:48:31:3E:D3:F1:7B:25:89:92:4A:4B:4D:4D:D9:D5:AF:EA:D8:15:44
The old certificate can be obtained from the following commit where it was previously removed:
https://github.com/meetecho/janus-gateway/commit/6f98f2dde644b3ead4a162c241dff9da1587ec13
The certificate's SHA256 checksum can be calculated using the OpenSSL command line tool as follows:
openssl x509 -noout -fingerprint -sha256 -inform pem -in janus-cert1.crt
SHA256 Fingerprint=C5:5F:DA:7D:84:47:B1:BF:6B:55:16:62:48:31:3E:D3:F1:7B:25:89:92:4A:4B:4D:4D:D9:D5:AF:EA:D8:15:44
Attachments:
dump-stun.pcapng: contains the data stream containing the TURN tunnelled DTLS exchange and SRTP stream that followsjanus-cert1.crtandjanus-cert1.keyare the certificate and key in use by Slack2019-04-07_16-06-wireshark.pngshows the certificate in the Wireshark dump2019-04-07_16-13-fingerprint.pngshows the SHA256 fingerprint which matches the public certificate and corresponding private key
An attacker would probably need to take the following steps to exploit this issue in the case of Slack:
- Start a man-in-the-middle attack using any known method (ARP cache poisoning, DNS cache poisoning, static routes on compromised network router etc)
- Actively hijack the Slack TURN servers between the victim and the Internet
- Wait for victim to make a Slack call
- Handle STUN packets from victim to attacker-controlled TURN server; allow authentication with any password
- Start DTLS exchange
- When DTLS certificate is required, present victim with the Janus default certificate
- The attacker does NOT verify the victim's DTLS certificate
- The SRTP Master Key is set over this DTLS connection
- Attacker can now handle the SRTP stream between the victim and attacker
Solutions and recommendations
It is recommended to generate a new certificate and private key.
Impact
Attackers positioned as man-in-the-middle may hijack the DTLS connection and set their own SRTP keys, handling the SRTP stream instead of Slack. This is still research in progress but it does not appear that attackers can perform a two-way MITM attack due to the mutual authentication required by the DTLS exchange. Therefore, it seems that this vulnerability can only be abused to hijack the SRTP stream between the WebRTC client and Slack but not the other way round.
Attachments


Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Slack deployment reused a default DTLS certificate and private key that had been published with the Janus project instead of generating its own unique pair.
Impact
An attacker positioned as a man-in-the-middle may hijack the DTLS connection and set their own SRTP keys, handling the SRTP stream instead of Slack; the text says a two-way MITM does not appear possible because of mutual authentication.
What the attacker needed
Attacker can man-in-the-middle the network; victim starts a Slack call; attacker controls or hijacks the TURN path
The fix
A new certificate and private key should be generated so the deployment no longer relies on a publicly known key pair.
How it was found
- Start Wireshark and filter for STUN traffic.
- Open the browser's WebRTC internals page.
- Start a Slack call.
- Look for packets containing the certificate's identifying string.
- Compare the remote description fingerprint shown in the browser with the known public certificate fingerprint.
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 report has not been written yet. The Original tab links to the source.
WebRTC calls use a handshake called DTLS to agree on encryption keys, and each side proves who it is with a certificate. If the private key behind that certificate is public, anyone can pretend to be the server. Here Slack reused a certificate whose private key had been shipped with an open-source project, so someone who can sit between you and Slack could impersonate the call server and read or replace the media stream.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.