Secret Vault on Aptos

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

Publicly readable secret by humans

Publicly readable secret

Description

The vault is intended to store a secret that only the owner can access. However, the secret is not hashed before stored in plain UTF-8 string anyone who queries the blockchain state.

struct Vault has key {
secret: String @> // Secret stored in plaintext on-chain
}

Risk

Likelihood: High

Anyone with access to the blockchain state can read the vault's secret field.

Impact: High

Sensitive information intended to be private are exposed publicly on chain.

Proof of Concept

Use the blockchain explorer or indexed to ge back the data

Recommended Mitigations

Hash the secret off-chain before storing it on-chain

Updates

Lead Judging Commences

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

Anyone can see the `secret` on chain

Support

FAQs

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