57770 sc medium admin can bypass permissionedcalls protection using multicall

Submitted on Oct 28th 2025 at 19:40:56 UTC by @nem0thefinder for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57770

  • Report Type: Smart Contract

  • Report severity: Medium

  • Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/AlchemistAllocator.sol

  • Impacts:

    • Contract fails to deliver promised returns, but doesn't lose value

    • permissionedCalls` Protection can be bypassed

Description

Summary

The AlchemistAllocator contract blocks direct calls to allocate() and deallocate() functions through its proxy() function. However, an admin can bypass this protection by wrapping these calls inside the vault's multicall() function, completely defeating the intended privilege separation.

Description

In alchemistAllocator constructor set MorpheusVault::Allocate,Deallocate functions as permissioned calls to prevent calling them directly from the permissionedProxy

AlchemistAllocator.sol
constructor(address _vault, address _admin, address _operator) {
    // Block direct allocate/deallocate calls via proxy
    permissionedCalls[0x5c9ce04d] = true; // allocate
    permissionedCalls[0x4b219d16] = true; // deallocate
}

The issue here that the admin can bypass this through calling MorpheusVault::multiCall and route the calls to Morphues::Allocate,dellocate and since multiCall is not permissionedCall the call will succeed

Attack Flow

Impact

  • Defeats Security Model: The entire permissionedCalls protection is bypassed

  • AlchemistAllocator Logic:This path Ignore any custom logic, checks, or accounting in the AlchemistAllocator

Mitigation

  1. Add multicall selector to permissionedCalls if we don't need to call it via proxy OR

  2. Restrict calling allocateand deallocate from multicall

Proof of Concept

Proof of Concept

1.Paste the following test in AlchemistAllocator.t.sol

2.Run it via forge test --mc AlchemistAllocatorTest --mt test_byPass_permissionedCalls -vvv

Logs

Was this helpful?