Dangers of spray foam in body panels?

I know what you mean about crap falling down there, its really hard to get out once it gets down there!
This is why the lower quarters and trunk extensions are getting replaced on my car. Someone dumped a box of nails down there and left them for a few decades.