The Vault global storage stores user secrets as plain String values, which poses a significant security risk. These values can be easily exposed on the public blockchain, therefore undermines the contract's fundamental purpose of securely protecting user secrets.
Vault's secret was found storing as String which poses high risk of exposing user's secret that can easily be viewed in public blockchain, deviating the core security of the contract to keep user's secret safe.
Likelihood:
Occurs everytime user calls set_secret
Impact:
The user's secret is exposed on the public blockchain, severely compromising the security of their vault. This vulnerability could lead to unauthorized access and potential financial loss.
Add the following test in secret_vault.move:
In terminal run aptos move test -f test_vault_secret_in_plain_text :
The test passed with user secret chocolate was retrieved and printed from its text form.
The data for secret shall be encrypted off-chain. Its data type in global storage Vault should be changed to type vector<u8>, aligning to the secret input parameter in 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.