Normally, the vault owner should be able to rotate or update their secret multiple times.
The current implementation uses move_to
directly, which aborts if the resource Vault
already exists at the account, preventing any updates.
This creates an availability and usability problem: after the very first secret is stored, the owner is permanently locked out from making changes. In practice, this means secrets cannot be rotated, corrected, or revoked, which goes against real-world requirements of secret storage systems.
Likelihood:
This occurs immediately after the first successful secret set.
Every subsequent attempt to store a secret will abort due to the existing resource.
Impact:
Owner cannot rotate or replace their secret.
Permanent denial of service for secret management.
The fix ensures that if a Vault
resource already exists, it is updated in-place via borrow_global_mut
rather than replaced. If no vault exists, it falls back to move_to
. This provides safe secret rotation and prevents permanent lockout after the initial secret is stored.
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.