Theory and software describing the transport of three-phase (gas, liquid, solid) hyper-saline brines in porous media is developed using the Palliser–McKibbin description of the H2O–NaCl phase space. Six phase regions are recognised (liquid, gas, liquid + solid, gas + solid, liquid + gas and liquid + gas + solid), and for each region the relevant thermodynamic states, choice of state variables, and phase compositions are described. A new simulation code, NaCl-TOUGH2, is described which is based on this theory. This extends the widely used simulator TOUGH2 with an additional component (salt) and the six phase regions, and solves the equations for the conservation of water, salt and energy. As currently implemented, this code is valid for pressures from 1 to 1000 bar, temperatures from 10 to 620 °C, and salt mass fractions between 0 and 1.