Such situations may happen to Buy Stop, Sell Stop, and Stop Loss orders.
When these orders are triggered, the system sends the Market order, which is executed at the current price, which may differ from the declared price.
Other types of pending orders (Buy Limit, Sell Limit, and Take Profit) are mostly executed at the specified price, but sometimes at the better price, if such price exists on the market when they are executed.