Open howlbot-integration[bot] opened 2 months ago
alex-ppg marked the issue as selected for report
alex-ppg marked the issue as satisfactory
The Warden and its duplicates have correctly identified that the mechanism exposed for updating the emergency_council
will incorrectly update the nft_manager
instead.
I initially wished to retain a medium risk severity rating for this vulnerability due to how the emergency_council
is configured during the contract's initialization and its value changing being considered a rare event, however, a different highly sensitive variable is altered instead incorrectly (nft_manager
) which would have significant consequences to the system temporarily.
Based on the above, I believe that a high-risk rating is appropriate due to the unexpected effects invocation of the function would result in.
Lines of code
https://github.com/code-423n4/2024-08-superposition/blob/main/pkg/seawater/src/lib.rs#L1121
Vulnerability details
Impact
Inside of
lib.rs
, there is a functionupdate_emergency_council_7_D_0_C_1_C_58()
that is needed to update the emergency council that can disable the pools. However, in the current implementation,nft_manager
is updated instead.Proof of Concept
This is the current functionality of
update_emergency_council_7_D_0_C_1_C_58()
:https://github.com/code-423n4/2024-08-superposition/blob/main/pkg/seawater/src/lib.rs#L1111-1124
As you can see, the function updates
nft_manager
contract instead ofemergency_council
that is needed to be updated. Above this function there is another function that updatesnft_manager
:https://github.com/code-423n4/2024-08-superposition/blob/main/pkg/seawater/src/lib.rs#L1097-1107
As you can see here, in both of the functions
nft_manager
is updated which is an unexpected behavior and the contract cannot update theemergency_council
that handles emergency situations:https://github.com/code-423n4/2024-08-superposition/blob/main/pkg/seawater/src/lib.rs#L117-118
Tools Used
Manual review.
Recommended Mitigation Steps
Change
update_emergency_council_7_D_0_C_1_C_58()
to updateemergency_council
Assessed type
Other