Only the designated @owner
should be able to store secrets in the module. Other users should not be able to create, modify secrets or read secrets.
Only the owner should be able to store a secret and then retrieve it later. Others should not be able to access the secret.
However, the set_secret
function does not verify that the caller is the owner. Any signer can invoke this function and store a secret under their account, bypassing intended access control.
Likelihood:
High — any account can call set_secret
at any time.
Exploitation requires no special conditions; standard transaction is sufficient.
Impact:
Unauthorized users can store secrets in the system.
Violates the contract’s security assumptions, potentially exposing sensitive data.
Add the following test to the secret_vault.move
module which demonstrates how user != module owner
can set a secret.
Result:
Ensure that only the designated module owner can store a secret in the vault.
If we try to run thew test again it fails because now set_secret
has access control:
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.