lack of nonce
in kyc signature enables replay
#161
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-187
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-01-ondo/blob/main/contracts/cash/kyc/KYCRegistry.sol#L94
Vulnerability details
Description
To prove you have done KYC ondo provides a signature that you can use to add a user as having done KYC.
An admin can also go in and later remove this.
But due to a lack of
nonce
used the same signature, if it is still withing deadline, can be used to re-add the user as KYCed even after it has been removed.Impact
A user can re-add themselves as KYCed even after an admin has removed them. Given that the
deadline
still holdsProof of Concept
PoC test in
RegistrySignature.sol
:Tools Used
vs vode, force
Recommended Mitigation Steps
use a per user
nonce
when providing a signatureThe text was updated successfully, but these errors were encountered: