Fluid injection into the deep subsurface, such as injection of carbon dioxide (CO$_2$) into deep saline aquifers, often involves two-fluid flow in confined geological formations. Similarity solutions may be derived for these problems by assuming that a sharp interface separates the two fluids, by imposing a suitable no-flow condition along both the top and bottom boundaries, and by including an explicit solution for the pressure distribution in both fluids. When the injected fluid is less dense and less viscous than the resident fluid, as is the case for CO$_{2}$ injection into a resident brine, gravity override produces a fluid flow system that is captured well by the similarity solutions. The similarity solutions may be extended to include slight miscibility between the two fluids, as well as compressibility in both of the fluid phases. The solutions provide the location of the interface between the two fluids, as well as drying fronts that develop within the injected fluid. Applications to cases of supercritical CO$_{2}$ injection into deep saline aquifers demonstrate the utility of the solutions, and comparisons to solutions from full numerical simulations show the ability to predict the system behaviour.