Skip to content
Back to skills

Sec Web3 Move

ASecurity

Security checklist for Move smart contracts (Sui, Aptos and Initia). Triggers when the project contains Move.toml or sources/**/*.move: capabilities and abilities (copy/drop/store/key), object ownership and shared objects, visibility (public/public(package)/friend/entry), init/OTW, Coin/Balance/TreasuryCap, Aptos signer/SignerCapability/ConstructorRef, Fungible Asset and dispatchable hooks, randomness, upgrade policy and version gating, oracles, flash-loan hot potato, PTB composition attacks.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
securityrustgotestinggitapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add 57blocks/security-plugin --skill sec-web3-move --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sec Web3 Move?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sec Web3 Move
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/57blocks-sec-web3-move/badge)](https://www.skillsdirectory.com/skills/57blocks-sec-web3-move)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "sec-web3-move"
description: "Security checklist for Move smart contracts (Sui, Aptos and Initia). Triggers when the project contains Move.toml or sources/**/*.move: capabilities and abilities (copy/drop/store/key), object ownership and shared objects, visibility (public/public(package)/friend/entry), init/OTW, Coin/Balance/TreasuryCap, Aptos signer/SignerCapability/ConstructorRef, Fungible Asset and dispatchable hooks, randomness, upgrade policy and version gating, oracles, flash-loan hot potato, PTB composition attacks."
user-invocable: false
---

# sec-web3-move · Sui / Aptos Move contract security

## Scope

Writing and auditing Sui Move and Aptos Move contracts. Chain detection: `Move.toml` depends on `Sui`/`MystenLabs/sui`, or `sui::object::UID` / `TxContext` appears → **[Sui]**; depends on `AptosFramework`, or `&signer`, `acquires`, `move_to`, `aptos_framework::` appear → **[Aptos]**. Items tagged **[General]** apply to both chains. Depends on `InitiaStdlib` / `initia_std::` appears → **Initia Move**: review with the [Aptos] + [General] items, and also read "Initia differences" below.

## Read first

- **Read `sec-web3-common` first** ([../sec-web3-common/SKILL.md](../sec-web3-common/SKILL.md)): access control W3-01~06, oracles W3-11~16, precision W3-17~21, accounting W3-22~27, MEV/slippage W3-33~37, DoS W3-38~42, centralization W3-46~48. This pack covers only what is Move-specific.
- Severity follows [severity.md](../sec-core/severity.md); P0/P1 must include `file:line` + exploit path + impact.
- PoC template: [refs/poc-guide.md](refs/poc-guide.md)

## Attacker model and platform guarantees

**Assume the attacker controls**: every argument of any `public`/`entry` function; **[Sui]** chaining your `public` functions in a PTB in any order, passing any object they own or any shared object, taking every return value, and aborting the whole transaction after seeing intermediate results; **[Aptos]** publishing their own module that calls your `public` functions, passing any `Object<T>`, composing calls in a script; creating their own objects of the same type (if a constructor is reachable) and tokens/metadata with the same name; transaction ordering and gas limits.

**Already excluded by the platform — do not report**:

| Do not report | Why | But still check |
|---|---|---|
| Resource duplicated / created from nothing / double-spent | Linear types: without `copy` it cannot be copied, without `drop` it cannot be discarded | `copy`/`drop` added to a value type (MOV-02, MOV-29) |
| Silent integer overflow | `+ - *` overflow, underflow and division by zero abort; out-of-range downcasts with Move `as` also abort | `<<` overflow **does not abort** (MOV-28); triggerable aborts as DoS (MOV-36) |
| EVM-style reentrancy, `delegatecall`, storage slot collisions | No dynamic dispatch (Sui); Aptos dispatchable FA native dispatch locks "modules already on the call stack" | **[Aptos]** function-value (closure) callbacks **can** reenter (MOV-32) |
| Transaction signature replay | Chain-level sequence numbers / transaction digest dedup | Contract-implemented signature verification (W3-28~31) |
| Partial state writes | When a transaction (including a whole PTB / script) aborts, everything is rolled back | Intermediate state between two transactions (MOV-46 upgrades, MOV-42 front-running) |
| `tx.origin` phishing | Does not exist; Sui `ctx.sender()` is the transaction signer | Authorizing only by `sender()` makes it non-composable (design issue, not a vulnerability) |
| Reading a missing global resource returns zero | **[Aptos]** `borrow_global` aborts if missing; **[Sui]** missing dynamic field aborts | Whether an attacker can cause the missing-value abort (MOV-21, MOV-36) |

**Core mental model**: on Sui, "holding the object = permission", and anyone can pass a shared object as `&mut`; on Aptos, "`&signer` = account permission", and anyone can pass an `Object<T>`. So the vast majority of P0s are: **leaked permission objects / overly broad abilities / no check of the identity and owner of passed-in objects**.

## Initia differences

Initia's MoveVM is derived from Aptos Move (`initia_std` corresponds to `aptos_framework` / `aptos_std`: signer, `Object<T>`, Fungible Asset, `primary_fungible_store`), so the [Aptos] and [General] items above apply too. Framework semantics follow the `initia-labs/movevm` / `move-natives` source pinned by the project; do not rely on Aptos memory. Key differences:

- **Deferred Cosmos message execution**: `cosmos::move_execute`, `cosmos::stargate`, `cosmos::delegate`, etc. only enqueue a message, which executes after the current Move call returns. State modified after enqueuing within the same entry function is visible to the queued callback; how callback failure is handled (full rollback or only recording failure) must be confirmed per API used. Similar to the Sui PTB call-order issue (MOV-43).
- **Staking goes through Cosmos modules**: delegate / undelegate / redelegate are sent to mstaking via Cosmos messages, and delegated amounts and rewards are read via stargate queries. **Slashing can only be observed from live delegation queries**; protocol-maintained accumulators such as `staked_amounts` and `pool.amount` do not decrease on slashing. Accumulator used in pricing, minting, redemption, or as the amount in undelegate / redelegate messages → candidate issue; redemption amount fixed at request time and not recomputed from the live value at claim → slashing losses are borne by later exiters. "Slashing risk handled" in the README is not evidence; find the code line that reads the live query.
- **`table::iter` direction**: `order` parameter 1 = ascending, 2 = descending; for "first record ≥ h" lookups, check the direction and start/end bounds.
- **Constraints of dependency modules**: when the protocol uses a shared proxy account (StakePool / vault object) to call a downstream function limited to "once per block / per account" (e.g. a reentrancy lock keyed by block height), the second user's operation in the same block reverts. Read the assert / abort conditions of out-of-scope modules being called.
- **Tools**: `initiad move build` / `initiad move test` (see tools.yaml `initiad`); if not installed, record `skipped`, fall back to static review, and cap P0/P1 confidence at `likely`.

## Checklist

The 69 items live in `refs/items-*.md`, so a task reads only the part it needs. This index gives each item's ID, title and default level. Items are numbered in the order they were added, so related items can sit in different number ranges; use the file names below.

- Writing or changing code, or `sec-check`: read the files covering what the change touches.
- Full audit: sec-audit assigns item IDs to each perspective (see "Audit perspectives"); read only those items.
- Looking up one item: open the file named here and read from its `### MOV-NN` heading to the next `###` heading.

**[refs/items-abilities-caps.md](refs/items-abilities-caps.md)**
- MOV-01 [General] Privileged entry point lacks authorization · default P0
- MOV-02 [General] Permission or value type has `copy` / `drop` · default P0
- MOV-03 [Sui] `store` lets permission/soulbound objects be freely transferred, shared, frozen · default P1
- MOV-04 [Sui] Capability not bound to the object it governs · default P0
- MOV-05 [General] Forgeable witness / authorization type · default P0
- MOV-06 [Sui] Cap misrouting: `init` or a factory function gives the permission object to the wrong party · default P0
- MOV-07 [General] One-step permission transfer, no revocation path · default P2
- MOV-08 [General] Overly broad visibility, `entry` on package-only functions, leaking `&mut` · default P0
- MOV-09 [General] Test helpers shipped in published bytecode · default P0

**[refs/items-aptos-signer-storage.md](refs/items-aptos-signer-storage.md)**
- MOV-10 [Aptos] Handing `&signer` to untrusted code · default P1
- MOV-11 [Aptos] `SignerCapability` / `ExtendRef` leak · default P0
- MOV-12 [Aptos] `ConstructorRef` / `TransferRef` / `MintRef` / `BurnRef` leak · default P0
- MOV-13 [Aptos] `Object<T>` owner not verified · default P0
- MOV-14 [Aptos] Global storage read/written at a caller-supplied address · default P0
- MOV-15 [Aptos] Explicit `initialize` can be front-run or called twice; resource account address squatted · default P0

**[refs/items-accounts-signatures.md](refs/items-accounts-signatures.md)**
- MOV-66 [Aptos] Custom account-abstraction authenticator accepts what it should not · default P0
- MOV-67 [General] Native signature verification misused in Move · default P0 (P1 when only a privileged signer set is affected)
- MOV-68 [Aptos] Sequence-number uniqueness assumed while orderless transactions exist · default P2 (P1 when the assumption guards funds)

**[refs/items-objects-types.md](refs/items-objects-types.md)**
- MOV-16 [Sui] Type confusion: trusting a non-canonical object instance · default P0
- MOV-17 [General] Unconstrained generic type parameter · default P0
- MOV-18 [Sui] Wrong share/freeze decision and ungated by-value shared objects · default P1
- MOV-19 [Sui] Assets sent to the wrong address or transferred out inside a composable function · default P1
- MOV-20 [Sui] Dynamic fields or wrapped objects orphaned when deleting/unpacking the parent · default P0
- MOV-21 [Sui] User-controlled dynamic field keys, missing existence checks · default P1
- MOV-22 [Sui] `Receiving<T>` without checking origin and type · default P2
- MOV-23 [Aptos] Multiple resources in the same object account get transferred together · default P1
- MOV-24 [General] Name/symbol concatenation used as an asset or pool identifier · default P1
- MOV-25 [General] Object's own state not checked before privileged release/state change · default P1
- MOV-52 [General] Public getter takes a reference the caller cannot obtain · default P3

**[refs/items-sui-platform.md](refs/items-sui-platform.md)**
- MOV-63 [Sui] Address balances: `&mut UID` exposure, trapped funds and settlement timing · default P2 (P0 when `&mut UID` of a value-holding object leaks)
- MOV-64 [Sui] Kiosk, `TransferPolicy` and closed-loop `Token` policy enforcement gaps · default P1 (P0 when a closed-loop token or a locked asset can leave without its rules)
- MOV-65 [Sui] Package defines structs named like framework capabilities · default P3

**[refs/items-funds-assets.md](refs/items-funds-assets.md)**
- MOV-26 [Sui] Improper control of mint/burn, DenyCap and CoinRegistry caps · default P0
- MOV-27 [General] Rounding direction and small amounts rounding to 0 · default P1
- MOV-28 [General] Non-aborting bit operations, hand-written overflow checks and narrow-type intermediates · default P1
- MOV-29 [General] Flash-loan hot potato weakened, unbound or reset · default P0
- MOV-30 [Aptos] Non-dispatch interfaces used with dispatchable FA · default P1
- MOV-31 [Aptos] Treating an arbitrary FA's dispatch hook as trusted code · default P1
- MOV-32 [Aptos] Function-value callbacks: reentrancy, TOCTOU, and `&mut` wholesale replacement · default P0
- MOV-33 [Sui] Storing `Coin<T>` instead of `Balance<T>` in object fields · default P3
- MOV-50 [Sui] Inconsistent enforcement of compliance restrictions (DenyList v2 / custom blocklist) · default P2
- MOV-51 [General] Batched redemption / pro-rata allocation loops: gross vs net mixed up, remainder dumped on the last item · default P2 (P1 when all user exits are frozen)
- MOV-53 [General] Signed values stored in unsigned integers (two's-complement libraries) or native signed ints misread · default P0 (P1 when only a privileged role can write the raw value)
- MOV-54 [General] Swap or pool invariant check is non-strict while rounding favours the trader · default P1 (P0 when one call can extract a non-trivial amount)
- MOV-55 [General] Internal staked or locked accumulator not reconciled with the live amount after slashing · default P2 (P1 when the accumulator prices minting or redemption)
- MOV-56 [General] Value parked where no code path can withdraw it · default P2 (P0 when user principal is trapped)
- MOV-57 [General] Privileged role directly sets an exchange-rate or share-price input · default P2 (P1 when no on-chain bound limits one update, or the bound can be raised to 100%)
- MOV-69 [General] Value-moving path aborts on a balance that is assumed zero or large enough · default P1 (P0 when it blocks every liquidation, withdrawal or repayment)

**[refs/items-dos-resources.md](refs/items-dos-resources.md)**
- MOV-34 [General] Unbounded collections, object size and per-transaction object limits · default P1
- MOV-35 [Sui] Hot shared object congestion · default P2
- MOV-36 [General] Attacker-triggerable aborts blocking others · default P2
- MOV-61 [General] Per-block or per-account reentry lock that a later step is assumed to clear · default P2 (P1 when it freezes withdrawals or liquidations)
- MOV-62 [General] Order-dependent collection operations: `swap_remove` and key ordering · default P2 (P1 when stored indices move funds)

**[refs/items-random-time-oracle.md](refs/items-random-time-oracle.md)**
- MOV-37 [Sui] Misuse of `Random` · default P1 (P0 for high-value lotteries)
- MOV-38 [Aptos] `#[randomness]` function is composable (test-and-abort) · default P1 (P0 for high-value lotteries)
- MOV-39 [General] Asymmetric gas across random-outcome branches (undergasing) · default P1
- MOV-40 [General] Wrong time source and units · default P2 (P1 when the error disables a protective control for every user)
- MOV-41 [General] Oracle price not validated for freshness, confidence interval, exponent, feed ID and future timestamps · default P1
- MOV-42 [General] Front-running and caller constraints not enforced on-chain · default P1
- MOV-59 [General] Query, quote or refresh function changes state at a time the attacker chooses · default P1 (P0 when the changed value drives minting, pricing or liquidation)
- MOV-60 [General] Predictable pseudo-randomness used instead of the randomness API · default P1 (P0 when it decides a high-value prize or mint rarity)

**[refs/items-ptb-composability.md](refs/items-ptb-composability.md)**
- MOV-43 [Sui] Reliance on call order: PTB orchestration attacks · default P1
- MOV-44 [Sui] Sponsored transactions, gas coin and address-balance gas misuse (off-chain) · default P2
- MOV-58 [General] Per-call limit bypassed by repeating the call in one PTB or script · default P2 (P0 when the limit is the only bound on a withdrawal, mint or price impact)

**[refs/items-upgrades-deps.md](refs/items-upgrades-deps.md)**
- MOV-45 [Sui] `UpgradeCap` custody and policy · default P1
- MOV-46 [Sui] No version gating of shared objects after upgrade / new state not initialized · default P0
- MOV-47 [Aptos] Concentrated upgrade authority: `upgrade_policy`, publisher account and code object owner · default P1
- MOV-48 [General] Dependencies unpinned or upgradeable by others · default P2 (P1 when an immutable package's funds depend on an upgradeable, version-gated dependency)
- MOV-49 [General] Sensitive data written to events, Display or storage · default P2

## Protocol pages

Implementation details per protocol type; chain-agnostic principles stay in the matching sec-web3-common page.

- [refs/proto-amm-clmm.md](refs/proto-amm-clmm.md)
- [refs/proto-liquid-staking.md](refs/proto-liquid-staking.md)

## PoC guide

See [refs/poc-guide.md](refs/poc-guide.md) for full templates. Key points:

1. **[Sui]** `sui::test_scenario`: `ts::begin(@admin)` → `init_for_testing` → `ts::next_tx(&mut s, @attacker)` to switch identity; `take_shared` / `take_from_sender` to get objects; use `#[expected_failure(abort_code = ..)]` to assert paths that should fail after the fix. For randomness use `random::create_for_testing` + `update_randomness_state_for_testing`.
2. **[Aptos]** `#[test(admin = @pkg, attacker = @0xBAD)]` injects arbitrary `signer`s (tests can forge signers freely, which is exactly what a PoC needs: proving the **contract** does not check); `timestamp::set_time_has_started_for_testing`; `account::create_account_for_test`.
3. Attacker module: write `#[test_only] module attacker::exploit` in `tests/` to simulate "an attacker-published module composing calls to your public functions" (MOV-08, MOV-32, MOV-38).
4. Assert the **impact**: balance changes, Cap held by someone else, object owner changed, function permanently aborting — not just "the call succeeded".
5. P0/P1 reports attach the test function name and the output of `sui move test <filter>` / `aptos move test --filter <name>`.

## Audit perspectives

Run the tools first (`sui move build --lint` + `sui move test`, or `aptos move lint` + `aptos move test`), classify lint warnings by MOV item, then review manually.

**Permissions and abilities** (MOV-01~15, 45, 47, 57, 63, 65~68)
- Build an ability table of all structs, marking which carry permission/value (MOV-02, 03, 29).
- List all `public`/`entry`/`public(package)`/`friend` functions × the shared objects/global resources they modify × authorization method (Cap / sender / signer comparison / none).
- Trace the full path of every Cap, `SignerCapability`, `ExtendRef`, `ConstructorRef`, `MintRef`, `UpgradeCap` from creation to holder.
- Is each Cap bound to its target object? Is there revocation and two-step transfer?

**Funds and assets** (MOV-17, 26~33, 41~43, 50~51, 53~56, 58, 64, 69)
- Every funds entry/exit: is the coin type constrained by types, zero amounts/dust, rounding direction, actual amount received (FA hooks).
- Abilities, binding fields and repayment checks of flash-loan/lending receipts.
- mint/burn paths and gating of `TreasuryCap`/`MintRef`; oracle feed ID, freshness, confidence interval.
- With a blocklist / restriction list, draw the "entry point × {sender, receiver, owner}" matrix (MOV-50); for batched redemption / amount-accumulation / pro-rata allocation loops, step through the remaining amount iteration by iteration, the gross / net basis of caller and callee, and whether the last item can absorb the remainder and the minimum split amount (MOV-51); for invariants with truncation, check whether the comparison is strict (MOV-27).

**Objects and storage** (MOV-13, 14, 16, 18~25, 34~36, 49, 52, 61, 62)
- **[Sui]** for each object: owned / shared / frozen / wrapped / dynamic-field child; who can take `&mut`; does the delete path clean up children?
- **[Aptos]** at which address each resource lives (user / object / resource account / `@pkg`); where the address comes from when accessed by address; is the owner of `Object<T>` verified?
- User-growable collections; aborts that others can trigger.

**Upgrades, time and external dependencies** (MOV-15, 37~40, 44~48, 59, 60)
- Upgrade authority holder and policy; **[Sui]** version gating and migrate; **[Aptos]** explicit initialize and init_module not re-running.
- Are dependency packages pinned, can third parties upgrade them; randomness and time sources; trust assumptions about external protocols (DEX, oracle, FA hooks).

**Lens 6, objects, capabilities and authority flow** ([method-object-cap-flow.md](refs/method-object-cap-flow.md)). Runs as its own sub-agent next to the four perspectives above: the capability and object flow table and the entry function × mutated shared state × authorization matrix; it is the contracts part of the authorization matrix appendix. Items: MOV-01~15, 19~25, 29, 57, 58, 63, 65~68, plus W3-02, W3-24, W3-66, W3-111, W3-112 (reviewed by the lens only, not by the sec-web3-common perspectives).

After the perspectives return and before Step 4, run [method-invariant-test.md](refs/method-invariant-test.md) on the value-moving modules (at most 30 minutes), and use [method-prover.md](refs/method-prover.md) only to settle specific P0/P1 arithmetic or conservation claims.

## Further reading

- Sui security best practices: https://docs.sui.io/develop/security/best-practices
- Sui package upgrades and versioning: https://docs.sui.io/develop/publish-upgrade-packages/upgrade
- Sui on-chain randomness: https://docs.sui.io/sui-stack/on-chain-primitives/randomness-onchain
- Aptos Move Security Guidelines: https://aptos.dev/build/smart-contracts/move-security-guidelines
- Aptos Randomness: https://aptos.dev/build/smart-contracts/randomness
- Aptos Fungible Asset (Dispatchable): https://aptos.dev/build/smart-contracts/fungible-asset
- The Move Book: https://move-book.com/ ; Aptos Move Book: https://aptos-labs.github.io/move-book/
- SlowMist Sui Move auditing primer (link only): https://github.com/slowmist/Sui-MOVE-Smart-Contract-Auditing-Primer
- SlowMist Aptos Move auditing primer (link only): https://github.com/slowmist/APTOS-MOVE-Smart-Contract-Auditing-Primer
- Sui Move Intro Course (CC-BY-SA, link only): https://github.com/sui-foundation/sui-move-intro-course
- aptos-core framework source (link only): https://github.com/aptos-labs/aptos-core/tree/main/aptos-move/framework
- OtterSec blog: https://osec.io/blog ; Zellic blog: https://www.zellic.io/blog ; MoveBit blog: https://www.movebit.xyz/blog
- Sui Prover: https://github.com/asymptotic-code/sui-prover ; Aptos Move Prover: https://aptos.dev/build/smart-contracts/prover

Files in this skill

  • README.md14.4 KB
  • SKILL.md20.7 KB
  • refs/items-abilities-caps.md10 KB
  • refs/items-accounts-signatures.md6.4 KB
  • refs/items-aptos-signer-storage.md5.5 KB
  • refs/items-dos-resources.md8.8 KB
  • refs/items-funds-assets.md31.7 KB
  • refs/items-objects-types.md10.6 KB
  • refs/items-ptb-composability.md4.8 KB
  • refs/items-random-time-oracle.md11.6 KB
  • refs/items-sui-platform.md6.6 KB
  • refs/items-upgrades-deps.md5.9 KB
  • refs/method-invariant-test.md3.7 KB
  • refs/method-object-cap-flow.md4.9 KB
  • refs/method-prover.md4 KB
  • refs/poc-guide.md10.8 KB
  • refs/proto-amm-clmm.md3.5 KB
  • refs/proto-liquid-staking.md3.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.