The get_secret function should only allow the owner to retrieve their stored secret by verifying the caller's identity.
The get_secret function has fake authentication that can be trivially bypassed. The function checks if a caller-controlled parameter equals @owner, rather than verifying the actual signer's identity. Any attacker can call get_secret(@owner) to steal the secret.
Likelihood:
Any user can call the function with @owner as parameter
No verification of actual caller identity
View functions are callable by anyone from any account
Impact:
Complete bypass of access controls
Unauthorized access to all stored secrets
Violation of owner-only access requirements
Attacker can steal secrets without any authentication
The following test demonstrates how any attacker can bypass authentication and steal secrets by simply passing the owner's address as a parameter:
The core issue is using an address parameter instead of proper signer-based authentication. Here's the fix:
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.