The Vault
resource is intended to store a secret that only the owner can access via the get_secret
function. However, in Move on Aptos, all on-chain storage, which is a tree-shaped persistent global storage and programs cannot access the filesystem, network, or any other data outside of this tree, is publicly readable via full node RPC queries. This means that while Move enforces access control for contract calls, it does not prevent anyone from directly reading the underlying storage data. As a result, any party can retrieve the secret without calling get_secret
.
Likelihood:
Anyone with access to an Aptos full node or blockchain explorer can query account storage directly.
This applies immediately after the first call to set_secret
and remains true as long as the resource exists.
Impact:
Complete exposure of the “secret” value to any network participant.
Violates the core functional requirement: “Only the owner should be able to store and retrieve the secret.”
The following PoC deploys the module locally and without calling any function, hits the REST API to show that the resource exists (or not) and can be read when created.
Start local Aptos node & faucet
Now we need to create a new terminal and:
After each step, if successful, the terminal will output a json with field "success": true
Initialize local account for deployment. It will ask you to enter a key, just press enter and it will generate account address and fund it
Publish/Deploy
Set some random secret
Query resource via REST API without using the getter function.
The result should be a json including the secret value.
Result:
Since true secrecy is impossible on-chain in Move (or any public blockchain), the only way to protect the secret is to store it encrypted where encrypt_offchain
represents encryption performed before sending data on-chain, with the key managed off-chain.
Alternatively, redesign the application so that sensitive information is never stored in plaintext on-chain.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.