TThe set_secret
function stores a user-provided secret string inside a Vault
resource under the caller's account.
It is replacing any existing vault without warning. It then emits a SetNewSecret
event, but doesn't include any event data or check for overwrites, risking silent data loss.
Likelihood:
There is no overwrite protection so user might call it multiple times overwriting the data.
Impact:
Users may accidentally overwrite their own secret (e.g., by re-calling set_secret()
with incorrect or blank data).
Add the following test. This test will:
Set an initial secret.
Set a second (different) secret.
Assert that the first secret is gone and the second one has silently replaced it — proving the vulnerability.
Added new error code and added a check for overwriting by checking if vault already exist
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.