unlimiting the delay period with minimum threshold allow the delay period to be set too low and allow a malicious ScheduleUpgrade
message to be executed on the root contract and gain access on the other contracts.
#298
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-a
low quality report
This report is of especially low quality
primary issue
Highest quality submission among a set of duplicates
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2023-09-centrifuge/blob/512e7a71ebd9ae76384f837204216f26380c9f91/src/Root.sol#L43-L50
https://github.com/code-423n4/2023-09-centrifuge/blob/512e7a71ebd9ae76384f837204216f26380c9f91/src/Root.sol#L16-L17
Vulnerability details
Impact
allowing to modify the delay period without minimum threshold can result in set the
delay
period to a too short period or even zero ,which is allowed according to the code , and this could lead to allowing a maliciousScheduleUpgrade
message to pass and a malicious account can gain control over all the contracts of the protocols.Proof of Concept
in the
Root.sol
contract , the protocol implements a maximum threshold in the functionfile()
which can modify thedelay
variable , so the possibility of the set the delay period to a very long period exists and also setting the delay period to a very short period is still possible ,as shown in thefile()
which will not prevent set thedelay
period to zero or any short period :so if the
delay
was set to a very short period and Someone gains control over a router and triggers a maliciousScheduleUpgrade
message , the malicious attacker can trigger theexecuteScheduledRely()
function after thedelay
period , which is too short , to give his address or any contract anauth
role on any of the protocol contracts , the attacker can beauth
on theescrow
contract and steals all the funds from the protocol .this attack does not assume that the
auth
admin on theRoot
contract is malicious , but it is all about the possibility of setting thedelay
period to a very short period or even zero , which can be happened mistakenly or intentionally .Tools Used
manual review
Recommended Mitigation Steps
this vulnerability can be mitigated by implementing a minimum threshold
MIN_DELAY
to thedelay
period , so this will prevent setting thedelay
period to zero or even a very short period .Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: