Skip to content

fix: remove unsafe eval() in extensions.js#56667

Open
orbisai0security wants to merge 1 commit intofacebook:mainfrom
orbisai0security:fix-v-002-extension-eval-allurls-bypass
Open

fix: remove unsafe eval() in extensions.js#56667
orbisai0security wants to merge 1 commit intofacebook:mainfrom
orbisai0security:fix-v-002-extension-eval-allurls-bypass

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in packages/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js.

Vulnerability

Field Value
ID V-002
Severity CRITICAL
Scanner multi_agent_ai
Rule V-002
File packages/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js:1

Description: The ExtensionServer.evaluate() method executes arbitrary JavaScript expressions in the context of the inspected web page via the Chrome DevTools Protocol. The only permission check is extensionAllowedOnURL(), which validates the target URL against the extension's declared hostsPolicy. An extension registered with '<all_urls>' in runtimeAllowedHosts satisfies this check for any URL, enabling unrestricted JavaScript execution in any inspected page. No user confirmation is required, and no sandboxing limits the scope of the executed code.

Changes

  • packages/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

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.

Caution

Missing Changelog

Please add a Changelog to your PR description. See Changelog format

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant