Skip to content

Denial of Service via Unbounded _queue Growth in executePaymentQueue() #744

@MehdiKarimi81

Description

@MehdiKarimi81

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

  1. Bound the iteration in executePaymentQueue():

    • Process up to a maximum number of orders per call.
  2. Rate-limit or filter spam requests:

    • Reject extremely small or dust-value orders.
    • Implement minimum thresholds per token or per user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions