
Key takeaways
• DTLS-SRTP encrypts the media path by default in WebRTC, but does not protect media from your SFU operator—who sees every byte if you don't implement end-to-end encryption (SFrame/insertable streams).
• The five real attacks we block in audits: signaling man-in-the-middle (hijack TURN credentials), IP leak via mDNS host candidates, replay attacks on ephemeral tokens, zooming into a guest audio stream via missing ACLs, and deepfake injection at signaling.
• HIPAA and GDPR are not on-by-default. You must add BAAs to TURN vendors, disable recording without consent recording, log all access, and implement deletion on request—browser crypto alone will not pass an audit.
• mDNS host candidates are your largest IP-leak vector in the browser. Disable them in a production profile; switch to TURN-only mode for anything patient-data or real-time-trading.
• Securing WebRTC at production scale is hard. Fora Soft has shipped it 15+ times (BrainCert, CirrusMED, Cloud Doctors, TransLinguist, Nucleus)—and we still test every permutation in a lab before go-live.
Why Fora Soft wrote this guide
Fora Soft has been shipping real-time video security for 20 years. In the last three years alone, we have audited WebRTC deployments at 15+ companies and performed 8 penetration tests in the telemedicine, EdTech, and financial-services verticals. Every time, we find the same gaps: developers confuse what the browser encrypts (signaling channel is NOT encrypted by default) with what they must encrypt themselves (media between the client and a non-zero-knowledge SFU). Every time, IP-leak via mDNS host candidates surprises HIPAA teams. And every time, teams ship without a HIPAA-compliant video platform playbook, missing BAA signatures and audit-log retention.
This guide answers the five questions we hear every week. "Is WebRTC encrypted by default?" (Media: yes. Signaling: no. SFU operator access: yes, unencrypted unless you add SFrame.) "Can a penetration test ever pass if the SFU can see the video?" (In HIPAA: only if your BAA and DPIA document that the SFU is a Business Associate, you log every access, and the client has end-to-end encryption keys the SFU never sees.) "What does a real attack look like?" (Signaling replay via leaked TURN credentials, IP exfiltration via mDNS host candidates, zooming into patient audio without room ACLs). We built this guide from the CirrusMED, BrainCert, and Cloud Doctors security reviews—real production code, real compliance findings, real pen-test reports.
Need a security audit before you ship?
Fora Soft audits WebRTC deployments end-to-end: signaling auth, end-to-end encryption posture, HIPAA/GDPR gaps, and penetration tests.
The three layers of WebRTC security
When auditing WebRTC deployments, we think about security in three layers. The first layer is what the browser provides—DTLS-SRTP, ICE candidates, CORS consent on the signaling endpoint. The second layer is what your signaling server must provide—token validation, replay-attack mitigation, room ACLs, rate-limiting. The third layer is what your client code must add—end-to-end encryption (if the SFU is untrusted), auth header validation on WebSocket upgrades, and consent capture before media starts.
A common mistake is assuming that if layer 1 (the browser) is "encrypted," then you’re done. You are not. DTLS-SRTP encrypts the media in transit between the client and the SFU, but the SFU operator can see the decrypted pixels if they decide to extract them—and they might decide to, legally or otherwise. In 2026, "secure" WebRTC means all three layers working together. We will walk through each layer, show you what breaks, and show you what we see in production audits.
What WebRTC encrypts by default
DTLS-SRTP is the default. Every WebRTC peer-to-peer connection uses Datagram TLS (DTLS) to agree on a symmetric encryption key, and then SRTP (Secure Real-time Transport Protocol) to encrypt every audio and video frame in flight. This means that if Alice calls Bob directly (peer-to-peer, no SFU), then Alice's encrypted video bytes cannot be read by anyone on the network path between them—not your ISP, not Comcast, not a café router. DTLS-SRTP is browser-level; you do not have to ask for it or configure it. It is on by default.
But here is the catch: DTLS-SRTP does not encrypt the media between the browser and a Selective Forwarding Unit (SFU). The SFU is a media server that sits in the middle of a group call. Alice sends her encrypted video to the SFU. The SFU decrypts it (it has the DTLS keys; Alice and the SFU performed a DTLS handshake), looks at the pixels, and then re-encrypts the video to send onward to Bob, Charlie, and Diana. From the client’s point of view, every frame is encrypted in transit. But the SFU operator can see the unencrypted frame inside the SFU process memory.
What WebRTC does not encrypt. Signaling messages (the WebSocket messages that say "please call Bob," "here is my offer," "here is my answer") are NOT encrypted by WebRTC itself. You must put signaling behind TLS (HTTPS/WSS). The ICE candidate list (IP addresses and port numbers that a peer can be reached at) is NOT encrypted—it is sent in the SDP, inside the signaling message. If your signaling channel is unencrypted, an attacker can read your IP address and all candidate addresses from the signaling message. Metadata—call start time, call end time, participant roster, chat messages—is NOT encrypted unless you encrypt it at the application layer.
Reach for DTLS-SRTP when: You are shipping a one-to-one call (peer-to-peer) and you trust the network path but not the ISP; you have peer-to-SFU calls and you trust the SFU operator; or you are just starting and need a baseline. DTLS-SRTP is table-stakes, not a substitute for end-to-end encryption.
End-to-end encryption: When DTLS-SRTP is not enough
SFrame is the emerging standard for E2EE in WebRTC. The WebRTC standards body (IETF) published SFrame (RFC 9143) in early 2022. SFrame is a lightweight encryption layer that wraps each video and audio frame with its own encryption key. Alice encrypts her video frames with a key that only she knows (and that she optionally shares out-of-band with Bob and Charlie). The SFU receives Alice’s encrypted frames, does not decrypt them, and forwards them unchanged. Bob and Charlie receive the encrypted frames, decrypt them with the key they received from Alice, and see the video. The SFU never sees the unencrypted pixels.
How do you use SFrame? You use the WebRTC Insertable Streams API (Chrome / Edge / Firefox, not Safari yet) to intercept the raw video frame before SRTP encryption, add your SFrame header, run your own AES-256-GCM encryption on the frame, and then pass it on to the network. The performance cost is small—AES-256-GCM is hardware-accelerated on modern CPUs—but the usability cost is high. SFrame is a research project; the IETF spec is stable, but library support (inside webrtc.js or Pion or Jitsi) is still rolling out. You will probably hand-roll the encryption logic or use a third-party library like Agora’s E2EE module (which is not open-source), or you will wait for broader support in 2026–2027.
Perceptual hash leakage. Even if you implement SFrame perfectly, an SFU operator can use a perceptual hash (compute a hash of the encrypted frame, not the plaintext) to guess what the video contains. If a patient is on a call and their background is a specific painting, the perceptual hash of "patient + painting" will match a database of known hashes, and the SFU operator can infer that the call contains a patient without ever decrypting the pixels. This is a theoretical attack; we do not see it in production audits yet. But it is a vector.
Reach for SFrame when: Your SFU operator is a third party (AWS Kinesis, Agora, Twilio), you are a telemedicine or financial-services platform and the call content is regulated, or you have a HIPAA BAA but the BAA does not grant the SFU permission to see patient video.
The IP-leak problem and how to mitigate
mDNS host candidates leak your private IP. When a browser initiates a WebRTC connection, it gathers a list of IP addresses that the peer can reach it at. This list includes the local network IP (e.g. 192.168.1.100), the public IP (e.g. 203.0.113.42), and a multicast-DNS hostname (e.g. a1b2c3d4.local). The hostname is resolved at connection time and converted to a local IP. But the hostname itself is sent unencrypted in the SDP (Session Description Protocol) inside the signaling message. An attacker who can eavesdrop on the signaling channel (HTTP, not HTTPS; WebSocket, not WSS) can read the mDNS hostname, resolve it locally, and learn your private IP. This is a real attack we block in every HIPAA audit.
Two mitigations. First, use HTTPS/WSS for signaling. Second, disable mDNS host candidates in the RTCConfiguration. In Chrome, set iceTransportPolicy: 'relay' to force all media through a TURN server. This has a performance cost—you lose peer-to-peer (P2P) connections and force all traffic through your TURN infrastructure—but you gain privacy. In a telemedicine app, the trade-off (10–15 ms extra latency for patient privacy) is worth it.
TURN-only deployment. If you deploy TURN-only mode, budget for TURN bandwidth and CPU. A 1-to-1 call uses ~500 Kbps. A 10-person call with a 2 Mbps video stream uses ~20 Mbps egress. A 500-user call with archived recording uses ~1 Gbps egress. Hetzner AX-series dedicated servers offer 10 Gbps unmetered; AWS Kinesis TURN is $0.30 per GB. For a HIPAA-compliant platform, on-prem TURN on Hetzner is cheaper at scale and gives you physical control over the egress IP.
Reach for TURN-only mode when: Your platform handles regulated data (telemedicine, financial, PII); you have a static server IP and can peer with ISP directly; or you have >1 million concurrent users and need to amortize TURN costs over the user base.
Same-Origin Policy and CORS misconfigs
The SOP guards signaling. If your signaling endpoint is on https://api.example.com/signal, then a script running on https://attacker.com cannot send a POST request to /signal without your CORS headers explicitly allowing it. But many teams configure CORS like this:
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST, GET, OPTIONS Access-Control-Allow-Credentials: true
This is a vulnerability. The wildcard (*) means any domain can make a request. If your signaling endpoint accepts WebSocket upgrades and you also send Access-Control-Allow-Credentials: true, then a logged-in user on attacker.com can initiate a call on behalf of the logged-in user on your app—because the browser will send the user’s session cookie along with the upgrade request.
The fix: Set Access-Control-Allow-Origin: https://yourdomain.com (specific domain), and never use Credentials: true on cross-origin requests. If you need user context in signaling, send a JWT in the Authorization header instead (details in the authentication section below).
WebSocket signaling security
Signaling is not encrypted by WebRTC. When Alice’s browser says to your signaling server, "I want to call Bob," that message is sent over WebSocket. If the WebSocket is not TLS-encrypted (WSS, not WS), then an attacker on the network path can read that message, extract Bob’s user ID, and hijack the call. The fix is to always use WSS (WebSocket Secure). But we still see deployments in 2026 that use plain WS for signaling.
Origin validation on the server side. Your signaling server should check the Origin header of the WebSocket upgrade request. If the request comes from attacker.com and you are expecting yourdomain.com, reject it. Example in Node.js / Express:
const origin = req.get('origin');
if (origin !== 'https://yourdomain.com') {
res.status(403).send('Origin not allowed');
return;
}
Message authentication. Every signaling message (offer, answer, ICE candidate) should be authenticated with a timestamp and an HMAC. If Alice sends an offer at time T, the server should include a timestamp in the message, and Bob’s client should reject the offer if the timestamp is more than 30 seconds old. This blocks replay attacks where an attacker captures an old offer, waits for the connection to close, and then re-sends the old offer to re-establish a stale connection.
The five attacks we see in real audits
We have performed 8 penetration tests and 20+ security reviews of WebRTC deployments. Here are the five attacks that appear in every audit report if not mitigated.
1. Signaling man-in-the-middle (MitM) and credential hijacking. An attacker eavesdrops on the signaling channel, captures the TURN credentials (username, password, realm) sent by the server, and then initiates their own connection to the TURN server using those credentials. They can now relay traffic on behalf of the hijacked user. Mitigation: use WSS (not WS), use ephemeral TURN credentials that expire in 1 hour, and log all TURN credential requests.
2. Replay attacks on signaling messages. An attacker captures a valid offer/answer exchange and replays it hours later to re-establish a stale connection. If the room is using ACLs and the attacker is not in the ACL anymore, they can still forge a connection. Mitigation: include a timestamp and random nonce in every signaling message, reject messages older than 60 seconds, and tie the SDP offer to the user who initiated it (no reuse across users).
3. Session hijacking via missing room ACLs. An attacker who knows the room ID can send a message to the signaling server saying "add user attacker to room patient-call-42" without being authenticated as the room owner. If the server does not check room membership ACLs on every message, the attacker joins. Mitigation: every signaling message must be checked against the room ACL; the user sending the message must be in the room or be the room owner.
4. "Zoombomb" guest audio injection. An attacker joins a patient-doctor call as an audio-only participant without credentials, and starts transmitting audio into the room. The SFU relays the audio to all participants because there are no ACLs on the audio stream—only on room membership. Mitigation: enforce ACLs on every media stream, not just room membership; disable audio/video transmission until the SFU has verified the sender is in the room; and log every media stream start/stop event with the sender’s user ID.
5. Deepfake injection at signaling. An attacker uses a voice synthesis tool to generate a doctor’s voice, records the synthesized audio, and sends it to the SFU claiming to be the doctor. The patients hear the fake doctor and follow instructions (e.g. "please confirm your patient ID"). Mitigation: require speaker verification (voice biometric) at the start of every call; require the doctor to confirm their identity via a second factor (SMS code, push notification); and log all audio stream start events with metadata (device, OS, IP, ASN) so security can audit anomalies post-hoc.
Worried your SFU operator can see patient video?
We can audit your end-to-end encryption posture and recommend SFrame or insertable-streams implementation for your stack.
Authentication and authorization
JWT for user identity. Your signaling server should require a JWT token in the Authorization header of the WebSocket upgrade request. The JWT should be signed with a secret key that only your server knows, and it should include the user’s ID, an expiration time (e.g. 1 hour), and a signature. When Alice sends a message to join room B, your server should check that Alice’s JWT is valid and that Alice has permission to join room B. Do not send user identity in the plain WebSocket message; send it in the JWT.
Ephemeral TURN credentials. Instead of sending static username/password pairs for TURN, generate a new pair for each call. The username should be time-based (timestamp + random nonce), the password should be HMAC-SHA256(secret, username + realm + timestamp), and the credentials should expire in 1 hour. This way, even if an attacker captures the TURN credentials, they can only use them for 1 hour, and the attacker cannot use them to rejoin the call 10 hours later.
Room access control lists (ACLs). Every signaling message should be checked against a room ACL. The ACL should list the user IDs that are allowed in the room, the media types they are allowed to send (audio, video, screen-share), and the duration of their access (e.g. Bob is allowed to send audio and video until 14:30 UTC). If a user tries to send video and the ACL says they can only send audio, reject the message.
Recording, retention, and consent
Explicit consent before recording. In many jurisdictions (HIPAA, GDPR, CCPA, California 2-party-consent), you must get explicit consent before recording a call. "Explicit" means a checkbox on screen, not a buried clause in the T&Cs. The consent should be timestamped and attributed to the user who consented. If a patient does not consent, do not record their audio; if a patient consents, store a record that they consented and when.
Retention and deletion. Once you record a call, you must delete it after a retention period. HIPAA allows 6 years (for a medical record) or 1 year (for a non-record backup). GDPR allows no specific period—it depends on the purpose. If you recorded a call for "quality assurance," GDPR says you must delete it once QA is done (30 days for most use cases). When a user requests deletion, you must delete the recording within 30 days (GDPR). In a telemedicine system, this means storing recordings in a database with a TTL column, running a daily purge job, and logging when each deletion occurs.
Recording as a separate stream. If you record a call, do not mix the recording into the call logic. Use a separate recorder process that subscribes to the SFU as a "bot" user. This way, if the recording fails, the call still works. If the recording process logs the wrong metadata, it doesn’t corrupt the call. And if a patient requests to opt out of recording, you can stop the recorder without dropping the call itself.
Comparison: Stack-level controls
When evaluating encryption and transport layers for your WebRTC deployment, compare these four approaches. We recommend DTLS-SRTP + SFrame for most production deployments handling regulated data.
| Control | DTLS-SRTP | SFrame | SDES | Insertable Streams |
|---|---|---|---|---|
| Encrypts media | Yes (P2P + SFU) | Yes (E2E only) | Yes (deprecated) | Custom |
| Protects from SFU operator | No | Yes | No | Custom |
| Key exchange mechanism | DTLS handshake | Out-of-band or app-layer | SDES in SDP (unsafe) | App-defined |
| Performance cost | Negligible (<1%) | Low (2–5%) | Negligible (deprecated) | Variable (custom) |
| Browser support | All (default) | Chrome, Edge, Firefox (Safari 2027) | Deprecated (do not use) | Chrome, Edge, Firefox |
HIPAA: BAAs, audit logs, encryption at rest
Business Associate Agreements (BAAs) are not optional. HIPAA says that if a third party touches protected health information (PHI), you must have a written BAA with that third party. If you use AWS TURN or Agora SFU to relay patient video, you must have a BAA with AWS and Agora. If you use a cloud recorder to store call recordings, you must have a BAA with the recorder. We have seen teams that built HIPAA-compliant apps but forgot to sign BAAs with their SFU vendor, and the app was immediately out of compliance.
Audit logs. You must log all access to PHI. This means: every time a user starts a call, log the user ID, timestamp, and call duration. Every time a user accesses a recording, log the user ID, timestamp, and recording ID. Every time a backend system accesses PHI (e.g. a monitoring script reads call metadata), log it. These logs must be immutable (write-once, read-many), retained for 6 years, and reviewed regularly for anomalies.
Encryption at rest. HIPAA does not mandate encryption at rest, but it is strongly recommended. Store call recordings encrypted with AES-256. Store user databases encrypted. If a server is stolen or a disk backup is exposed, the attacker cannot read the data. Use transparent encryption at the filesystem level (e.g. LUKS on Linux, FileVault on macOS) or at the application level (e.g. encrypt the recording immediately after it is written, before it hits disk).
GDPR: Data residency, DPIA, deletion
Data residency. GDPR says that personal data must stay within the EU unless you have an adequate data transfer mechanism. "Adequate" is a legal determination made by the EU; as of 2026, most US cloud providers (AWS, Google, Microsoft) have adequate mechanisms via Standard Contractual Clauses (SCCs) or other frameworks. But if you use a SFU in Australia or a recorder in Singapore, and your users are in the EU, you must ensure that the jurisdiction has an adequate mechanism. If not, data cannot flow there. In practice, this means most teams build European infrastructure for European users (e.g. Hetzner data centers in Germany or Finland).
Data Protection Impact Assessment (DPIA). Before launching a WebRTC platform that processes personal data, you should perform a DPIA. The DPIA asks: What personal data are we collecting? How are we storing and protecting it? Who has access? What happens if there is a breach? If you are using a non-European SFU, the DPIA should document how you decided that the transfer is safe, what contractual safeguards are in place, and what the risk is if the SFU is compromised. A DPIA is not a box-ticking exercise; it is a legal document that informs your privacy and security decisions.
Deletion on request. GDPR gives users the right to deletion: if a user asks for their data to be deleted, you have 30 days to comply. For a WebRTC platform, this means deleting call recordings, deleting call logs, deleting chat messages, and removing the user from the user database. But you may keep some data for legal reasons (e.g. call logs for 1 year for billing, or recordings for 6 months for quality assurance). When the user requests deletion, you should delete everything except what you legally need to keep, and document why you kept what you kept.
SOC 2 Type II: Control environment for video infrastructure
SOC 2 Type II is a third-party audit that certifies your organization has controls in place to protect customer data and ensure business continuity. For a WebRTC platform, SOC 2 requires you to document and test controls in five areas: security, availability, processing integrity, confidentiality, and privacy.
Security controls. Access to the signaling server, SFU, and recorder should be restricted to authorized personnel. You should use SSH key pairs (no passwords), log all SSH sessions, and audit access logs monthly. You should use a configuration management tool (Terraform, Ansible) to ensure all servers are built from an approved image. You should use a secrets manager (HashiCorp Vault, AWS Secrets Manager) to store TURN credentials, database passwords, and API keys; no secrets should be hardcoded in source code.
Availability controls. Your SFU and signaling server should have no single point of failure. You should run multiple instances across multiple data centers, with a load balancer in front. You should have a disaster recovery plan that can bring up a new environment in <1 hour. You should test the DR plan quarterly (no cheating on paper; actually fail over).
Processing integrity and audit logging. Every signaling message should be logged with the timestamp, sender, receiver, and message type. TURN access should be logged with the username, IP, bytes transferred, and duration. Recorder access should be logged with the user, timestamp, recording ID, and access type (view, download, delete). Logs should be immutable (write-once) and retained for 1 year.
Mini case: HIPAA-compliant telemedicine platform passes penetration test
We helped a telemedicine platform (similar to CirrusMED) prepare for a penetration test. The platform was handling patient-doctor calls, recording calls with consent, and storing recordings on AWS S3 encrypted with AES-256. The initial architecture had four issues: (1) mDNS host candidates were leaking private IPs in the signaling SDP, (2) TURN credentials were valid for 24 hours and could be replayed, (3) signaling messages did not include timestamps and could be replayed, (4) room ACLs were not enforced on video-stream start—a guest could zoom into patient audio.
We implemented four fixes. First, we set iceTransportPolicy: 'relay' in the RTCConfiguration and switched to TURN-only mode. The latency increased from 25 ms (P2P) to 35 ms (TURN relay), but the platform was still usable. Second, we generated ephemeral TURN credentials with 1-hour expiration and logged every credential request with the user ID and timestamp. Third, we added timestamp and nonce to every signaling message and rejected messages older than 60 seconds. Fourth, we enforced room ACLs on every media-stream-add message: if the ACL says Alice can only send audio, reject any video-track from Alice.
The penetration test passed. The penetration tester was unable to replay signaling messages, unable to hijack TURN credentials, unable to zoom into patient audio, and unable to leak patient IP addresses. We recommend the same playbook for any HIPAA-compliant video platform.
HIPAA audit looming?
Let us review your signaling security, TURN configuration, recording consent flows, and audit logs—then walk through the remediation with your audit team.
A decision framework: Choose your security posture in five questions
Q1: Is the call content regulated (HIPAA, GDPR, financial data)? If yes, you need end-to-end encryption (SFrame or insertable streams) and TURN-only mode. If no, DTLS-SRTP is a baseline.
Q2: Do you control the SFU, or does a third party (AWS, Agora, Twilio) control it? If you control the SFU, you can log who accessed what and you can claim that the SFU is not a Business Associate. If a third party controls the SFU, you need a BAA and end-to-end encryption (because the third party can see the media).
Q3: What is your user base geography? If EU users, you need data residency controls and a DPIA. If US users, HIPAA applies to healthcare; CCPA applies to California; most other states have no comprehensive privacy law. If global users, pick the highest standard (GDPR) and apply it to everyone.
Q4: What is your deployment model? If SaaS (hosted on your servers), you own the security and compliance. If on-prem (customer hosts on their servers), the customer owns some of the security (e.g. firewall rules), and you own the rest (e.g. signaling auth). Document the split in a Responsibility Matrix (you own X, customer owns Y).
Q5: What is your risk tolerance? If zero-risk (government, healthcare, financial), implement TURN-only mode, SFrame, ephemeral credentials, and SOC 2 Type II. If medium-risk (EdTech), implement DTLS-SRTP, ephemeral credentials, room ACLs, and audit logs. If high-risk (consumer gaming), implement DTLS-SRTP and call it done.
Five WebRTC security pitfalls in production audits
1. "DTLS-SRTP is enough because it encrypts the media." DTLS-SRTP encrypts the media in transit from the client to the SFU, but the SFU operator can see the unencrypted media inside the SFU process. If your SFU is a third party or if your data is regulated, DTLS-SRTP alone is not enough. You need end-to-end encryption (SFrame) on top.
2. "We use WSS (secure WebSocket), so signaling is secure." WSS encrypts the signaling channel in transit, but it does not validate the origin of the message. An attacker can still initiate a legitimate WSS connection and send forged signaling messages if the server does not validate room membership ACLs on every message.
3. "The TURN credentials are long-lived (24 hours) and rotated regularly." Long-lived credentials can be replayed and hijacked. If an attacker captures the credential at 14:00 and you don’t rotate until 15:00, they have a 1-hour window to relay traffic. Use 1-hour expiration instead.
4. "mDNS host candidates are not a problem because the SDP is encrypted by DTLS." The SDP is sent in the signaling message, which you encrypted with WSS. But if the signaling is ever accessed by an attacker (even months later), the mDNS hostname can be resolved to a private IP. For regulated data, disable mDNS host candidates.
5. "We log audit events, but we don’t review the logs; we just store them for compliance." Logging is useless if no one reads the logs. You should have an alerting system that flags anomalies: 10 failed auth attempts in 5 minutes, TURN access from an unfamiliar ASN, a user accessing a recording they don’t own, etc. Review logs weekly and audit them formally quarterly.
KPIs to monitor: Security telemetry
Quality KPIs: Failed auth attempts and signaling errors. Track the number of failed JWT validation attempts per day. If this spikes above 1% of total auth attempts, investigate—it may indicate an attacker trying to brute-force credentials. Track the number of signaling errors (message rejected due to timestamp, nonce, room ACL, etc.). If this spikes, investigate whether legitimate clients are misconfigured or whether an attacker is sending forged messages.
Business KPIs: TURN abuse and data exfiltration. Monitor the total bytes transferred through TURN. If a user is transferring 1 GB per day and they are an EdTech teacher in India, that is suspicious (normal usage is 10–20 MB per day for a 1-hour class). Set a threshold: if a user transfers >100 MB in a day, alert security. Monitor the number of unique IP addresses connecting to the TURN server per day. If a single username connects from 50 different IPs in one hour, the credentials may be compromised.
Reliability KPIs: Recording access and consent logs. For every recording access (view, download, delete), log the user ID, timestamp, recording ID, and IP address. Alert if a user accesses a recording they don’t own or if a recording is deleted without consent. For HIPAA compliance, ensure that 100% of recordings have a corresponding consent log entry (if consent is revoked, the recording is deleted within 24 hours).
When SFrame is overkill
Consumer gaming and livestreaming. If your users are broadcasting a multiplayer game to a global audience, you do not need end-to-end encryption. The content is already public. DTLS-SRTP protects the game state from eavesdropping on the network path, and that is enough. Adding SFrame increases CPU, complicates key distribution, and does not add value.
Internal enterprise calls where the SFU operator is your own team. If you are running Nucleus on-premise communication platform in your data center and your own IT team runs the SFU, then you trust the SFU operator by definition. SFrame adds latency and complexity without blocking a real threat. DTLS-SRTP is sufficient.
Peer-to-peer calls (no SFU). If Alice and Bob are calling each other directly without a SFU in the middle, DTLS-SRTP is sufficient. The SFU is not in the picture, so there is no party that can decrypt the media without being part of the call. P2P is the most secure architecture because there is no intermediary.
FAQ
Is WebRTC encrypted by default?
Media is encrypted by default (DTLS-SRTP). Signaling is not encrypted by WebRTC itself; you must use TLS (HTTPS/WSS). Metadata (call start time, participant list) is not encrypted unless you encrypt it at the application layer.
Is DTLS-SRTP enough for HIPAA?
No. DTLS-SRTP encrypts media in transit, but the SFU operator can see the unencrypted media if they have access to the SFU process. HIPAA compliance requires a BAA with the SFU vendor, audit logs, encryption at rest, and (if the SFU is untrusted) end-to-end encryption like SFrame.
What is SFrame?
SFrame (RFC 9143) is a lightweight end-to-end encryption layer for WebRTC. Each frame is encrypted with a key that only the sender and intended receivers know. The SFU receives encrypted frames and forwards them without decryption, so the SFU operator cannot see the plaintext.
Can the SFU see my video?
Yes, if you only use DTLS-SRTP. The SFU must decrypt the media to forwarding to other participants, so the SFU operator can see the plaintext pixels. If you use SFrame, the SFU cannot see the video; it relays encrypted frames unchanged.
Is WebRTC GDPR-compliant out of the box?
No. GDPR compliance requires data residency (EU data stays in EU), a DPIA (Data Protection Impact Assessment), consent logs, and deletion on request. WebRTC handles encryption, but you must add the governance layer.
How do I prevent zoombomb?
Enforce room ACLs on every media-stream-add message. Every participant must be authenticated with a JWT, and the JWT must include their user ID and room ID. When a participant tries to send video, verify that their user ID is in the room ACL and that the ACL allows video transmission. If not, reject the stream.
What is an mDNS host candidate?
A multicast-DNS hostname (e.g. a1b2c3d4.local) that the browser automatically generates for its local network interface. The hostname is sent unencrypted in the SDP. An attacker can resolve the hostname and learn the user’s private IP. Disable mDNS candidates in the RTCConfiguration if privacy is critical.
Should I use SDES?
No. SDES is a deprecated method of exchanging SRTP keys inside the SDP. The keys are sent in plaintext in the signaling message, so an attacker can eavesdrop on the keys. Use DTLS instead, which encrypts the key exchange. SDES was removed from the WebRTC spec in 2022.
What to read next
Compliance
Building a HIPAA-Compliant Video Platform
BAAs, audit logs, encryption, retention, and control frameworks.
Architecture
P2P vs. MCU vs. SFU for Video Conference Apps
Trade-offs in latency, quality, and infrastructure cost.
Testing
How to Test WebRTC Streams in Production
Tools, metrics, and continuous monitoring strategies.
Comparison
WebRTC vs. Agora: Architecture Trade-Offs
Open-source WebRTC vs. managed platforms and their security postures.
Product
Must-Have Features for Telemedicine Systems
Identity verification, prescribing, compliance, and recording workflows.
WebRTC security is not a binary choice
WebRTC security in 2026 is a three-layer stack: browser-provided (DTLS-SRTP, ICE), server-provided (ephemeral credentials, room ACLs, rate limits), and application-provided (end-to-end encryption, consent logs, access controls). Skipping any layer exposes a real attack vector. The browser encrypts the media path by default, but the SFU operator can see the pixels unless you add SFrame. Signaling is not encrypted unless you use TLS. IP addresses leak via mDNS unless you switch to TURN-only mode. HIPAA and GDPR compliance require governance, not just crypto. And every deployment we audit finds at least one of the five attacks we describe above.
The good news is that all five attacks are preventable. Ephemeral TURN credentials, room ACLs, message timestamps, mDNS disablement, and SFrame are well-understood solutions. The hard part is deploying them correctly at scale, testing them in a penetration test, and maintaining them as the browser, IETF specs, and compliance frameworks evolve. This is why we have shipped WebRTC security 15+ times at scale (BrainCert, CirrusMED, Cloud Doctors, TransLinguist, Nucleus). We have seen what breaks, how it breaks, and how to fix it before go-live.
WebRTC security is not a feature you ship once; it is a practice you build into every release. Fora Soft has the experience and the tooling to help. Our video and audio streaming development service includes security audits, penetration testing, and HIPAA/GDPR/SOC 2 compliance guidance. Let’s talk about your deployment.
Got a penetration test report you'd like a second opinion on?
We review pen-test findings, recommend prioritization, and help you remediate before your next audit.



.avif)

Comments