The module stores the secret as a String
in a has key
resource. However, this storage is public and can be access by anyone. Anyone can query APIs to read the secret bytes.
According to the Readme, the “secret” should not be retrievable by unauthorized parties. But since the Vault has a key
resource, it is stored on the global state of the blockchain. However, there are additional issues :
The get_secret
function is supposed to be callable only by the owner of the Vault (which is set in the .toml). However, Anybody can call it by providing the owner's address.
Even if this function was correctly implemented, it wouldn't change the fact that the secret is retrievable from the blockchain anyways.
Public chain state is inspectable by anyone. Plus anyone can call the get_secret
. The secret can thus be retrieved by anybody which is a huge risk to the owner.
Do NOT store any secret, passwords or sensitive data on the blockchain.
Also be careful when setting the control accesses for the function that are only supposed to be called by a specific address i.e get_secret
.
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.