ROOT + IMPACT
ROOT CAUSE :
// Issue: get_secret referencing undefined owner
#[view]
public fun get_secret (caller: address):String acquires Vault{
assert! (caller == @owner,NOT_OWNER); // @> undefined owner
let vault = borrow_global
vault.secret
}
// Issue: event emission without EventHandle in Vault
public entry fun set_secret(caller:&signer,secret:vector
let secret_vault = Vault{secret: string::utf8(secret)};
move_to(caller,secret_vault);
event::emit(SetNewSecret {}); // @> EventHandle not created or referenced
}
This will occur whenever get_secret
is called, because the function references an undefined @owner
instead of a verified signer or stored owner address, allowing unauthorized access attempts or runtime failures.
This will occur whenever set_secret
is called, because the SetNewSecret
event is emitted without creating or associating an EventHandle
in the Vault, which can cause event emission to fail or be misattributed.
Impact:
Sensitive secret data stored in the Vault could be accessed by unauthorized addresses, leading to potential data leaks.
Event emission may fail or be incorrectly attributed, causing loss of auditability and breaking dApp functionality that relies on these events.
RISK :
Unauthorized access could expose sensitive secrets.
Events may fail or be misattributed, breaking dApp functionality and auditability.
Malicious actors could exploit this to manipulate or leak secret data.
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.