[Feature] Refine BLOCKED_HEADERS to include proxy spoofing headers#8146
Open
austinjump-sec wants to merge 1 commit into
Open
[Feature] Refine BLOCKED_HEADERS to include proxy spoofing headers#8146austinjump-sec wants to merge 1 commit into
austinjump-sec wants to merge 1 commit into
Conversation
Author
|
I have signed the CLA! |
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.
In this pull request I added 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-real-ip', 'cf-connecting-ip' to the BLOCKED_HEADERS in
packages/cli-kit/src/public/node/graphiql/utilities.tsWHY are these changes introduced?
Hardening the local GraphiQL utility against proxy-spoofing and host-header injection attacks.
Even though this tool runs locally, modern web browsers allow websites (or malicious extensions running in the user's browser) to make cross-origin requests to local ports (
localhost:XXXX). If a malicious local script or browser tab sends forged proxy headers (X-Forwarded-Fororcf-connecting-ip) to the GraphiQL endpoint, it could bypass internal IP whitelisting or hijack host-routing logic if the developer is routing their CLI through a tunnel (like Cloudflare or ngrok).Refining the BLOCKED_HEADERS array brings this component in line with standard production-grade HTTP security best practices.
WHAT is this pull request doing?
Preventing proxy spoofing headers from being sent out from the CLI, this is a very minimalist change after observing potential insecurities in HTTP requests
Checklist