Describe the normal behavior in one or more sentences
Answer: Normally, the get_secret function should only allow the designated owner of the vault to retrieve the stored secret, ensuring that no other account can access or read the sensitive data.
Explain the specific issue or problem in one or more sentences
The get_secret function takes an address as input and compares it to an undeclared @owner, meaning the check cannot reliably enforce ownership. Since any caller can supply the owner address as an argument, this effectively bypasses authentication and allows unauthorized users to read the secret.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
This occurs whenever a user calls get_secret and supplies the vault owner’s address as the caller parameter, since the function does not validate that the transaction signer actually controls that address.
Reason 2
This occurs whenever the contract is deployed without defining a valid @owner constant, causing the ownership check to be meaningless and leaving the secret exposed to any address passed in as the caller.
Impact:
Impact 1
Unauthorized users can retrieve and view the supposedly private secret, completely breaking the confidentiality the contract is meant to enforce.
Impact 2
The contract fails its core security objective, undermining trust in the application and making it unsuitable for any real-world use where sensitive information must remain restricted to the owner.
Owner legitimately sets a secret.
Attacker calls get_secret, but since it only checks against a passed address, the attacker simply supplies @0xcc (owner’s address).
Function returns the secret to the attacker.
Removes address parameter spoofing: now uses &signer so only the authenticated transaction sender can access their vault.
Eliminates undeclared @owner issue: uses signer::address_of(caller) directly.
Maintains confidentiality model: still worth noting that secrets are public on-chain; for real secrecy, owners should encrypt before storing.
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.