We derive an approximate analytical solution that describes the interface dynamics during the injection of supercritical carbon dioxide into homogeneous geologic media that are fully saturated with a host fluid. The host fluid can be either heavier (e.g., brine) or lighter (e.g., methane) than the injected carbon dioxide. Our solution relies on the Dupuit approximation, and explicitly accounts for the buoyancy effects. The general approach is applicable to a variety of phenomena involving variable-density flows in porous media. In three dimensions under radial symmetry, the solution describes carbon dioxide injection; its two-dimensional counterpart can be used to model seawater intrusion into coastal aquifers. We conclude by comparing our solutions with existing analytical alternatives.