Missing access control in create_pool_D650_E2_D0()
allows for unauthorized pool creation
#9
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
edited-by-warden
primary issue
Highest quality submission among a set of duplicates
🤖_primary
AI based primary recommendation
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-10-superposition/blob/7ad51104a8514d46e5c3d756264564426f2927fe/pkg/seawater/src/lib.rs#L120-L121
https://github.com/code-423n4/2024-10-superposition/blob/7ad51104a8514d46e5c3d756264564426f2927fe/pkg/seawater/src/lib.rs#L802-L834
Vulnerability details
Proof of Concept
The following is given:
However, the
create_pool_D650_E2_D0()
function does not check if the caller has the necessary permissions, meaning any actor could potentially create a pool, leading to unauthorized pool creation.The function lacks a check against the
authorised_enablers
map, which is intended to restrict pool creation to authorized addresses.Impact
This could result in unauthorized or malicious pool creations. Since no verification is in place, it exposes the contract to potential misuse, such as the creation of pools with invalid parameters or for tokens not intended to be supported by the system.
Recommended Mitigation Steps
Introduce an access control check at the start of the function to verify if the caller is authorized.
Assessed type
Access Control
The text was updated successfully, but these errors were encountered: