Secret Vault on Aptos

First Flight #46
Beginner FriendlyWallet
100 EXP
View results
Submission Details
Severity: high
Valid

Secret can be read by others/unauthorized parties

Description

only the owner should be able to retrieve the secret later, others should not be able to read the secret.
The secret: String is stored in plaintext on-chain. Full nodes / indexers can read raw state off-chain even if the module doesn’t expose a read function.

// move
struct Vault has key {
@> secret: String // plaintext on a public chain
}

Risk

Likelihood:

Always true on public chains; node operators/indexers can inspect state.

Impact:

The “secret” is not actually secret; privacy expectations are broken.

Proof of Concept

Observing raw state via an indexer / full node storage dump reveals the String bytes.

Recommended Mitigation

Consider making this changes

- struct Vault has key {
- secret: String }
+ // Store a commitment or ciphertext instead of plaintext:
+ struct Vault has key {
+ // e.g., a hash commitment (cannot retrieve original from hash)
+ secret_hash: vector<u8>
+ // OR an encrypted blob where the decryption key is held off-chain
+ // ciphertext: vector<u8>
+ }
Updates

Lead Judging Commences

bube Lead Judge 16 days ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of signer check in `get_secret`

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.