The secret
of the vault's owner is expected to be accessible only by the vault owner.
However, the get_secret()
function fails to check the signer, allowing anyone to access the secret.
Likelihood: High
This issue will occur any time after the owner sets the secret.
Impact: High
Anyone can access the owner's vault secret, which can be used for restricted function verification. This allows anyone to impersonate the owner and modify the vault as they wish.
This issue breaks a main invariant as it is expected that others should not be able to access the secret.
Put the test_anyone_reads_secert
into the test section of secret_vault.move
.
Run the test with aptos move test -f test_anyone_reads_secert
.
Secrets are stored publicly on-chain and can be accessed in this way or via APIs. It is recommended not to store any sensitive data, such as secrets, 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.