Summary
The executePaymentQueue() function in PP_Queue_ManualExecution_v1 is vulnerable to a Denial-of-Service (DoS) attack due to unbounded growth of the _queue linked list.
A malicious actor can repeatedly submit redeem requests with small or dust amounts, resulting in numerous entries being added to _queue. Because executePaymentQueue() attempts to iterate over every item in _queue and execute the order, the function’s gas consumption grows linearly with the number of items in the _queue.
Once the _queue grows large enough, the function will consistently run out of gas, making it inaccessible thereby orders can't be executed.
Recommendation
-
Bound the iteration in executePaymentQueue():
- Process up to a maximum number of orders per call.
-
Rate-limit or filter spam requests:
- Reject extremely small or dust-value orders.
- Implement minimum thresholds per token or per user
Summary
The
executePaymentQueue()function inPP_Queue_ManualExecution_v1is vulnerable to a Denial-of-Service (DoS) attack due to unbounded growth of the_queuelinked list.A malicious actor can repeatedly submit redeem requests with small or dust amounts, resulting in numerous entries being added to
_queue. BecauseexecutePaymentQueue()attempts to iterate over every item in_queueand execute the order, the function’s gas consumption grows linearly with the number of items in the_queue.Once the _queue grows large enough, the function will consistently run out of gas, making it inaccessible thereby orders can't be executed.
Recommendation
Bound the iteration in
executePaymentQueue():Rate-limit or filter spam requests: