Dangers of spray foam in body panels?

You cut out the bad and weld in the good. This is the only way if your future plans include putting real paint on it.