-
Notifications
You must be signed in to change notification settings - Fork 224
prevent possible CORS vulnerability #6607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3360 tests passing in 1376 suites. Report generated by 🧪jest coverage report action from 226b49e |
|
Hi team! This security issue has been categorized as a SEV-2 according to the Shopify Issue Severity Standard. This type of issue has an associated resolution timeline of 2 weeks, making the resolution target for this issue November 25, 2025 21:36 UTC (12 days from now). If this is a package bump which is passing CI, then Dependabot Auto-Merge will likely attempt to merge it on your behalf. Please review the Dependabot Auto-Merge FAQ to learn more. If you have any questions or believe that this resolution timeline will not be possible, please reach out to us in #help-appsec. |
|
/snapit |
|
🫰✨ Thanks @EvilGenius13! Your snapshot has been published to npm. Test the snapshot by installing your package globally: npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20251118173128Caution After installing, validate the version by running just |
isaacroldan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and works as expected 👌
graygilmore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎩 worked!
|
Hi team! This security issue has been categorized as a SEV-3 according to the Shopify Issue Severity Standard. This type of issue has an associated resolution timeline of 3 months, making the resolution target for this issue February 11, 2026 21:36 UTC (3 months from now). If this is a package bump which is passing CI, then Dependabot Auto-Merge will likely attempt to merge it on your behalf. Please review the Dependabot Auto-Merge FAQ to learn more. If you have any questions or believe that this resolution timeline will not be possible, please reach out to us in #help-appsec. |
ef68e02 to
6a5f776
Compare
frandiox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
6a5f776 to
226b49e
Compare
WHY are these changes introduced?
theme devhad a lax CORS policy that could allow any website to read authenticated data from a developer's local server.WHAT is this pull request doing?
Two part fix:
Part 1:
Restrict Cors in the dev server middleware.
localhost:portand the production storeexample-shop.myshopify.comGET,PUT,HEAD,OPTIONS.credentials: trueas this forces the server to be explicit about which origin(s) is allowed.originheader is present. This is because the browser only sends that header when it's making a cross-origin request from another domain.Part 2:
Strip the CORS headers from proxied responses
Access-Control-Allow-Origin: *.How to test your changes?
Build the branch and run
theme devOpen up your browser to a website that isn't your store or localhost. (i.e google.com) and open up the inspector. Open the console and paste
You should see blocked. You can try this with a current version of the CLI and it should pass (which we don't want).
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist