The Secret Vault protocol is designed to allow users to store their private secrets securely, where only the vault creator (owner) should be able to set and retrieve their secret data.
The get_secret
function contains a critical vulnerability where it uses a hardcoded @owner
address for both access control validation and secret retrieval, completely breaking the intended per-user vault functionality and the actual owner will not be able to call get_secret
with their address.
Likelihood:
Any user who creates a vault with an address different from the hardcoded @owner
(0xcc in dev environment) will be unable to access their own vault, as the function will always fail the access control check
The hardcoded @owner
address will be able to access any vault's secret data by calling get_secret
with their own address, regardless of who actually created the vault
This vulnerability affects 100% of vault creations where the creator's address is not exactly the hardcoded @owner
address
Impact:
Complete loss of access control - vault creators cannot retrieve their own secrets if their address differs from the hardcoded owner
Unauthorized access to sensitive data - the hardcoded owner can access any user's vault contents
Protocol functionality is fundamentally broken as it cannot support multiple independent users as intended
Users' private secrets (passwords, keys, sensitive information) are exposed to the hardcoded owner address
The following test will fail because the @owner is not the actual owner of the vault
The fix removes the hardcoded owner address check entirely and instead retrieves the vault from the caller's address. This ensures that:
Each user can only access their own vault
The function works for any user who has created a vault
Access control is properly enforced at the resource level (only the vault owner can call the function on their own vault)
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.