Overcoming uncontrolled casing pressure in oil and gas wells