ERC-4337 brings smart accounts to Ethereum and noticeably improves the user experience. Social account recovery and gas abstraction (the ability to pay the fee not necessarily with the same asset or by the user themselves) both become available. The price of this convenience is a set of new attack vectors that did not exist with traditional EOA wallets (externally owned accounts, wallets controlled by a single private key).
The root of the problem is that all the additional logic now lives in code. An attacker can target either the smart account logic itself or the bundler infrastructure (nodes that package operations into batches). A successful exploit leads to unauthorized asset transfers, denial of service, or substitution of an account's recovery mechanism. High-profile incidents involving smart contract vulnerabilities, even those not directly tied to ERC-4337, clearly show how sophisticated attacks in account abstraction environments can be.
Two groups are in the line of fire. The first is users interacting with vulnerable smart accounts. The second is protocols that have carelessly integrated ERC-4337 features. The attacker's goal in both cases is the same: drain funds, disrupt service, or strip users of control over their accounts.
MECHANICS
One notable risk is replay attacks. An attacker intercepts a valid User Operation (UserOp, a description of the user's intent in ERC-4337 format) and resubmits it to the network. This becomes possible when a UserOp is signed incorrectly or when the target network and block context are not validated inside the UserOp's execution. That allows the same operation to be replayed.
A second threat involves gas manipulation. The attacker exploits the bundler mechanism by submitting a UserOp with an abnormally low gas price, causing legitimate operations to either fail entirely or get stuck in the queue with a long delay. Another variant of the same idea is manipulating gas refunds or bundler incentives, which directly leads to economic losses.
A separate category is compromised entry points. A vulnerable AccountFactory contract or a defective EntryPoint implementation allows attackers to deploy malicious smart accounts or hijack existing ones. This typically stems from a logic error in the validateOp or executeBatch functions of the EntryPoint contract, that is, in the very code that is supposed to validate and execute operations.
RISK INDICATORS
The warning signs fall into several groups. First look at the contracts themselves and how well they are protected, then at operation traffic, and separately at bundler infrastructure.
- Weak access control: critical functions (changing the owner or initiating recovery) are not protected by solid permission checks. This is the first thing an attacker tests.
- Abnormal gas: UserOps are submitted with an unusually low gas price or gas limit. This is often a direct trace of a gas manipulation attempt.
- Custom logic in
EntryPoint: the contract code deviates from the standard ERC-4337 specification. Any such deviation is a potential unforeseen vulnerability. - No replay protection: UserOps lack chain ID (network identifier) and nonce (sequence number) checks. Without them an operation can be replayed on another network or on the same one.
- Dubious bundler: a compromised bundler selectively includes or excludes UserOps, which is already censorship and denial of service.
- Leaky
AccountFactory: the factory allows the creation of unauthorized or malicious smart accounts.
PROTECTION
The foundation of protection is strict validation inside your EntryPoint contract. Correct nonce management and signature verification for all UserOps close both replay attacks and part of the takeover attempts at once.
Do not write critical contracts from scratch without a compelling reason. Take audited implementations of EntryPoint and AccountFactory from reputable sources, and run any custom logic you add on top of them through a thorough security audit, because that logic is most often where the weak point ends up.
For sensitive operations such as account recovery or ownership changes, design the smart account with multi-factor authentication: require multiple signatures or multiple conditions to be met, so that a single compromised signature is not enough.
Do not forget the person on the other side of the wallet. Educate users that before approving a UserOp through the wallet interface they need to verify the transaction details, gas parameters, and recipient address.
Finally, gas price oracles and dynamic gas estimation work against gas manipulation: they ensure that a UserOp is submitted with enough headroom and does not fail due to an artificially created shortage.
To make it clear where the boundary between the two types of wallets lies, here are the key differences in a table.
| Parameter | EOA wallet | ERC-4337 smart account |
|---|---|---|
| Access control | Single private key | Programmable logic in code |
| Attack surface | Key security | EntryPoint, AccountFactory, validation contracts |
| Recovery | Seed phrase only | Social recovery, multisig |
| Gas payment | By the user only | Gas abstraction (sponsor, different asset) |
| New vectors | Key theft | Replay, gas manipulation, bundler censorship |
How to tell a real threat from a false alarm: a low gas price on a single operation may simply be a user saving money, but a series of UserOps with underpriced gas that systematically crowd out other legitimate operations is the signature of manipulation. Likewise, custom logic in
EntryPointis not dangerous by itself, only when it changes nonce validation, signature checking, or access rights. A deviation in those places is a red flag; a deviation in logging or event emission is most likely harmless.
AFTERMATH
If an exploit is already suspected, follow the steps in order. First, immediately revoke all compromised administrative privileges and owner roles associated with the affected smart account to cut off the outflow of funds.
Next comes communication. Alert your user base and the security community through established channels such as Discord or Twitter, or through dedicated incident reporting platforms. Reaching out to specialized teams such as SEAL 911 brings expert help exactly when every minute counts.
At the same time, begin recovery efforts. Bring in blockchain analytics firms and law enforcement to trace illicit fund flows. Reporting to the relevant authorities promptly is critical for any potential legal recourse.