In the present study, a numerical investigation is carried out on the aerodynamic performance of a supercritical airfoil RAE 2822. Transonic flow fields are considered where self-excited shock wave oscillation prevails. To control the shock oscillation, a passive technique in the form of an open rectangular cavity is introduced on the upper surface of the airfoil where the shock wave oscillates. Reynolds Averaged Navier-Stokes (RANS) equations have been used to predict the aerodynamic behavior of the baseline airfoil and airfoil with cavity at Mach number of 0.729 and at angle of attack of 5°. The aerodynamic characteristics of the baseline airfoil are well validated with the available experimental data. It is observed that the introduction of a cavity around the airfoil upper surface can completely stop the self-excited shock wave oscillation and successively improve the aerodynamic characteristics.