I recently used spray foam from a can around an exhaust pipe coming from a hot water tank in the opening of my chimney. I was looking to close up the small gap where the exhaust pipe goes into the chimney, because the gas and electric company said carbon monoxide was detected around the opening. My question is, do I need to remove the foam and mix up concrete as a long-term solution? The can says the spray foam is a flammable, but I don't know if that applies here since the pipe carries exhaust only.
Put down the spray foam and step away slowly...and then take immediate steps to remove what you've applied.
This attempt at a solution was really unsafe. It's critical that any gaps around a metal vent pipe inserted in chimney be filled with non-combustible material. Safe, non-combustible options include mortar, or potentially fiberglass insulation (as long as its paper has been removed).
Most importantly, you will NOT stop a carbon monoxide leak by sealing this gap. The ventilation system is, by design, an open system. Air enters at the draft hood on top of the water heater, mixes with combustion gas, and exits at the chimney. If the chimney were to be clogged, gas would simply reverse and back out of same draft hood. So in this case a) that spray foam needs to be removed, and b) you need to schedule a regular chimney inspection on top of a furnace/water heater inspection done by an HVAC contractor to make sure all of your equipment is working properly.