Skip to content

fix(e2ee): track the local encryption state separately from remote participants - #2245

Merged
lukasIO merged 5 commits into
mainfrom
lukasseiler/e2ee-local-encryption-state
Nov 11, 2026
Merged

lukasIO merged 5 commits into
mainfrom
lukasseiler/e2ee-local-encryption-state

Conversation

@lukasIO

@lukasIO lukasIO commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

The worker now keeps the encryption state of the local participant apart from the state of remote participants, and uses separate cryptors for senders and receivers.

Covered by unit tests in src/e2ee/worker.

🤖 Generated with Claude Code

…rticipants

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lukasIO lukasIO self-assigned this Nov 10, 2026
@changeset-bot

changeset-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 22187c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 116.75 KB (+0.02% 🔺)
dist/livekit-client.umd.js 126.14 KB (+0.07% 🔺)
dist/core/core.mjs 79.42 KB (0%)

@lukasIO
lukasIO added this pull request to stack #2248 November 10, 2026 11:02
…ticipantCryptorEnabled

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lukasIO
lukasIO marked this pull request as ready for review November 10, 2026 14:42

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread src/e2ee/extension.ts Resolved
Comment on lines +492 to 494
if (!localEncryptionEnabled) {
this.appendFrameMetadata(encodedFrame);
return controller.enqueue(encodedFrame);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟥 Shared worker exposes encrypted media

When rooms share a worker, localEncryptionEnabled lets one room disable encryption for every sender. An E2EE-enabled room then sends its media in plaintext.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One worker serves one room. Sharing a worker between rooms is not supported, and that was the case before this change. The worker option now documents it.

lukasIO and others added 2 commits November 10, 2026 15:52
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
);
return;
}
if (!localEncryptionEnabled) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should mitigate the risk now.

Comment thread src/e2ee/E2eeManager.ts Resolved
@lukasIO
lukasIO merged commit 2ca884f into main Nov 11, 2026
6 checks passed
@lukasIO
lukasIO deleted the lukasseiler/e2ee-local-encryption-state branch November 11, 2026 10:57
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants