Submitted by minglei-wang-3570, also found by zhaojohnson, lian886, and 0xc0ffEE
The function PositionActionPendle::_onDecreaseLever is a  hook to decrease lever by withdrawing collateral from the CDPVault. But the current implementation is wrong if leverParams.auxAction.args.length is 0, _onWithdraw is called here, but the tokenOut still returns 0.
The tokenOut accounting will be incorrect if the leverParams.auxAction.args.length is 0.
We can see that the function PositionActionPendle::_onDecreaseLever returns the tokenOut on successful withdraw.
But in the above implementation, The tokenOut accounting will be incorrect if the leverParams.auxAction.args.length is 0.
The implementation properly handled in the function PositionAction4626::_onDecreaseLever() as the tokenOut is return even if leverParams.auxAction.args.length is 0.
Handle the edge case properly like PositionAction4626::_onDecreaseLever() and return tokenOut if leverParams.auxAction.args.length is 0.
Token-Transfer
amarcu (LoopFi) confirmed and commented:
Koolex (judge) decreased severity to Medium and commented:
