fix(zerox): exact Permit2 allowance and EIP-712 bind checks - #1394
Open
SashaMIT wants to merge 1 commit into
Open
fix(zerox): exact Permit2 allowance and EIP-712 bind checks#1394SashaMIT wants to merge 1 commit into
SashaMIT wants to merge 1 commit into
Conversation
🟡 Heimdall Review Status
|
Stop granting maxUint256 to Permit2 and reject quote typed-data that does not match the local sell token, amount, chain, and Permit2 verifyingContract.
SashaMIT
force-pushed
the
fix/zerox-exact-permit2-allowance-and-eip712-bind
branch
from
August 4, 2026 14:39
bc25485 to
a72aebc
Compare
Author
|
Friendly bump — these three tips harden agent spend paths (allowlist matching, Jupiter slippage cap, Permit2 amount + EIP-712 bind). Happy to adjust naming/tests if anything conflicts with your roadmap. Tips are SSH-signed under SashaMIT. |
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.
Description
execute_swap_on_0xpreviously:maxUint256whenever the price response reported an allowance issuequote.permit2.eip712with no local binding checksThat combination means a compromised or MITM’d 0x response path can inherit an unlimited allowance and obtain signatures over attacker-controlled typed data.
This change:
sellAmount(not unlimited)verifyingContract,chainId, token, and amount against local swap intent beforesignTypedDataAI disclosure
Drafted with AI assistance; reviewed against the Permit2 / blind EIP-712 agent-wallet risk class.
Test plan