The linear stability of the incompressible flow in an infinitely extended cavity with rectangular cross-section is investigated numerically. The basic flow is driven by a lid which moves tangentially, but at yaw with respect to the edges of the cavity. As a result, the basic flow is a superposition of the classical recirculating two-dimensional lid-driven cavity flow orthogonal to a wall-bounded Couette flow. Critical Reynolds numbers computed by linear stability analysis are found to be significantly smaller than data previously reported in the literature. This finding is confirmed by independent nonlinear three-dimensional simulations. The critical Reynolds number as a function of the yaw angle is discussed for representative aspect ratios. Different instability modes are found. Independent of the yaw angle, the dominant instability mechanism is based on the local lift-up process, i.e. by the amplification of streamwise perturbations by advection of basic flow momentum perpendicular to the sheared basic flow. For small yaw angles, the instability is centrifugal, similar as for the classical lid-driven cavity. As the spanwise component of the lid velocity becomes dominant, the vortex structures of the critical mode become elongated in the direction of the bounded Couette flow with the lift-up process becoming even more important. In this case the instability is made possible by the residual recirculating part of the basic flow providing a feedback mechanism between the streamwise vortices and the streamwise velocity perturbations (streaks) they promote. In the limit when the basic flow approaches bounded Couette flow the critical Reynolds number increases very strongly.