We present a new method to extract the three-dimensional electron density profile and density compression ratio of shock fronts associated with Coronal Mass Ejections (CMEs) observed in white light coronagraph images. We demonstrate the method with two examples of fast halo CMEs (∼ 2000 km s-1) observed on 2011 March 7 and 2014 February 25. Our method uses the ellipsoid model to derive the three-dimensional (3D) geometry and kinematics of the fronts. The density profiles of the sheaths are modeled with double-Gaussian functions with four free parameters and the electrons are distributed within thin shells behind the front. The modeled densities are integrated along the lines of sight to be compared with the observed brightness in COR2-A, and a χ2 approach is used to obtain the optimal parameters for the Gaussian profiles. The upstream densities are obtained from both the inversion of the brightness in a pre-event image and an empirical model. Then the density ratio and Alfvénic Mach number are derived. We find that the density compression peaks around the CME nose, and decreases at larger position angles. The behavior is consistent with a driven shock at the nose and a freely-propagating shock wave at the CME flanks. Interestingly, we find that the supercritical region extends over a large area of the shock and last longer (several tens of minutes) than past reports. It follows that CME shocks are capable of accelerating energetic particles in the corona over extended spatial and temporal scales and are likely responsible for the wide longitudinal distribution of these particles in the inner heliosphere. Our results also demonstrate the power of multi-viewpoint coronagraphic observations and forward modeling in remotely deriving key shock properties in an otherwise inaccessible regime.