Skip to content

permit() Consumed Without Deadline Enforcement

SAFE-0206 Signatures Checked automatically by the scanner
1

What goes wrong

An EIP-2612 permit signature is accepted without the contract enforcing (or the token supporting) the signed deadline. A permit meant to expire can be executed arbitrarily later, extending an approval the user believed was time-boxed.

2

The vulnerable pattern

proof of concept — how it is exploited
// user signs permit(deadline = now + 10 min) but the router never
// checks deadline. The signature sits in the mempool and is executed
// hours later at a worse moment.
3

How to fix it

the pattern that is safe
token.permit(owner, spender, value, deadline, v, r, s);
require(block.timestamp <= deadline, "permit expired"); // for custom flows
Honor the permit deadline in the consuming flow.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0206 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs