wrong access control check in UpdateWeightRunner.sol:setWeightsManually()
function that enables malicious pool creators to bypass intended authorization checks and manipulate pool weights without proper approval.
The vulnerability is located in the access control logic of setWeightsManually()
function in UpdateWeightRunner
:
The function retrieves poolRegistry
directly from the pool contract, which was set by normal users during pool creation in QuantAMMWeightedPoolFactory
or can be set for custom Logic Pools:
Key issues:
setWeightsManually()
checks access control against user-provided poolRegistry
instead of admin-controlled approvedPoolActions
No validation that pool creator is actually approved for weight modifications
Violates protocol's trust model for type 3 pools where "pool creator is deemed untrusted"
Attack Path:
Attacker creates pool with crafted poolRegistry
value setting MASK_POOL_OWNER_UPDATES
bit
Calls setWeightsManually()
despite lacking proper approval
Successfully modifies pool weights due to incorrect access control check
Can manipulate weights for economic gain
Bypass of intended access controls in setWeightsManually()
Unauthorized weight manipulation
Manual code review
1- Fix access control in setWeightsManually()
:
2- Factory-level protections:
Implement validation during pool creation to prevent setting of privileged bits in poolRegistry
Move registry management to factory contract
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.