fix(security): harden Live Components against critical vulnerabilities#63
Merged
MarcosBrendonDePaula merged 1 commit intomainfrom Feb 21, 2026
Merged
Conversation
Fixes multiple security vulnerabilities in the Live Components system: CRITICAL: - Block arbitrary method execution via executeAction (CWE-94): add blocklist of internal methods + support for publicActions whitelist on components - Prevent cross-component rehydration (CWE-434): embed and validate __componentName in signed state to detect state tampering HIGH: - Add per-connection WebSocket rate limiting (CWE-770): token bucket algorithm prevents message flooding/DoS - Restrict file uploads (CWE-434): MIME type allowlist, blocked extensions, 50MB max size (was 500MB), UUID-based filenames, path traversal prevention - Add room authorization checks (CWE-269): enforce liveAuthManager.authorizeRoom on ROOM_JOIN, prevent client from setting initial room state MEDIUM: - Use crypto.randomUUID() for component and connection IDs (CWE-287) - Validate room names with regex (CWE-20): block path traversal and injection - Add room state size limits of 10MB (CWE-770) - Log auth failures instead of silently ignoring (CWE-391) - Remove stack traces and available component names from error messages (CWE-209) Includes 65 new security attack tests validating all fixes. https://claude.ai/code/session_01BAtMnYwE3T7k6F569Y4JS4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes multiple security vulnerabilities in the Live Components system:
CRITICAL:
of internal methods + support for publicActions whitelist on components
__componentName in signed state to detect state tampering
HIGH:
prevents message flooding/DoS
50MB max size (was 500MB), UUID-based filenames, path traversal prevention
on ROOM_JOIN, prevent client from setting initial room state
MEDIUM:
Includes 65 new security attack tests validating all fixes.
https://claude.ai/code/session_01BAtMnYwE3T7k6F569Y4JS4