This report documents the security analysis of the Secret Vault smart contract, developed in Move. During testing, a vulnerability was identified in the get_secret function, allowing any user to read the owner's secret without proper authentication. Below, we detail the vulnerability, its impact, the exploit developed, and the suggested fix to ensure the vault's confidentiality.
The function get_secret
relies on a parameter of type address
to verify authorization:
Why it is insecure:
The function does not require a &signer
.
Any account can forge the @owner
address when calling the function.
This allows any user to read the secret, bypassing ownership restrictions.
In Move, you only get authentication guarantees when the function receives a &signer
.
Here, get_secret
only receives an address
value, so there is no binding between the actual caller and the address passed.
The assertion assert!(caller == @owner, ...)
only checks value equality, which is trivially bypassed by a malicious user.
Authentication by value is insecure — only &signer
can enforce true authorization.
This confirms that a non-owner can read the secret from the vault.
Change get_secret
to authenticate with &signer
:
Only the real signer (the transaction sender) can access the secret.
Prevents non-owners from bypassing authentication.
Impact: The owner’s secret can be read by any user, breaking confidentiality.
Correction: Authenticate using &signer
instead of address
in get_secret
.
PoC provided: exploit_get_secret
proves the vulnerability.
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.