fix: remove unsafe eval() in extensions.js#56481
Open
Conversation
The evaluateOnInspectedPage handler accepts an arbitrary JavaScript expression string from any registered extension and evaluates it in the context of the inspected web page via the Chrome DevTools Protocol
|
Warning Missing Test Plan Please add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested. |
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.
Summary
Fix critical severity security issue in
packages/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js.Vulnerability
V-002packages/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js:1Description: The evaluateOnInspectedPage handler accepts an arbitrary JavaScript expression string from any registered extension and evaluates it in the context of the inspected web page via the Chrome DevTools Protocol. The only permission check is isAllowedOnTarget(), which verifies the extension's URL pattern policy. Extensions configured with wildcard URL patterns (such as '<all_urls>' or 'https:///') can execute any JavaScript in any inspected page without user confirmation, sandboxing, or expression validation.
Changes
packages/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.jsVerification
Automated security fix by OrbisAI Security