We report theoretical and numerical studies of the flow behaviour when a fluid is injected into a confined porous medium saturated with another fluid of different density and viscosity. For a two-dimensional configuration with point source injection, a nonlinear convection–diffusion equation is derived to describe the time evolution of the fluid–fluid interface. In the early time period, the fluid motion is mainly driven by the buoyancy force and the governing equation is reduced to a nonlinear diffusion equation with a well-known self-similar solution. In the late time period, the fluid flow is mainly driven by the injection, and the governing equation is approximated by a nonlinear hyperbolic equation that determines the global spreading rate; a shock solution is obtained when the injected fluid is more viscous than the displaced fluid, whereas a rarefaction wave solution is found when the injected fluid is less viscous. In the late time period, we also obtain analytical solutions including the diffusive term associated with the buoyancy effects (for an injected fluid with a viscosity higher than or equal to that of the displaced fluid), which provide the structure of the moving front. Numerical simulations of the convection–diffusion equation are performed; the various analytical solutions are verified as appropriate asymptotic limits, and the transition processes between the individual limits are demonstrated. The flow behaviour is summarized in a diagram with five distinct dynamical regimes: a nonlinear diffusion regime, a transition regime, a travelling wave regime, an equal-viscosity regime, and a rarefaction regime.