Skip to content

@W-22838968 Port Squatting — Token-Based Server Identity Verification#53

Open
tarushi-sf wants to merge 3 commits into
mainfrom
tarushi/port-squatting
Open

@W-22838968 Port Squatting — Token-Based Server Identity Verification#53
tarushi-sf wants to merge 3 commits into
mainfrom
tarushi/port-squatting

Conversation

@tarushi-sf

@tarushi-sf tarushi-sf commented May 18, 2026

Copy link
Copy Markdown
Collaborator

@W-22838968@

Fix: Port Squatting — Token-Based Server Identity Verification

Problem

When sf ui-bundle dev starts, it checks if the target port is already reachable. If so, it skips starting a new server and uses the existing one. A malicious process can exploit this.

Fix

The CLI now generates a unique UUID token at startup and passes it to the dev server through the process environment. The dev server includes this token in a response header on its health check endpoint. Before using any already-running server, the CLI fetches the health check and compares the token. If it matches, the server was started by us — proceed normally. If it doesn't match (or the header is absent), the server is unverified — the CLI aborts immediately with a clear error.

Changes in other repo's:

PR link in webapps: PR#523
PR link in salesforcedx-vscode-ui-preview: PR#122

Before:

Screen.Recording.2026-05-18.at.8.46.17.PM.mov

Idea:

Screen.Recording.2026-05-18.at.9.42.35.PM.mov

After:

Screen.Recording.2026-05-18.at.9.55.09.PM.mov

@tarushi-sf tarushi-sf changed the title chore: verify port status @W-22838968 Port Squatting — Token-Based Server Identity Verification Jun 4, 2026
@tarushi-sf tarushi-sf force-pushed the tarushi/port-squatting branch from d176c27 to 4457c46 Compare June 4, 2026 12:50
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.

2 participants