-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: Set correct origin for gator permissions in signing so Blockaid can correctly validate #36920
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
base: main
Are you sure you want to change the base?
fix: Set correct origin for gator permissions in signing so Blockaid can correctly validate #36920
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (2 files, +389 -2)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [d42040c]
UI Startup Metrics (1237 ± 66 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [2b9e33c]
UI Startup Metrics (1295 ± 66 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [eca215b]
UI Startup Metrics (1238 ± 55 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR fixes a critical security vulnerability in the Blockaid integration for permission requests. Previously, when validating permission requests through the Gator snap, Blockaid was checking the Gator snap's origin instead of the actual requesting domain found in
decodedPermission.origin
. This allowed malicious domains to bypass security checks by routing their permission requests through the Gator snap.The Problem:
normalizePPOMRequest
function was not extracting the correct origin fromdecodedPermission.origin
The Solution:
normalizePPOMRequest
to check fordecodedPermission.origin
when presentChangelog
CHANGELOG entry: null
Manual testing steps
decodedPermission.origin
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Validates typed-sign requests using the permission’s origin when initiated by preinstalled snaps, with tests covering snap/non-snap and fallback cases.
decodedPermission.origin
asorigin
foreth_signTypedData_*
when the request comes from a preinstalled snap (isSnapId
+isSnapPreinstalled
).controllerObject
intonormalizeSignatureRequest
to enable origin override logic; keep typed data sanitization and transaction normalization.isSnapId
andisSnapPreinstalled
and new cases validating origin handling:Written by Cursor Bugbot for commit eca215b. This will update automatically on new commits. Configure here.