The normal behavior expected in this module is for users to securely store a secret on the Aptos blockchain such that the secret is only accessible to the owner and remains confidential.
The specific issue is that the secret is stored as a UTF-8 encoded string in the Vault
resource without any encryption or obfuscation. Since Aptos is a public blockchain, all on-chain data, including the secret stored as a plain string, is publicly visible to anyone who queries the blockchain state. This exposes the secret, violating confidentiality.
Likelihood:
This occurs every time a user calls set_secret
and stores a secret on-chain without encryption.
It applies universally to all users of the contract because Aptos stores data transparently across all nodes.
Impact:
Confidential secrets intended to be private are fully exposed and readable by any observer.
This can lead to theft of sensitive information, loss of user trust, and compromise of the intended security model of the contract.
The secret is stored as a String
constructed from string::utf8(secret_bytes)
, i.e., plaintext. Any reader with chain state access (full nodes, indexers) can recover the exact text.
Document clearly the public nature of on-chain data to users and developers to avoid accidental exposure of sensitive information.
Alternatively, redesign the contract to store only encrypted secrets and add appropriate access controls to restrict reading.
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.