AutoPxGlp::redeem and AutoPxGlp::withdraw does not check if receiver address is not zero. And always it's receiver, who gets the assets. Not checking it may lead to funds lost permemently.
Proof of Concept
User calls impacted function iwth default receiver (address 0)
All funds are sent to address 0, hence lost
Tools Used
VS Code
Recommended Mitigation Steps
Add check for 0 address, and for 0 amount, to save gas
Lines of code
https://github.com/code-423n4/2022-11-redactedcartel/blob/main/src/vaults/AutoPxGlp.sol#L449-L456 https://github.com/code-423n4/2022-11-redactedcartel/blob/main/src/vaults/AutoPxGlp.sol#L436-L444
Vulnerability details
Impact
AutoPxGlp::redeem
andAutoPxGlp::withdraw
does not check if receiver address is not zero. And always it's receiver, who gets the assets. Not checking it may lead to funds lost permemently.Proof of Concept
Tools Used
VS Code
Recommended Mitigation Steps
Add check for 0 address, and for 0 amount, to save gas