eth_signTypedData_v4 and eth_signTypedData: the request handler in src/background/index.js (lines 1009-1048) and the signature screen in src/popup/views/approval.js. Neither compares the typed data's domain.chainId with the active network.
What happens
On next (8e52528), release build, Chrome, wallet on Sepolia: a connected site asks for an EIP-2612 Permit whose domain is mainnet USDC (chainId: 1, verifyingContract0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48). The screen opens under the [TESTNET] banner, shows the token permission warning and chainId: 1 as one plain line of the domain, and Sign is enabled. Signing gives the site a permit that is valid on mainnet, from a user who believes the wallet is on a testnet.
What should happen
EIP-712, chainId: "The user-agent should refuse signing if it does not match the currently active chain." A typed-data request whose domain.chainId is present and differs from the active network's chain id should be shown with Sign disabled and the reason on the error line, as the screen already does for a primary type it will not sign.
Severity: major
Definition of done
Typed data whose domain.chainId differs from the active network's chain id cannot be signed, and the screen says why.
Typed data without a domain.chainId, or with the active one, signs as now.
Tests cover both cases.
Model: opus-5-5
## Where
`eth_signTypedData_v4` and `eth_signTypedData`: the request handler in `src/background/index.js` (lines 1009-1048) and the signature screen in `src/popup/views/approval.js`. Neither compares the typed data's `domain.chainId` with the active network.
## What happens
On `next` (8e52528), release build, Chrome, wallet on Sepolia: a connected site asks for an EIP-2612 `Permit` whose domain is mainnet USDC (`chainId: 1`, `verifyingContract` `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`). The screen opens under the `[TESTNET]` banner, shows the token permission warning and `chainId: 1` as one plain line of the domain, and Sign is enabled. Signing gives the site a permit that is valid on mainnet, from a user who believes the wallet is on a testnet.
## What should happen
EIP-712, `chainId`: "The user-agent should refuse signing if it does not match the currently active chain." A typed-data request whose `domain.chainId` is present and differs from the active network's chain id should be shown with Sign disabled and the reason on the error line, as the screen already does for a primary type it will not sign.
Severity: major
## Definition of done
- [ ] Typed data whose `domain.chainId` differs from the active network's chain id cannot be signed, and the screen says why.
- [ ] Typed data without a `domain.chainId`, or with the active one, signs as now.
- [ ] Tests cover both cases.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 04:45:12 +02:00
Fixed in #544. The sign screen now refuses typed data whose domain chainId names a chain other than the active network, with the reason on its error line and Sign disabled. The background refuses the returned signature too, against the network active when it arrives. Typed data with no chainId signs as before.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/AutistMask/pulls/544. The sign screen now refuses typed data whose domain `chainId` names a chain other than the active network, with the reason on its error line and Sign disabled. The background refuses the returned signature too, against the network active when it arrives. Typed data with no `chainId` signs as before.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Where
eth_signTypedData_v4andeth_signTypedData: the request handler insrc/background/index.js(lines 1009-1048) and the signature screen insrc/popup/views/approval.js. Neither compares the typed data'sdomain.chainIdwith the active network.What happens
On
next(8e52528), release build, Chrome, wallet on Sepolia: a connected site asks for an EIP-2612Permitwhose domain is mainnet USDC (chainId: 1,verifyingContract0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48). The screen opens under the[TESTNET]banner, shows the token permission warning andchainId: 1as one plain line of the domain, and Sign is enabled. Signing gives the site a permit that is valid on mainnet, from a user who believes the wallet is on a testnet.What should happen
EIP-712,
chainId: "The user-agent should refuse signing if it does not match the currently active chain." A typed-data request whosedomain.chainIdis present and differs from the active network's chain id should be shown with Sign disabled and the reason on the error line, as the screen already does for a primary type it will not sign.Severity: major
Definition of done
domain.chainIddiffers from the active network's chain id cannot be signed, and the screen says why.domain.chainId, or with the active one, signs as now.Model: opus-5-5
Fixed in #544. The sign screen now refuses typed data whose domain
chainIdnames a chain other than the active network, with the reason on its error line and Sign disabled. The background refuses the returned signature too, against the network active when it arrives. Typed data with nochainIdsigns as before.Model: opus-5-5