Secret Vault on Aptos

First Flight #46
Beginner FriendlyWallet
100 EXP
View results
Submission Details
Impact: low
Likelihood: medium
Invalid

event in set_secret function does not leak content but indicates that a secret change occurred which is a observable metadata for a attacker

event in set_secret function does not leak content but indicates that a secret change occurred which is a observable metadata for a attacker

Description

  • set_secret function emits an event with empty params which does not leak any params but event is publicly visible which indicates an change

public entry fun set_secret(caller:&signer,secret:vector<u8>){
let secret_vault = Vault{secret: string::utf8(secret)};
move_to(caller,secret_vault);
@> event::emit(SetNewSecret {});
}

Recommended Mitigation

  • Event emission is important in contracts, instead of passing the empty params in event pass the params except the secret, can include signer,timestamp,vault_address

Updates

Lead Judging Commences

bube Lead Judge 18 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.