There is no access control on the set_secret()
, leading to anyone setting their secret in the contract. This breaks the core purpose of the smart contract, which is to allow only the owner to set secrets
According to the documentation, SecretVault should only allow the designated owner to store and retrieve secrets. Other users should not have access to create or read secrets.
The contract has two critical access control vulnerabilities:
The set_secret
function has no access control, allowing any user to store a secret at their address
Likelihood:
As long as the contract is there, anyone can call and set their secret
No access control needed to do set a secret in the contract
Impact:
breaks core functionality/ purpose of the contract
In Move for Aptos, the term "owner" refers to a signer, which is a verified account that owns a given resource, has permission to add resources and the ability to grant access or modify digital assets. Following this logic in this contest, the owner is the account that owns `Vault`. This means that anyone has right to call `set_secret` and then to own the `Vault` and to retrieve the secret from the `Vault` in `get_secret` function. Therefore, this group is invalid, because the expected behavior is anyone to call the `set_secret` function.
In Move for Aptos, the term "owner" refers to a signer, which is a verified account that owns a given resource, has permission to add resources and the ability to grant access or modify digital assets. Following this logic in this contest, the owner is the account that owns `Vault`. This means that anyone has right to call `set_secret` and then to own the `Vault` and to retrieve the secret from the `Vault` in `get_secret` function. Therefore, this group is invalid, because the expected behavior is anyone to call the `set_secret` function.
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.