The vault::set_secret
function lacks an authorization check to verify that the caller is the contract owner. This allows any user to create a Vault resource under their own account.
The vault::get_secret
function performs a flawed authorization check. It validates a user-provided address parameter against the owner's address, instead of verifying &signer
. This allows any attacker to pass in the owner's public address and read the secret.
The contract contains two distinct access control vulnerabilities, both of which are trivial to exploit. The overall risk is rated High/High due to the critical impact of the information disclosure flaw.
Any user calls the vault::set_secret
entry function to create a Vault resource under their own account, as the function lacks an ownership check.
Any user calls the vault::get_secret
view function, providing the owner's publicly known address as the caller argument to bypass the flawed authorization check.
[Critical] Complete loss of confidentiality for the owner's secret. The stored value becomes publicly readable by anyone, rendering the contract's primary security guarantee useless.
[Medium] Violation of the contract's intended design. Unauthorized users can create their own Vault instances, which breaks the specified "single-owner" model and leads to unnecessary state bloat on the blockchain.
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.