/auditsentry:erc4337-account-abstractionfrom auditsentry
Detects security vulnerabilities in ERC-4337 account abstraction implementations, including validateUserOp storage violations, missing entry point checks, paymaster postOp revert risks, oracle manipulation, session-key bypasses, EIP-7702 delegation attacks, and aggregated signature replay issues.
Ships in auditsentry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
validateUserOp storage-rule violation (HIGH)ERC-4337 §6 forbids SLOAD on storage slots outside the wallet's own contract during validation. Bundlers reject non-compliant UserOps. Beyond compliance, accessing external state during validate is a banner attack surface (e.g. reading from an attacker-controlled contract).
function validateUserOp(...) external returns (uint256) {
uint256 x = IExternal(0xabc).read(); // ← violates storage rules + leaks attack surface
...
}
msg.sender == entryPoint() check (CRITICAL)function validateUserOp(...) external returns (uint256) {
// ← anyone can call directly, bypass bundler entirely
}
postOp revert risk (HIGH)function postOp(PostOpMode mode, bytes calldata ctx, uint256 actualGasCost) external {
require(...); // ← if this reverts in postOp, bundler is griefed; reputation system penalizes the paymaster
}
postOp should be revert-free. Use try/catch or never revert.
Token-paying paymaster converts ERC20 → ETH at validate time. If oracle is spot AMM, sandwichable. See [[oracle-manipulation]].
Sponsorship sig replayable. See [[signature-replay]].
Session keys grant limited authority (allowed selectors, allowed targets, time bounds). Bypass paths:
EIP-7702 delegations replayable across chains if chainId == 0 or missing chainId binding.
User signs an authorization to a contract address. If that contract is upgradeable / attacker-controlled, the EOA's nonce-aware delegated-call grants full control.
BLS-aggregated UserOps with aggregator field — if aggregator's verifier doesn't include chainId, cross-chain replay possible.
ERC-4337 uses 192-bit "nonce-key" for parallel UserOps. If multiple session keys / dapps share key 0, they serialize unnecessarily. Worse: if key encoding collides with another semantic, a stuck UserOp can DoS.
Meta-tx with permit can collide on nonces with regular UserOp.
ERC-7579 / ERC-6900 module install paths sometimes lack onlyEntryPointOrOwner. Install path → arbitrary module → arbitrary execution.
| Pattern | Severity |
|---|---|
validateUserOp callable by non-EntryPoint | Critical |
| Module install lacks auth check | Critical |
| EIP-7702 missing chainId in authorization | Critical |
| EIP-7702 delegation to mutable contract | Critical |
| Paymaster postOp can revert | High |
| Session-key scope bypass via multicall/fallback | High |
| Storage-rule violation in validate | High |
| Token-paymaster spot-oracle dependency | High |
| Sponsorship-paymaster sig without nonce/deadline | High |
| Aggregated sig missing chainId | High |
| Nonce-key naming collision | Medium |
require(msg.sender == address(entryPoint()), "only EP");.onlyEntryPointOrOwner and a per-module validation step.SLOAD from self during validate; cache external state into self-state before validate.What SKILL.md sets; muted values are Claude Code's defaults
45 skills in this plugin
/access-controlDetect missing or incorrect access control — missing modifiers, wrong role checks, privileged function exposure, public initializers, and role-escalation paths. Activate on any function that mutates state, transfers funds, mints tokens, sets admin parameters, upgrades implementations, or pauses/unpauses./approval-issuesDetect ERC-20 approval pitfalls — approve race (front-run), missing safeApprove, infinite approvals, approval-without-revoke, Permit2 misuse, max-approval to untrusted contracts. Activate on `approve`, `safeApprove`, `permit`, `forceApprove`, `Permit2`, `IERC20.allowance`./caching-and-incrementalAlways-on meta-skill — cache audit results per file by content hash so unchanged files aren't re-analyzed on subsequent runs. Activate on every /audit, /quick-scan, /audit-changes invocation.npx claudepluginhub iktok90-design/ai-smart-contract-auditor --plugin auditsentryOther plugins' skills for the same job