The present study theoretically explores instability behavior of medium dense sand under both drained and undrained biaxial test. The instability analysis has been posed as a plane strain bifurcation problem within a large deformation framework. A generalized pressure-dependent 3D constitutive model has been employed to simulate the drained and undrained biaxial tests on a medium dense sand sample assuming two types of lateral boundaries, namely rigid and flexible. The lateral boundary condition can influence significantly the onset of undrained soild-fluid instability and drained diffused intabilities. Localization gets delayed with increasing lateral confinement for both drained and undrained cases. Elastic parameters have strong impact on the instability onset.