-
Notifications
You must be signed in to change notification settings - Fork 0
addKYCAddressViaSignature can be replayed #166
Copy link
Copy link
Closed
Labels
2 (Med Risk)Assets not at direct risk, but function/availability of the protocol could be impacted or leak valueAssets not at direct risk, but function/availability of the protocol could be impacted or leak valuebugSomething isn't workingSomething isn't workingduplicate-187satisfactorysatisfies C4 submission criteria; eligible for awardssatisfies C4 submission criteria; eligible for awards
Metadata
Metadata
Assignees
Labels
2 (Med Risk)Assets not at direct risk, but function/availability of the protocol could be impacted or leak valueAssets not at direct risk, but function/availability of the protocol could be impacted or leak valuebugSomething isn't workingSomething isn't workingduplicate-187satisfactorysatisfies C4 submission criteria; eligible for awardssatisfies C4 submission criteria; eligible for awards
Type
Fields
Give feedbackNo fields configured for issues without a type.
Lines of code
https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/cash/kyc/KYCRegistry.sol#L79-L112
Vulnerability details
Impact
Attacker can replay KYCRegistry.addKYCAddressViaSignature to reinstate a previously revoked KYC address. Since KYC is an important part of Ondo Finance, the risk is relatively high. This issue is partially mitigated assuming the deadline is reasonably set.
https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/cash/kyc/KYCRegistry.sol#L79-L112
Proof of Concept
Add this to https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/forge-tests/cash/registry/RegistrySignature.t.sol#L91
Tools Used
Foundry
Recommended Mitigation Steps
Add a nonce or store used sig