OrderBook

First Flight #43
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: medium
Likelihood: low
Invalid

Missing Access Control for Order Amendment by Non-Owners

Root + Impact

Description

  • Only the order creator should be able to amend their orders

  • The contract correctly checks order.seller != msg.sender but this check could be bypassed if seller address is compromised or if there are issues with address validation

function amendSellOrder(
uint256 _orderId,
uint256 _newAmountToSell,
uint256 _newPriceInUSDC,
uint256 _newDeadlineDuration
) public {
Order storage order = orders[_orderId];
// @> This check is present but could be strengthened
if (order.seller != msg.sender) revert NotOrderSeller();
// ... rest of function
}

Risk

Likelihood:

  • Low- Depends on external factors like address compromise

  • Current validation is basic but functional

Impact:

  • Medium - Unauthorized modification of orders could lead to significant financial loss

  • Could manipulate prices or amounts maliciously

Proof of Concept

// If seller private key is compromised, attacker could amend orders
// No additional security measures beyond basic address check

Recommended Mitigation

+ // Consider adding additional security measures like:
+ // - Time delays for amendments
+ // - Multi-signature requirements for large orders
+ // - Nonce-based validation
Updates

Lead Judging Commences

yeahchibyke Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.