fix(security): bind Meet node server to localhost and restrict token file to owner read#19382
Closed
memosr wants to merge 1 commit into
Closed
fix(security): bind Meet node server to localhost and restrict token file to owner read#19382memosr wants to merge 1 commit into
memosr wants to merge 1 commit into
Conversation
…file to owner read
Contributor
|
Salvaged via #19597 onto current main - your commit authorship was preserved. Thanks! |
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.
What does this PR do?
The Google Meet plugin's node server (
plugins/google_meet/node/server.py)has two security weaknesses that combine into a network-exploitable
RPC takeover.
1. Default binding to 0.0.0.0 (network exposure)
The node server listens on all interfaces. On a developer's laptop on
corporate Wi-Fi, any machine on the same network can send requests
to port 18789.
2. Token file world-readable (0644)
Path.write_text()does not set restrictive permissions. With a typicalumask of
022, the file at~/.hermes/workspace/meetings/node_token.jsonis created as
-rw-r--r--(0644) — readable by any local user onthe machine.
Combined attack scenario
10.0.0.42node_token.jsonvia any local access path (VS Codeextension, npm package, browser exploit) — gets the 128-bit token
ws://10.0.0.42:18789with the stolen token:start_bot→ bot joins target meetingtranscribe→ reads transcriptssay→ injects attacker text into the meetingFix
1. Default host =
127.0.0.1Bind to localhost only by default. For remote deployments that
legitimately need external access, the user must pass
--host 0.0.0.0explicitly (and document the firewall rule they need).
2.
chmod 0o600on token fileRestrict the token file to owner read/write only, before the atomic
replace:
The
chmodis wrapped in try/except for non-POSIX filesystems(Windows, some FUSE mounts) where it may not apply.
Type of Change
Checklist