The system of equations of one-dimensional flow of a multicomponent mixture with phase transitions through a porous medium is considered. In particular, this system describes the processes of enhanced oil recovery by injection of gases. For this system self-similar solutions of the Riemann problem of discontinuity breakdown are constructed by splitting the problem into "physicochemical" and "hydrodynamic" problems. Main elements of the procedure for constructing the solution are illustrated with reference to a four-component system with constant distribution coefficients and the solutions obtained by different methods are compared. It is shown that the approach proposed is also effective for a system with a greater number of components.